Pay2bd APIs Documentation
Playground

Payment Callback

Callback endpoint that receives payment notifications from Pay2Local. This endpoint should be implemented by merchants to receive real-time payment status updates.

POST
/callback

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

Header Parameters

x-signature*string

HMAC SHA-256 signature for request verification

x-request-id*string

Unique identifier generated by Pay2Local

Formatuuid

Request Body

application/json

merchant_payment_id*string

Merchant payment ID provided by the merchant

requested_amount*number

This amount is request by customer

Formatfloat
currency*string

Currency Code is BDT only supported by Pay2local

request_type*string

Request type Deposit or Withdraw

Value in"Deposit" | "Withdraw"
bank_type*string

Selected mobile banking method by customer

request_status*string

Current payment request status

Value in"Approved" | "Rejected"
transaction_id?string

Payment transaction ID if payment successful

service_type*string

Selected service type

Value in"p2p_agent" | "p2c_qr" | "p2c_api"
timestamp*string

Timestamp of when the payment was processed

Formatdate-time
signature*string

HMAC SHA-256 signature for request verification

Response Body

application/json

curl -X POST "https://api.pay2local.com/api/v1/callback" \  -H "x-signature: string" \  -H "x-request-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "merchant_payment_id": "10458558",    "requested_amount": 100,    "currency": "BDT",    "request_type": "Deposit",    "bank_type": "Nagad",    "request_status": "Approved",    "transaction_id": "236a4d5f-884a-4934-90af-04306146c328",    "service_type": "p2p_agent",    "timestamp": "2024-05-21T15:50:32.024+06:00",    "signature": "ec2e2dfe942ddf3905b06b9e0d4bb502935b6b389432d37e51fc8316d683f0e1"  }'
{
  "success": true,
  "message": "Callback received"
}
Empty
Empty