Playground
Create a deposit request
Initiates a deposit transaction. Multiple variants available:
- Single Method Deposit - Specific payment method
- All-in-One Deposit - Customer chooses method
- H2H Deposit - Agent-assisted deposit
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 exact amount customer will deposit
redirect_url*string
URL where the customer will be redirected after attempting payment
Format
urimerchant_payment_id*string
Unique payment number identifier generated by the merchant
currency*string
The transaction currency
Value in
"BDT"service_type*string
Defines how the deposit will be processed
Value in
"p2p_agent" | "p2c_qr" | "p2c_api"bank_type*string
Specifies which wallet/bank to use
Value in
"Nagad" | "Bkash" | "Upay" | "Rocket"Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.pay2local.com/api/v1/payment/deposits" \ -H "Content-Type: application/json" \ -d '{ "amount": 5.5, "redirect_url": "https://abc.com/example", "merchant_payment_id": "100058130003", "currency": "BDT", "service_type": "p2p_agent", "bank_type": "Bkash" }'{
"requested_amount": 50,
"merchant_payment_id": "100058130003",
"request_type": "Deposit",
"bank_type": "Bkash",
"service_type": "p2p_agent",
"currency": "BDT",
"redirect_url": "https://pay2bd.com/deposit/69caaa2e-b785-43d0-b632-b0aa5e46b722",
"request_id": "236a4d5f-884a-4934-90af-04306146c328",
"message": "Success",
"status": 200
}{
"message": "Bad Request",
"status": 400
}{
"message": "Bad Request",
"status": 400
}{
"message": "Bad Request",
"status": 400
}