Accepting a Quote
For this step, we'll engage with the Accept Quote endpoint on the API.
Use only Parent API keys for this operation to ensure the request functions at the EP level.
After generating the quote, it remains in a PENDING
state until accepted. Should there be any delay in acceptance by your merchant, it's necessary to refresh and acquire a new quote every 20 seconds to reflect the current spot exchange rate accurately.
To proceed with accepting the quote, a PUT request is made to the Accept Quote endpoint using the uuid
of the desired quote.
Example Request
This PUT request is made to the Accept Quote endpoint to finalize the exchange of 1000 EUR from your EP wallet to USDT in your EPM account using the quote's unique identifier (uuid):
PUT https://api.bvnk.com/api/v1/quote/accept/b0294ad5-044d-47c0-b6f9-45c850f43106
Example Response
This detailed response provides a comprehensive overview of the transaction's outcomes, including the processed fees and the final amounts after the exchange.
{
"quote": {
"id": 336859,
"from": "EUR",
"to": "USDT",
"amountIn": 1000.000000000000000000,
"amountDue": 0E-18,
"amountOut": 1068.103764000000000000,
"price": 0.936238625600000000,
"quoteStatus": "PAYMENT_OUT_PROCESSED",
"paymentStatus": "SUCCESS",
"acceptanceExpiryDate": 1708453102000,
"acceptanceDate": null,
"paymentExpiryDate": 1708453980000,
"paymentReceiptDate": 1708453464049,
"payInLegs": [
{
"id": 1409472,
"amount": 1000.000000000000000000,
"dateCreated": 1708453464100,
"reference": "45d12ef0-d01d-11ee-82bd-73473979bb8b",
"currency": "EUR"
}
],
"payInMethod": {
"id": 5,
"code": "wallet",
"settlementCurrency": "EUR",
"requestedCurrency": null,
"estimatedExchangeRate": null,
"accountMethods": []
},
"payOutMethod": {
"id": 3,
"code": "wallet",
"currency": "USDT",
"accountMethods": []
},
"uuid": "b0294ad5-044d-47c0-b6f9-45c850f43106",
"payOutInstruction": null,
"payInInstruction": {
"action": "NONE",
"form": null,
"redirectUrl": null,
"displayParameters": null
},
"usePayInMethod": {
"id": 1319693,
"display": null
},
"usePayOutMethod": {
"id": 1456,
"display": null
},
"fee": 1.000000000000000021,
"processingFee": 0E-18,
"type": "FIXED",
"netPrice": 0.936238625600000000,
"grossPrice": 0.936238625600000000,
"amountInGross": 1E+3,
"amountInNet": 1000.000000000000000000,
"fees": {
"percentage": {
"service": 0.0010,
"processing": 0.0000
},
"value": {
"service": 1,
"processing": 0
}
},
"dateCreated": 1708453082000,
"lastUpdated": 1708453465039
},
"payInInstruction": {
"action": "NONE",
"form": null,
"redirectUrl": null,
"displayParameters": null
}
}
The response indicates that the quote status has updated to SUCCESS, and the funds have been exchanged between wallets accordingly. Specifically, 1000 EUR has been withdrawn from your EP EUR wallet, and 1068.10 USDT has been credited to the EPM's USDT wallet.
Verifying the Transfer
To confirm the updated balances of the involved wallets, query each using the Get Wallet Endpoint. Now that you possess the specific wallet IDs, there's no need to list all wallets again. However, remember to include the x-account-reference
header when querying the EPM's USDT wallet.
Example Wallet Fetch Requests
For fetching the EP EUR wallet's details::
GET https://api.bvnk.com/api/v1/wallet/543660
For querying the EPM's USDT wallet::
GET
header x-account-ref: 39bd9cd2-8d57-4547-ae2a-f82c5bc328ce
https://api.bvnk.com/api/v1/wallet/578199
Ensure the correct headers are included, especially when querying the EPM wallet, to retrieve accurate and updated wallet balance information.
Updated 8 months ago