Wallet Transfer

Transfers funds from one LedgerBlock wallet to another LedgerBlock wallet.

A wallet transfer requires both a source wallet and a destination wallet. When the transfer is successfully initiated, LedgerBlock returns an auth token. This token is then used to initiate the payout confirmation process with the user's wallet PIN or OTP.

Request

POST {{base_url}}/api/v1/user/wallet/transfer

Authentication & Headers

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

Request Body

ParameterTypeRequiredDescriptionExample
user_refstringYesReference of the user initiating the transfer.{{vault:Merchant-user-ref}}
source_wallet_idstringYesID of the wallet from which funds will be transferred.{{vault:ngn-wallet}}
target_wallet_idstringYesID of the wallet receiving the funds.{{vault:user3walletngn}}
txn_refstringYesUnique reference for the transfer transaction.LGB_TXN_001245
amountnumberYesAmount to transfer.2500
currencystringYesCurrency of the transfer.NGN
notification_urlstringNoURL to receive transaction notifications.https://example.com/webhook

Example Request

{
  "user_ref": "USR_784521",
  "source_wallet_id": "WAL_NGN_001",
  "target_wallet_id": "WAL_NGN_002",
  "txn_ref": "LGB_TXN_001245",
  "amount": 2500,
  "currency": "NGN",
  "notification_url": "https://example.com/webhook"
}

Example Response

{
  "status": "success",
  "message": "Transfer initialized. Confirm with your wallet PIN to complete it",
  "data": {
    "auth_token": "a91c7e42f8d31b65c2049a87f521d6e8b3c7a190",
    "expires_in_seconds": 600
  }
}

Response

FieldTypeDescription
statusstringIndicates whether the transfer was successfully initialized.
messagestringProvides the result of the transfer initialization.
dataobjectContains the authorization details required to confirm the transfer.
data.auth_tokenstringTemporary authorization token used to confirm the wallet transfer.
data.expires_in_secondsintegerTime in seconds before the authorization token expires.

Next Step: Use the returned auth_token to confirm the transfer with the user's wallet PIN.


Did this page help you?