Wallet to wallet Transfer (Same Currencies)

Wallet-to-Wallet Transfer

Transfers funds from one internal LedgerBlock wallet to another wallet.

The transfer requires a source wallet, target wallet, transaction reference, amount, and currency. The user_ref identifies the user initiating the transfer.

Endpoint

POST /api/v1/user/wallet/transfer

Authorization

Bearer Token

The request must include a valid Bearer Token.

Headers

HeaderDescriptionRequired
AuthorizationBearer token used to authenticate the requestYes
Content-TypeSpecifies that the request body is JSONYes
x-merchant-refUnique reference identifying the merchantYes

Request Body

FieldDescriptionRequired
user_refReference of the user initiating the transferYes
source_wallet_idID of the wallet funds will be deducted fromYes
target_wallet_idID of the wallet that will receive the fundsYes
txn_refUnique transaction reference generated by the merchantYes
amountAmount to transferYes
currencyCurrency of the transfer, for example NGNYes
notification_urlURL that LedgerBlock can use to send transaction status notificationsYes

Request

curl --location -g '{{base_url}}/api/v1/user/wallet/transfer' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-merchant-ref: {{vault:x-merchant-ref}}' \
--data '{
    "user_ref": "{{vault:Merchant-user-ref}}",
    "source_wallet_id": "{{vault:source-wallet-id}}",
    "target_wallet_id": "{{vault:target-wallet-id}}",
    "txn_ref": "lgb_live_008",
    "amount": 10,
    "currency": "NGN",
    "notification_url": "{{notification_url}}"
}'

How It Works

  1. The merchant identifies the user initiating the transfer using user_ref.
  2. The source_wallet_id identifies the wallet from which the funds will be deducted.
  3. The target_wallet_id identifies the receiving internal wallet.
  4. LedgerBlock processes the transfer for the specified amount and currency.
  5. The merchant's txn_ref is used to uniquely identify the transaction.
  6. LedgerBlock sends transaction notifications to the configured notification_url.

Transfer Flow

Source Wallet
     │
     │  Amount + Currency
     ▼
LedgerBlock
     │
     │  Internal Wallet Transfer
     ▼
Target Wallet

Use Cases

The Wallet-to-Wallet Transfer endpoint can be used to:

  • Transfer funds between internal LedgerBlock wallets.
  • Move funds between users within the same supported currency.
  • Initiate user-to-user transfers using wallet IDs.
  • Track transfers using a merchant-generated transaction reference.
  • Receive transaction status updates through a notification URL.

Did this page help you?