Skip to main content

Overview

Payment Callback API

Server-to-Server Communication

Whenever a transaction is initiated at the partner’s end, the status should be shared with Nuclei's server. Use the following API to update the payment status for a given transaction ID.

API Contract

EnvironmentEndpoint
Staginghttps://callback-staging.gonuclei.com/api/payment-async/v1/callback
Pre-Productionhttps://callback-preprod.gonuclei.com/api/payment-async/v1/callback
Productionhttps://callback-prod.gonuclei.com/api/payment-async/v1/callback

Headers

  • X-Body-Signature: Checksum (HMAC-SHA256), generated using partner-secret-key
  • partner-key: <NUCLEI-SDK-KEY>
  • provider-key: NUCLEI

Request Body (Parameters)

  • Request Structure:

    {
    "payload": "<encrypted message body AES>"
    }
  • Message body example (Decoded payload):

    {
    "status": "SUCCESS" <string>,
    "amount":5” <string>, 
    "transaction_id": "N-HBA14RA-FUI9QWO-CAIVDEK" <string, 40 characters>,
    “partner_transaction_id": "ZREF0123456ABC" <string>,
    "created_at":1504010130” <milliseconds, string>,
    "error_message": "NA" <string>,
    "payment_mode": "<partner payment mode>" <string>,
    }

Response Status Codes

HTTP StatusDescription
200 (OK)Message: Success
416 (Not Acceptable)Message: Amount Mismatch
404 (Not Found)Message: Transaction Not Found
400 (Bad Request)
500 (Signature Mismatch)

Responses will vary based on the request outcome.