Step 3: NFT Fulfilment
Implement webhooks
Banxa will rely on the merchant partner to send the NFT to the customer, and in order for us to be notified of this we will require you to implement two webhooks.
One for Banxa to notify you to perform the fulfilment of the NFT to the customer’s address and one to retrieve the fulfilment status of the NFT.
Fulfilment Endpoint - POST
We will send a HTTPs request to your webhook URL containing order details and NFT details such as order ID, nft name, image, customer’s wallet address etc.
URL Example:
https://www.[merchantname].com/[apiname]
Payload Example:
{
"orderId": 123,
"orderRef": "439uehrgu83h4ruy3weddwass",
"orderStatus": "Complete",
"nft": [ NFT payload you provided during order creation ]
}
Response Example:
Webhook should reply with a http success code of 200 and payload must contain the success field as below:
{
"success":"true"
}
Fulfilment Endpoint - GET
To receive an update on the NFT delivery, we will send a https request to check the fulfilment status of the order. This is to confirm that the NFT has been successfully delivered to the end customer, so we can so we can complete the order on our end and finalize payment to the customer.
One way to reconcile the order is to match the "order": {"id"} returned in the response from the Create NFT Order API with orderRef below.
URL Example:
https://www.[merchantname].com/[apiname]
Payload Example:
{
"orderId": 123,
"orderRef": "439uehrgu83h4ruy3weddwass",
"orderStatus": "complete",
"nft": [This is the NFT payload you provided during order creation ]
}
Response Example:
Webhook should reply with a http success code of 200 and payload must contain the following parameters:
{
"status":"Pending"
}
Fulfilment statuses should be one of the following:
Status | Description |
---|---|
Pending | NFT has not started fulfilment yet |
Failed | NFT fulfilment failed |
Processing | NFT fulfilment is processing |
Complete | NFT fulfilment is completed |
That's it! We are ready to roll.
Updated 6 months ago