Callback Notifications
Callbacks are available as a mechanism to get updates on invoices. For instance, you can receive a notification that indicates that a invoice is completed, or partially paid. When an invoice is completed, the data.complete field will be true.
Here's an example of how that could look:
{
"signature": "e1ca4421621c4d795fe3612b1044634595c52ebe1c52225573c310741c9d47b6",
"data": {
"client": {
"name": "Optional Customer Name",
"email": "[email protected]",
"phone": "+18001234567",
"referenceID": "123test"
},
"paidAmount": 0.1,
"subTotal": 0.1,
"total": 0.1,
"partialPaymentsEnabled": false,
"currency": "USDC",
"completed": true,
"description": "Optional Order Description",
"transactions": [
{
"tx": "0xd1c7fe2821a9df5240f3d31e570a760322fa979f84c0655a8f9f857023e7064f",
"sender": "0x2F67f1426f33E25A920F0b2139cd460fDfb8997C",
"amount": 0.09999999999999999,
"cryptoAmount": 100000,
"timestamp": "2024-09-05T21:00:27.000Z",
"network": "MATIC_POLYGON"
}
],
"createdAt": "2024-09-05T20:59:47.429Z",
"merchant": {
"name": "Business Name",
"initiator": "Internal Test POS API 1"
},
"id": "66da1bc34f03a871430c1a71"
}
}Authentication and Validation
All callbacks will have two parent objects, signature and data. The signature is a SHA256 hash that is created from the contents of data and the secret provided to you by your onboarding specialist. You can authenticate a callback by comparing the signature value with a SHA256 hash of these values - a perfect match indicates an authentic callback.
Last updated