Pay2bd APIs Documentation

Withdrawal

Overview

Initiates a withdrawal transaction. Multiple variants available:

  1. Single Method Withdrawal - Specific payment method
  2. All-in-One Withdrawal - Customer chooses method

POST
/secure/checkout/withdraw

Authorization

ApiKeyAuth ApiPublicKey

X-Authorization-Access<token>

Access Key value shared by Pay2Local during on-boarding

In: header

X-Authorization-Public<token>

Public Key value shared by Pay2Local during on-boarding

In: header

Request Body

application/json

amount*string

The withdrawal amount to be sent to the customer

bank_type*string

Wallet/bank where funds will be sent

Value in"Nagad" | "Bkash" | "Upay" | "Rocket"
currency*string

Transaction currency

Value in"BDT"
cust_phone*string

Customer's wallet/phone number where funds should be delivered

Match^[0-9]+$
merchant_payment_id*string

Unique transaction ID generated by merchant for reconciliation

redirect_url*string

URL where customer will be redirected after withdrawal attempt

Formaturi
service_type*string

Defines withdrawal method

Value in"p2p_agent" | "p2c_qr" | "p2c_api"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.pay2local.com/api/v1/secure/checkout/withdraw" \  -H "Content-Type: application/json" \  -d '{    "amount": "100",    "bank_type": "Upay",    "currency": "BDT",    "cust_phone": "6546546546",    "merchant_payment_id": "1000545",    "redirect_url": "https://abc.com/example",    "service_type": "p2p_agent"  }'

{
  "requested_amount": 100,
  "merchant_payment_id": "100058130006",
  "bank_type": "Upay",
  "request_type": "Withdraw",
  "check_status_api_url": "redirect_url",
  "request_id": "087a8b14-9cad-49f9-86b3-6066cffd843e",
  "currency": "BDT",
  "service_type": "p2p_agent",
  "message": "Success",
  "status": 200
}

{
  "message": "Bad Request",
  "status": 400
}
{
  "message": "Not Authorized !",
  "status": 401
}

{
  "message": "Invalid Amount",
  "status": 403
}

On this page