Settling to your merchant

Now that you have the crypto address to send funds to, we'll be using the Create payment endpoint to send a payout to your merchant.

curl -X "POST" "https://api.sandbox.bvnk.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635330255", nonce="0T7Ynn", mac="WpvsRJmKIgS/2xaM5Sfj7U7Tr3cuRFHaxIcT/A4ugP8="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 10000,
  "currency": "USDC",
  "reference": "df58eff9-76bc-4fd7-b7a5-3bdfbb003c95",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "0xc70a3deb2971346544c87e77c1736757e889619f",
    "currency": "USDC",
    "code": "crypto"
  }
}'

You'll need the following information to complete the payout request:

Parameter

Type

Description

amount

big decimal

The amount to send in the originating currency (in this case USDC)

currency

string

The originating currency - in other words, the wallet the funds will be removed from (in this case USDC). If you didn't go through the quote process, you can set this to the fiat value and we will convert it when sending the funds - we don't recommend doing this as you won't be able to approve the exchange rate.

reference

string

A unique reference ID for the transaction

type

string

Set to OUT

merchantId

string

The merchant ID you are using.

payOutDetails.address

string

The address to send the funds to that we collected in the previous step.

payOutDetails.currency

string

The currency to send the funds in.

payOutDetails.code

string

Set to crypto.

payOutDetails.protocol

string

A field only used if an asset is present on multiple protocols.


Did this page help you?