Get Order status
There are two ways to get this done.
- Listening for payment webhooks: We covered how to create a webhook listener here in the getting setup guide - if you haven't done this already, go back to this step to get ready to receive webhooks.
- Calling get order-details API (API link):
You can retrieve directly the latest status by specifying the order ID as a path parameter.
curl --location 'https://sandbox-api.transfi.com/v3/orders/OR-2512221500071811800' \ --header 'mid: SAH1N3_NA_NA' \ --header 'Authorization: Basic =='{ "status": "success", "data": { "id": "OR-2510010937441887629", "status": "initiated", "type": "swap", "purposeCode": "personal", "purposeCodeReason": "Converting crypto to fiat for personal expenses and bill payments", "source": { "currency": "USD", "amount": "10", "paymentType": "bank_transfer" }, "destination": { "currency": "EUR", "amount": "8.52" }, "userId": "UX-250910053447199", "senderName": { "firstName": "sumanth", "lastName": "md" }, "mid": "ABCDEF_NA_NA", "fees": { "networkFee": 0, "processingFee": 0, "fixedFee": { "totalFixedFees": 0, "totalFixedTfFees": 0, "totalFixedCxFees": 0, "fixedFeesCurrency": "USD", "fixedFeeDetails": { "baseFeeFixedRate": 0, "tfFeeFixedRate": 0, "cxFeeFixedRate": 0, "currency": "" } } } } }{ "status": "success", "data": { "id": "OR-2510010958112819394", "status": "initiated", "type": "swap", "purposeCode": "personal", "source": { "currency": "USDTPOLYGON", "amount": "119.282956" }, "destination": { "currency": "USDC", "amount": "119.112451", "walletAddress": "dummy_0x63d31231236a1caAb8B42fwrwwr" }, "userId": "UX-250910053447199", "senderName": { "firstName": "sumanth", "lastName": "d" }, "mid": "SAH5F0_STPLO9_NA", "fees": { "networkFee": 0.170505, "processingFee": 0, "fixedFee": { "fixedFeesCurrency": "USDC" }, "feeMode": "percentage" } } }
Updated 5 days ago