Skip to content

bKash / Nagad / Rocket

Unified Redirect & Server to Server Integration

Base URL: https://api.paylander.com/api/v1/payment/
Endpoint: POST /v1/payment/


Integration Models

Two integration models:

  • Redirect Flow — user completes the payment on our hosted page.

  • Server to Server Flow — you collect user data; our API returns an account to which the customer should send the payment.
    → Requires: first_name, surname, phone, email.

Notes for Server to Server:

  • The state field appears only in Server to Server responses and indicates next steps.
  • waiting_for_code → collect verification_code from the payer and call /v1/payment/confirm/.
  • waiting_for_provider → approval pending.

Redirect Flow

Used when subscriber completes the payment fully in our hosted UI.

Request (Redirect)

Required fields:

  • channel — UUID
  • amount.currency — ISO 4217
  • amount.value — string
  • external_id — optional
  • return_url — recommended
  • payment_method.type"bkash", "nagad", "rocket"

Example Request

json
{
  "channel": "8fec39b6-c41b-46d6-b219-61d115fdfa2d",
  "amount": {
    "currency": "BDT",
    "value": "550.00"
  },
  "payment_method": {
    "type": "bkash"
  },
  "return_url": "https://example.com/success",
  "external_id": "ORDER-10001"
}

Example Response

json
{
  "status": "processing",
  "transaction_id": "72ac4b72-e43a-41cf-9539-da913b701f7f",
  "amount": {
    "currency": "BDT",
    "value": "550.00"
  },
  "redirect_url": "https://pay.paylander.com/bkash/72ac4b72-e43a-41cf-9539-da913b701f7f/",
  "channel": "8fec39b6-c41b-46d6-b219-61d115fdfa2d",
  "payment_method": {
    "type": "bkash"
  },
  "create_date": "2025-10-15T12:05:00.000000+00:00"
}

Server to Server Flow

Used when payment is initiated by the merchant’s backend.

Required fields (Server to Server)

Inside payment_method:

  • type"bkash", "nagad", or "rocket"
  • first_name
  • surname
  • phone
  • email

Response (Server to Server)

The API returns:

  • account: stringthe wallet/account number to which the user must send the payment

And a state field will appear later as the payment progresses.


Example Request (Server to Server)

json
{
  "channel": "8fec39b6-c41b-46d6-b219-61d115fdfa2d",
  "amount": {
    "currency": "BDT",
    "value": "890.00"
  },
  "payment_method": {
    "type": "nagad",
    "first_name": "Ayan",
    "surname": "Rahman",
    "phone": "01700111222",
    "email": "ayan@example.com",
  },
  "external_id": "ORDER-10002",
  "return_url": "https://example.com/success"
}

Example Response (Server to Server)

json
{
  "status": "processing",
  "transaction_id": "e5c2d763-8bc8-4e20-9e80-2b12199f4dc1",
  "amount": {
    "currency": "BDT",
    "value": "890.00"
  },
  "account": "01780123456",
  "channel": "8fec39b6-c41b-46d6-b219-61d115fdfa2d",
  "payment_method": {
    "type": "nagad",
    "first_name": "Ayan",
    "surname": "Rahman",
    "phone": "01700111222",
    "email": "ayan@example.com",
    "state": "waiting_for_code",
    "account": "123456"

  },
  "create_date": "2025-10-15T12:00:00.000000+00:00"
}

Confirm Flow (Server to Server)

Used only when the payment enters:

  • waiting_for_code

You must call:

POST /v1/payment/confirm/

Confirm Request

json
{
  "id": "e5c2d763-8bc8-4e20-9e80-2b12199f4dc1",
  "transaction_id": "123456"
}

Example Response (waiting_for_provider)

json
{
  "status": "processing",
  "transaction_id": "e5c2d763-8bc8-4e20-9e80-2b12199f4dc1",
  "payment_method": {
    "type": "nagad",
    "state": "waiting_for_provider"
  }
}

Example Response (Completed)

json
{
  "status": "completed",
  "transaction_id": "e5c2d763-8bc8-4e20-9e80-2b12199f4dc1",
  "amount": {
    "currency": "BDT",
    "value": "890.00"
  },
  "create_date": "2025-10-15T11:19:17.254731+00:00"
}

Notes

  • state appears only in Server to Server integrations.
  • waiting_for_code → user must send code to merchant; merchant calls confirm.
  • waiting_for_provider → payment is being processed by the provider.
  • account appears in the initial Server to Server response, and is required for the user to perform the transfer.