Confirms an order by providing a transaction hash for crypto orders and order ID returned from the create order endpoint.
ID of the order returned from create order endpoint
Transaction hash for crypto orders
curl -L \
--request POST \
--url 'https://sandbox-api.fonbnk.com/api/offramp/confirm-order' \
--header 'x-client-id: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "660528663163c4652145aaba",
"hash": "0xf4c04687dca90a9060861493d7baa8ce761081c44949ec3507c5413304b13ae3"
}'
{
"_id": "6603f8fc1c3f3f94d6b30818",
"offerId": "65b8c6b8b188250081f30165",
"paymentType": "CRYPTO_WALLET",
"network": "CELO",
"asset": "CUSD",
"exchangeRate": 1268.6275,
"cashout": {
"localCurrencyAmount": 1294,
"usdAmount": 1.02,
"feeAmountUsd": 0.02,
"feeAmountUsdFonbnk": 0.02,
"feeAmountUsdPartner": 0,
"feeAmountLocalCurrency": 26,
"feeAmountLocalCurrencyFonbnk": 26,
"feeAmountLocalCurrencyPartner": 0,
"cryptoAmount": 1.02,
"feeAmountCrypto": 0.02,
"feeAmountCryptoFonbnk": 0.02,
"feeAmountCryptoPartner": 0
},
"fromAddress": "0x5b7ae3c6c87F4A3F94b35c77233b13191eBFAD20",
"toAddress": "0xe9bBDDCF0E8fcD41Bd1345aa5688B565931B0184",
"status": "offramp_success",
"createdAt": "2024-03-27T10:46:20.513Z",
"expiresAt": "2024-03-27T11:46:20.509Z",
"hash": "0xbda5dd11b17d65249238137f5d542320b66141ac96be3b750804354a6eadfb04",
"statusHistory": [
{
"status": "initiated",
"changedAt": "2024-03-27T10:46:20.522Z"
},
{
"status": "awaiting_transaction_confirmation",
"changedAt": "2024-03-27T10:46:31.007Z"
},
{
"status": "transaction_confirmed",
"changedAt": "2024-03-27T10:46:43.357Z"
},
{
"status": "offramp_pending",
"changedAt": "2024-03-27T10:46:44.568Z"
},
{
"status": "offramp_success",
"changedAt": "2024-03-27T10:50:02.649Z"
}
],
"requiredFields": {
"bankCode": "011:02",
"buyerBankAccountNumber": "3159586782",
"phoneNumber": "2347000000007"
},
"countryIsoCode": "NG",
"currencyIsoCode": "NGN",
"offerRequiredFields": [
{
"label": "Phone number",
"type": "phone",
"value": "2347000000007"
},
{
"label": "Bank name",
"type": "enum",
"value": "First Bank of Nigeria"
},
{
"label": "Bank account Number",
"type": "string",
"value": "3179586682"
}
],
"orderParams": "43"
}
Order confirmed successfully