typeWebhookRequest= { data: { orderId:string, offrampType:"bank", status:OfframpStatus, date:string, cashout: { localCurrencyAmount:number,// how much the user will receive in local currency usdAmount:number,// how much user must send in USD feeAmountUsd:number,// total fee amount in USD feeAmountUsdFonbnk:number,// fee amount in USD for Fonbnk feeAmountUsdPartner:number,// fee amount in USD for partner feeAmountLocalCurrency:number,// total fee amount in local currency feeAmountLocalCurrencyFonbnk:number,// fee amount in local currency for Fonbnk feeAmountLocalCurrencyPartner:number,// fee amount in local currency for partner }, exchangeRate:number, network:"AVALANCHE"|"POLYGON"|"CELO", asset:"USDC"|"CUSD", fromAddress:string, toAddress:string, userPhoneNumber:string, requiredFields: { label:string, type:'number'|'string'|'date'|'boolean'|'email'|'phone', value:string }[],// user account data orderParams?:string,// contents of orderParams query parameter during order creation countryIsoCode:string, currencyIsoCode:string, }, hash:string,};enumOfframpStatus { INITIATED ='initiated',// order was created AWAITING_TRANSACTION_CONFIRMATION ='awaiting_transaction_confirmation',// user has sent us a transaction hash, waiting for confirmation TRANSACTION_CONFIRMED ='transaction_confirmed',// user transaction was confirmed OFFRAMP_SUCCESS ='offramp_success',// user has received the funds TRANSACTION_FAILED ='transaction_failed',// user transaction failed OFFRAMP_PENDING ='offramp_pending',// offramp in progress OFFRAMP_FAILED ='offramp_failed',// offramp failed REFUNDING ='refunding',// offramp failed, refund in progress REFUNDED ='refunded',// offramp failed, refund was successful REFUND_FAILED ='refund_failed',// offramp failed, refund failed EXPIRED ='expired',// user did not send us a transaction hash in time}
We send a hash field in our webhook to protect merchants from fraudulent requests. Each request should be verified by a secret provided in the dashboard.