Initiate Wallet-to-Bank Payout

Initiates a payout from a user's sub-wallet to a bank account. The payout must be confirmed using the user's wallet PIN before processing can continue.

Request

POST {{base_url}}/api/v1/payout/wallet-bank

Authentication

LedgerBlock uses Bearer Token authentication. Include your API key in the Authorization header.

ParameterValueType
Authorization{{api_key}}Bearer Token

Headers

HeaderRequiredDescriptionExample
Content-TypeYesSpecifies that the request body is JSON.application/json
x-merchant-refYesUnique reference identifying the merchant.{{vault:x-merchant-ref}}

Example Request

{
  "user_ref": "{{merchant_user_ref}}",
  "currency": "NGN",
  "wallet_type": "SUB_WALLET",
  "txn_merchant_ref": "DUMMY_LBREF_000001",
  "amount": 500,
  "account_no": "0123456789",
  "bank_code": "000001",
  "meta_data": {},
  "notification_url": "https://example.com/webhooks/payout"
}

Example Response

{
  "status": "success",
  "message": "Payout initialized. Confirm with your wallet PIN to complete it",
  "data": {
    "payment_ref": "dummy-payment-ref-001",
    "txn_merchant_ref": "DUMMY_LBREF_000001",
    "currency": "NGN",
    "payment_status": "AWAITING_CONFIRMATION",
    "auth_token": "{{auth_token}}",
    "expires_in_seconds": 600
  }
}

Request Body

ParameterRequiredDescriptionExample
user_refYesUnique reference identifying the user initiating the payout.{{merchant_user_ref}}
currencyYesCurrency of the payout.NGN
wallet_typeYesType of wallet used to fund the payout.SUB_WALLET
txn_merchant_refYesUnique merchant-generated reference for the transaction.DUMMY_LBREF_000001
amountYesAmount to be paid to the bank account.500
account_noYesRecipient's bank account number.0123456789
bank_codeYesCode identifying the recipient's bank.000001
meta_dataNoOptional additional information associated with the payout.{}
notification_urlYesWebhook URL that receives payout status notifications.https://example.com/webhooks/payout

Response

FieldDescription
statusIndicates whether the payout initiation request was successful.
messageProvides information about the result of the request.
data.payment_refUnique reference assigned to the payout by LedgerBlock.
data.txn_merchant_refMerchant-generated reference associated with the payout.
data.currencyCurrency used for the payout.
data.payment_statusCurrent status of the payout. AWAITING_CONFIRMATION means the payout requires confirmation.
data.auth_tokenTemporary token required to confirm the payout.
data.expires_in_secondsTime in seconds before the authentication token expires.

Next Step

After initiating the payout, use the returned auth_token and the user's wallet PIN to confirm the transaction through the wallet-to-bank payout confirmation endpoint.

Add the PIN confirmation endpointClarify the authentication header


Did this page help you?