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
| Environment | Endpoint | 
|---|---|
| Pre-Production | https://callback-preprod.gonuclei.com/api/payment-async/v1/callback | 
| Production | https://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 Status | Description | 
|---|---|
| 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.