Skip to main content
Layer1

Create a payout

To initiate a payment out, send the POST /api/v1/pay/summary request with type set to OUT. Remember to add the mandatory payOutDetails object. When using payOutDetails, the address is validated to ensure that the payment is not created with an invalid address.

Example Request
{
"merchantId": "00a4af9d-ad4b-42d5-bec4-b7a8c90161fe",
"amount": 100,
"expiryMinutes": 60,
"currency": "USD",
"returnUrl": "https://yourwebsitename.com",
"reference": "6a4013c2-5fa9-4e2f-bef7-88c5570b6501",
"type": "OUT",
"payOutDetails": {
"code": "crypto",
"currency": "USDT",
"protocol": "ERC20",
"address": "0x84A4a239805d06c685219801B82BEA7c76702214",
"tag": ""
}
}

Find your merchantId in the Portal, in Merchant Payments > Merchant accounts > Merchant Details; the funds are drawn from that wallet. In payOutDetails, set code to crypto, and set protocol when the currency is available on multiple protocols (for example, USDT on ERC20 or TRC20). For XRP, tag is required; use 0 if the receiving wallet has no tag. If you omit expiryMinutes, the end-user has 1440 minutes to claim the payout.

Upon successful submission, the following response will be received:

Response
Example Response
{
"uuid": "fef4e99d-b41d-4efe-89fd-4fdf41f3f33f",
"merchantDisplayName": "Metallica Inc",
"merchantId": "00a4af9d-ad4b-42d5-bec4-b7a8c90161fe",
"dateCreated": 1704807605678,
"expiryDate": 1704808805678,
"quoteExpiryDate": 1704808806000,
"acceptanceExpiryDate": 1704807636000,
"quoteStatus": "ACCEPTED",
"reference": "a003cec4-abf5-42aa-baf0-43a1cc815536",
"type": "OUT",
"subType": "merchantPayOut",
"status": "PROCESSING",
"displayCurrency": {
"currency": "USD",
"amount": 50,
"actual": 0
},
"walletCurrency": {
"currency": "ETH",
"amount": 0.0176227,
"actual": 0.0176227
},
"paidCurrency": {
"currency": "USDT",
"amount": 50,
"actual": 0
},
"feeCurrency": {
"currency": "ETH",
"amount": 0.00017623,
"actual": 0
},
"displayRate": {
"base": "ETH",
"counter": "USD",
"rate": 2837.24968364666
},
"exchangeRate": {
"base": "ETH",
"counter": "ETH",
"rate": 1
},
"address": {
"address": "0x84A4a239805d06c685219801B82BEA7c76702214",
"tag": "",
"protocol": "ETH",
"uri": "ethereum:0x84A4a239805d06c685219801B82BEA7c76702214?value=1.76227E+16",
"alternatives": []
},
"returnUrl": "www.your-url-here.com",
"redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=46a86ebc-c40b-464f-b017-00191be0f20c",
"transactions": [],
"refund": null,
"refunds": []
}

The response indicates that the payment has been automatically approved and is in a PROCESSING state.

Key takeaways include the following:

  • Provided uuid can be used at any point to query the status of the payment. A series of webhook notifications will be dispatched to allow you to update your system accordingly.
Was this page helpful?