Enabling a crypto payout approval flow

📘

Please contact your solutions consultant to enable payout approval flows for the API flow.

With the approval flows enabled, a payout will go to a pending state after the wallet details are provided. Then BVNK will wait for an Approve or a Reject API call to either proceed or cancel the payout. If you don't know the wallet address, you can use our hosted payment page to collect the information; for this, in the create payout request, you will not specify the payOutDetails object. See below.

Create a payout (with no wallet address information provided)

{
    "merchantId": "6dfaeb52-cf5f-4534-8c80-130a1b1ae93f",
    "type": "OUT",
    "amount": 10,
    "currency": "USD",
    "expiryMinutes": 30,
    "reference": "test_reference_out_ew7sT8",
    "returnUrl": "https://your-url-here.com/status",
    "customerId": "3fcdaad9-f8af-48b0-b860-c19443aca980",
    "complianceDetails": {
        "requesterIpAddress": "77.71.188.87",
        "partyDetails": [
            {
                "type": "BENEFICIARY",
                "entityType": "INDIVIDUAL",  
                "firstName": "John",
                "lastName": "Doe",
                "dateOfBirth": "1984-06-30",
                "relationshipType": "THIRD_PARTY",
                "countryCode": "DE"
            }
        ]
    }
}

From the response, take the redirectUrl and redirect the user to the Hosted payment page to collect the destination wallet details.

{
    "uuid": "79e520a8-d4d8-4a3c-983b-dd1d98acbe95",
    "merchantDisplayName": "LHV EUR Wallet",
    "merchantId": "6dfaeb52-cf5f-4534-8c80-130a1b1ae93f",
    "dateCreated": 1741985921172,
    "expiryDate": 1741987721172,
    "quoteExpiryDate": null,
    "acceptanceExpiryDate": null,
    "quoteStatus": "TEMPLATE",
    "reference": "test_reference_out_ew7sT8",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "PENDING",
    "displayCurrency": {
        "currency": "USD",
        "amount": 10,
        "actual": 0
    },
    "walletCurrency": {
        "currency": "EUR",
        "amount": 9.21,
        "actual": 0
    },
    "paidCurrency": {
        "currency": null,
        "amount": 0,
        "actual": 0
    },
    "feeCurrency": {
        "currency": "EUR",
        "amount": 0,
        "actual": 0
    },
    "networkFeeCurrency": null,
    "displayRate": null,
    "exchangeRate": null,
    "address": null,
    "returnUrl": "https://your-url-here.com/status",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout/79e520a8-d4d8-4a3c-983b-dd1d98acbe95",
    "transactions": [],
    "refund": null,
    "refunds": [],
    "currencyOptions": [],
    "flow": "DEFAULT",
    "twoStep": false
}

Once the user submits the wallet details in the hosted payment page, if the approval flows are enabled, the Payout will go to a pending state.

Approving or Rejecting a Payout

📘

The reference attribute in the below requests expects the UUID from the payment response.


EnvironmentEndpoint
SANDBOXPOST https://api.sandbox.bvnk.com/api/approval-workflow/v2/action
PRODUCTIONPOST https://api.bvnk.com/api/approval-workflow/v2/action

Approving a payout request

{
  "action": "APPROVE",
  "reference": [
    "79e520a8-d4d8-4a3c-983b-dd1d98acbe95"
  ]
}

Rejecting a payout request:

{
  "action": "REJECT",
  "reference": [
    "79e520a8-d4d8-4a3c-983b-dd1d98acbe95"
    ],
  "rejectionReason": "API reject"
}