Pathao Commerce Instant Delivery API Documentation

Summary

Pathao API uses OAuth 2.0. There are 2 requests being sent here. 1st request is for getting the access token. This access token should be saved in the database (or any persistent store) for future use. 2nd request is for creating a new order. This uses the access token previously saved.
For understanding these APIs, we are providing Sandbox/Test Environment's Credentials here. And later you can easily integrate for Production/Live Environment by using your Live Credentials.

Generate Production Access Token
Now you can easily integrate Pathao Commerce API's into your website.

Client ID
Client Secret

Sandbox/Test Environment Credentials

Field NameValue
base_urlhttps://commerce-sandbox-api.pathao.com
client_iddev_764e838bb50d166c0d4f2c9a
client_secretXnRzVASbb9RtHBfltCbYT9QfEiD-i_WznkKbzsirAV0

Production/Live Environment

Field NameValue
base_urlhttps://commerce-api.pathao.com
client_idYou can see client_id from merchant api credentials section
client_secretYou can see client_secret from merchant api credentials section.

Authorization Token

POST
Endpoint:/api/v1/auth/generate-access-token
Generate a new API access token using the client credentials. This token is required for all subsequent API requests.
curl \
  --location '{{base_url}}/api/v1/auth/generate-access-token' \
  --header 'Content-Type: application/json' \
  --data '{
   "client_id": "Your Client Id",
   "client_secret": "Your Client Secret"
}'
Success Response
200
{ "data": { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkwiYnVzaW5lc3NfaWQiOjgsImJ19nZW5liOnRydWUsImNsaWVudF...", "expires_at": "2026-05-05T17:03:31.740738+06:00" } }
Response Data
Field NameField TypeDescription
dataobjectWrapper object containing token payload.
data.access_tokenstringBearer token used in `Authorization` header for all protected endpoints.
data.expires_atstringToken expiration timestamp with timezone offset.

Parcel Estimation

POST
Endpoint:/api/v1/ondemand/parcels/estimation
Returns an estimated delivery cost and a session ID (`sid`). You must call this before Parcel Create; the `sid` is valid for a limited time (see `estimation_ttl`). Use the response to show the customer the fare and to create the order.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/estimation?lang=en' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
   "pickup": {
      "address": "31, Road 7, Section 12",
      "address_notes": "",
      "pickup_notes": "",
      "house": "",
      "latitude": 23.8244683,
      "longitude": 90.3737437,
      "name": "Imran",
      "parcel_type": 104,
      "total_item_value": 100,
      "phone_number": "015XXXXXX49",
      "items": [
         {
            "name": "Pizza",
            "ref_id": "xyz",
            "quantity": 1,
            "size": "small",
            "dimensions": "120,20,30",
            "weight": 120,
            "price": 900,
            "description": ""
         }
      ],
      "pickup_ready_at": 1773209029,
      "pickup_deadline_at": 1773219029
   },
   "receiver": [
      {
         "address": "Mirpur 12 Bus Stand",
         "address_notes": "",
         "delivery_notes": "",
         "house": "",
         "total_item_value": 100,
         "latitude": 23.82937676656,
         "longitude": 90.363920107484,
         "name": "Imran",
         "parcel_type": 104,
         "phone_number": "015XXXXXX49",
         "road": "Begum Rokeya Avenue",
         "items": [
            {
               "name": "Pizza",
               "ref_id": "xyz",
               "quantity": 1,
               "size": "small",
               "dimensions": "120,20,30",
               "weight": 120,
               "price": 900,
               "description": ""
            }
         ],
         "dropoff_ready_at": 1773219029,
         "dropoff_deadline_at": 1773229029
      }
   ],
   "external_store_id": "123",
   "total_value": 1200,
   "is_creator_receiver": false,
   "is_payment_on_delivery": true,
   "slug": "84cf4c66262f53771bd547df"
}'
Request Parameters
Field NameField TypeRequiredDescription
pickup.addressstringYesFull pickup address.
pickup.latitudefloatYesPickup location latitude (WGS84).
pickup.longitudefloatYesPickup location longitude (WGS84).
pickup.namestringYesSender or contact name at pickup.
pickup.phone_numberstringYesContact phone at pickup.
pickup.parcel_typeintegerYesCategory ID from Parcel Types.
pickup.housestringNoHouse or building number.
pickup.address_notesstringNoExtra address or landmark details.
pickup.pickup_notesstringNoInstructions for the courier at pickup.
pickup.itemsarrayNoLine items included in the parcel.
pickup.items[].namestringNoItem name.
pickup.items[].ref_idstringNoYour item reference ID (SKU / internal ID).
pickup.items[].quantityintegerNoQuantity.
pickup.items[].sizestringNoSize descriptor (e.g. small, medium).
pickup.items[].dimensionsstringNoDimensions in cm as length,width,height.
pickup.items[].weightnumberNoWeight in grams.
pickup.items[].pricenumberNoUnit price.
pickup.items[].descriptionstringNoItem description (optional).
pickup.pickup_ready_atintegerNoPickup ready time as Unix UTC timestamp (seconds).
pickup.pickup_deadline_atintegerNoLatest acceptable pickup time as Unix UTC timestamp (seconds).
receiverarrayYesOne or more delivery stops.
receiver[].addressstringYesFull delivery address.
receiver[].latitudefloatYesDelivery location latitude.
receiver[].longitudefloatYesDelivery location longitude.
receiver[].namestringYesRecipient name.
receiver[].phone_numberstringYesRecipient phone number.
receiver[].parcel_typeintegerYesCategory ID from Parcel Types.
receiver[].total_item_valuenumberNoDeclared value for this stop.
receiver[].roadstringNoRoad or street name.
receiver[].housestringNoHouse or flat number.
receiver[].address_notesstringNoAdditional address details.
receiver[].delivery_notesstringNoInstructions for the courier at delivery.
receiver[].itemsarrayNoLine items for this stop (same structure as pickup.items).
receiver[].dropoff_ready_atintegerNoDropoff ready time as Unix UTC timestamp (seconds).
receiver[].dropoff_deadline_atintegerNoLatest acceptable delivery time as Unix UTC timestamp (seconds).
external_store_idstringNoYour store or location identifier.
total_valuenumberNoOverall declared value of the shipment.
is_creator_receiverboolNodefault value is false means sender
slugstringNoSlug of payout method. Required if is_payment_on_delivery true.
Success Response
200
{ "status": true, "data": { "sid": "1f705dd5-5417-4fd2-9bd5-ff4e15644094", "is_cod_active": true, "server_time": 1773209029, "estimation_ttl": 300, "total_value": 100, "sender_collectable_amount": 1170, "sender_payout_fee": 0, "sender_cod_service_fee": 30, "service_options": [ { "id": 1, "name": "Instant Delivery", "distance": 4584, "polyline": "eelpCacrfP...", "charge": 114.26, "discount": 0, "charge_after_discount": 114.26, "dropoff_eta": 3000, "pickup_eta": 200, "dropoff_deadline": 1773209029 }, { "id": 2, "name": "4-Hour Delivery", "distance": 4584, "polyline": "eelpCacrfP...", "charge": 114.26, "discount": 0, "charge_after_discount": 114.26, "dropoff_eta": 3000, "pickup_eta": 200, "dropoff_deadline": 1773209029 }, { "id": 3, "name": "Same Day Delivery", "distance": 4584, "polyline": "eelpCacrfP...", "charge": 114.26, "discount": 0, "charge_after_discount": 114.26, "dropoff_eta": 3000, "pickup_eta": 200, "dropoff_deadline": 1773209029 } ] } }
Response Data
Field NameField TypeDescription
statusbooleanWhether the estimation request succeeded.
dataobjectWrapper object containing the estimation payload.
data.sidstringSession ID; required in the next Create Parcel request.
data.is_cod_activebooleanWhether cash-on-delivery is available and enabled.
data.sender_collectable_amountfloatCollectable amount of sender for payment on delivery order
data.sender_payout_feefloatFee for payout of payment on delivery order
data.sender_cod_service_feefloatPayment on delivery service fee taken by pathao
data.server_timeintegerServer timestamp (Unix seconds).
data.estimation_ttlintegerSeconds until this estimate expires (e.g. 300).
data.total_valuenumberDeclared total value from the request.
data.service_optionsarrayAvailable service options (delivery speed tiers) for this route.
data.service_options[].idintegerService option identifier.
data.service_options[].namestringDisplay name (e.g. Instant Delivery, 4-Hour Delivery).
data.service_options[].distanceintegerRoute distance in meters for this option.
data.service_options[].polylinestringEncoded route polyline.
data.service_options[].chargefloatDelivery charge before discounts.
data.service_options[].discountfloatDiscount applied to this option.
data.service_options[].charge_after_discountfloatFinal charge after any discounts.
data.service_options[].dropoff_etaintegerEstimated time to dropoff (seconds).
data.service_options[].pickup_etaintegerEstimated time to pickup (seconds).
data.service_options[].dropoff_deadlineintegerLatest dropoff time as Unix UTC timestamp (seconds).

Parcel Categories

GET
Endpoint:/api/v1/ondemand/parcels/categories
Returns all supported parcel categories (e.g. Documents, Clothes, Gifts). Use the `id` of each category as `parcel_type` in Parcel Estimation and Create Parcel requests.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/categories' \
  --header 'Authorization: Bearer {{access_token}}'
Success Response
200
{ "categories": [ { "id": 101, "name": "Homemade food", "description": "Home cooked food", "icon": "/service/icons/parcel/ic_Homemade Food.png", "limit": 2500 }, { "id": 102, "name": "Clothes", "description": "Fold neatly and pack securely", "icon": "/service/icons/parcel/ic_Cloths.png", "limit": 2500 }, { "id": 103, "name": "Documents", "description": "No Passport or bank cheques", "icon": "/service/icons/parcel/ic_Documents.png", "limit": 0 }, { "id": 104, "name": "Gifts", "description": "Flowers, cards, chocolates, and others", "icon": "/service/icons/parcel/ic_Gifts.png", "limit": 2500 }, { "id": 105, "name": "Cosmetics", "description": "Makeup, skincare, or hygiene products. Ensure liquids are tightly sealed and packed to avoid leaks", "icon": "/service/icons/parcel/ic_Cosmetics.png", "limit": 2500 }, { "id": 106, "name": "Medicine", "description": "Prescription or over-the-counter medicines, securely sealed with clear labeling. No illegal or prohibited drugs allowed", "icon": "/service/icons/parcel/ic_Medicine.png", "limit": 2500 }, { "id": 107, "name": "Accessories", "description": "Watches, jewellery, bags, shoes etc, comment if fragile", "icon": "/service/icons/parcel/ic_Accessories.png", "limit": 2500 }, { "id": 108, "name": "Perishable", "description": "Fruits, vegetables, fishes, frozen foods etc", "icon": "/service/icons/parcel/ic_Perishable Goods.png", "limit": 2500 }, { "id": 109, "name": "Electronics", "description": "Bubble-wrapped, comment if fragile", "icon": "/service/icons/parcel/ic_Electronics.png", "limit": 2500 }, { "id": 110, "name": "Other Items", "description": "Art supplies, toys, stationery, small tools, or household items.", "icon": "/service/icons/parcel/ic_Other Items.png", "limit": 2500 } ] }
Response Data
Field NameField TypeDescription
categoriesarrayList of parcel category objects
categories[]objectCategory object
categories[].idintegerCategory ID; use this as parcel_type in estimation and create requests
categories[].namestringDisplay name of the category
categories[].descriptionstringPacking or handling guidelines for this category
categories[].iconstringURL path to the category icon image
categories[].limitintegerLiability limit in BDT; 0 means no coverage (e.g. Documents)

Parcel Create

POST
Endpoint:/api/v1/ondemand/parcels
Creates a new parcel delivery order. Requires a valid `sid` from Parcel Estimation. Returns the parcel `hashed_id` and tracking URL for status updates and tracking.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels?lang=en' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
   "sid": "1f705dd5-5417-4fd2-9bd5-ff4e15644094",
   "is_payment_on_delivery": true,
   "slug": "84cf4c66262f53771bd547df",
   "service_option_id": 1,
   "pickup": {
      "address": "31, Road 7, Section 12",
      "address_notes": "",
      "pickup_notes": "",
      "house": "",
      "latitude": 23.8244683,
      "longitude": 90.3737437,
      "name": "Imran",
      "parcel_type": 104,
      "total_item_value": 100,
      "phone_number": "015XXXXXX49",
      "items": [
         {
            "name": "Pizza",
            "ref_id": "xyz",
            "quantity": 1,
            "size": "small",
            "dimensions": "120,20,30",
            "weight": 120,
            "price": 900,
            "description": ""
         }
      ],
      "pickup_ready_at": 1773209029,
      "pickup_deadline_at": 1773219029
   },
   "receiver": [
      {
         "address": "Mirpur 12 Bus Stand",
         "address_notes": "",
         "delivery_notes": "",
         "house": "",
         "total_item_value": 100,
         "latitude": 23.82937676656,
         "longitude": 90.363920107484,
         "name": "Imran",
         "parcel_type": 104,
         "phone_number": "015XXXXXX49",
         "road": "Begum Rokeya Avenue",
         "items": [
            {
               "name": "Pizza",
               "ref_id": "xyz",
               "quantity": 1,
               "size": "small",
               "dimensions": "120,20,30",
               "weight": 120,
               "price": 900,
               "description": ""
            }
         ],
         "dropoff_ready_at": 1773219029,
         "dropoff_deadline_at": 1773229029
      }
   ],
   "external_store_id": "123",
   "total_value": 1200,
   "external_ref_id": "xyz",
   "will_pay": "receiver",
   "is_creator_receiver": false
}'
Request Parameters
Field NameField TypeRequiredDescription
sidstringYesSession ID from Parcel Estimation; must not be expired.
service_option_idintegerYesSelected service option id from the estimation response.
is_payment_on_deliverybooleanNoWhether payment is collected at delivery (e.g. COD).
slugstringNoSlug of payout method. Required if is_payment_on_delivery true.
external_store_idstringNoYour store or location identifier.
external_ref_idstringNoYour own reference ID for the order.
total_valuenumberYesOverall declared value of the shipment.
is_creator_receiverboolNoDefault is false (creator is sender). Set true when creator is receiver.
pickup.addressstringYesFull pickup address.
pickup.latitudefloatYesPickup location latitude (WGS84).
pickup.longitudefloatYesPickup location longitude (WGS84).
pickup.namestringYesSender or contact name at pickup.
pickup.phone_numberstringYesContact phone at pickup.
pickup.parcel_typeintegerYesCategory ID from Parcel Types.
pickup.housestringNoHouse or building number.
pickup.address_notesstringNoExtra address or landmark details.
pickup.pickup_notesstringNoInstructions for the courier at pickup.
pickup.itemsarrayNoLine items included in the parcel.
pickup.total_item_valuenumberNoTotal aggregated value of parcel items.
receiverarrayYesOne or more delivery stops.
receiver[].addressstringYesFull delivery address.
receiver[].latitudefloatYesDelivery location latitude.
receiver[].longitudefloatYesDelivery location longitude.
receiver[].namestringYesRecipient name.
receiver[].phone_numberstringYesRecipient phone number.
receiver[].parcel_typeintegerYesCategory ID from Parcel Types.
receiver[].roadstringNoRoad or street name.
receiver[].housestringNoHouse or flat number.
receiver[].address_notesstringNoAdditional address details.
receiver[].delivery_notesstringNoInstructions for the courier at delivery.
receiver[].itemsarrayNoLine items for this stop (same structure as pickup.items).
receiver[].total_item_valuenumberNoTotal declared value for this stop.
receiver[].dropoff_ready_atintegerNoDropoff ready time as Unix UTC timestamp (seconds).
receiver[].dropoff_deadline_atintegerNoLatest acceptable delivery time as Unix UTC timestamp (seconds).
Success Response
201
{ "data": { "hashed_id": "z1ci99jizevc", "order_id": "4LHV2YB", "charge": 114.26, "payable_charge": 114.26, "distance": 4584, "created_at": 1773209183, "server_time": 1773209183, "total_value": 0, "sender_collectable_amount": 1170, "sender_payout_fee": 0, "sender_cod_service_fee": 30, "pickup": { "pickup_eta": 200, "pickup_ready": 1773209029, "pickup_deadline": 1773209229 }, "receiver": [ { "dropoff_eta": 3000, "dropoff_ready": 1773209029, "dropoff_deadline": 1773229029 } ], "tracking_url": "/v1/ondemand/order/{parcel-id}" } }
Response Data
Field NameField TypeDescription
data.hashed_idstringAlphanumeric parcel ID; use in Cancel Order and Order Details.
data.order_idstringHuman-readable order reference (e.g. for support).
data.chargefloatDelivery charge for this order.
data.payable_chargefloatAmount to be paid (after discounts).
data.distanceintegerRoute distance in meters.
data.created_atintegerCreation timestamp (Unix).
data.server_timeintegerServer timestamp (Unix).
data.total_valuenumberDeclared total value.
data.pickup.pickup_etaintegerEstimated time to pickup.
data.pickup.pickup_readyintegerWhen the parcel is ready for pickup (Unix UTC timestamp seconds).
data.pickup.pickup_deadlineintegerLatest pickup time (Unix UTC timestamp seconds).
data.receiverarrayPer-stop details; each may include dropoff_ready, dropoff_deadline, and dropoff_eta.
data.receiver[].dropoff_etaintegerEstimated time to dropoff.
data.receiver[].dropoff_readyintegerDropoff ready time (Unix UTC timestamp seconds).
data.receiver[].dropoff_deadlineintegerLatest dropoff time (Unix UTC timestamp seconds).
data.tracking_urlstringURL for tracking the parcel.
data.sender_collectable_amountfloatCollectable amount of sender for payment-on-delivery orders.
data.sender_payout_feefloatFee for payout of payment-on-delivery orders.
data.sender_cod_service_feefloatPayment-on-delivery service fee taken by Pathao.

Parcel Cancellation

PATCH
Endpoint:/api/v1/ondemand/parcels/{parcel_id}/cancel
Updates a parcel's status. Use with status: "CANCELLED" to cancel an active order. The parcel must be cancellable (e.g. not already completed).
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/{{parcel_id}}/cancel' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
   "status": "CANCELLED",
   "cancellation_reason": {
      "slug": "customer-cancelled-order",
      "additional_text": ""
   }
}'
Request Parameters
Field NameField TypeRequiredDescription
parcel_idstringYesParcel's hashed_id from create or list (e.g. z1ci99jizkww).
statusstringYesNew status; use CANCELLED to cancel the order.
cancellation_reasonobjectNoReason metadata for the cancellation.
cancellation_reason.slugstringNoOne of the cancellation reason slugs.
cancellation_reason.additional_textstringNoExtra context (e.g. when slug is other).
Success Response
200
{ "parcel": { "parcel_status": "CANCELLED" } }
Response Data
Field NameField TypeDescription
parcelobjectThe updated parcel object.
parcel.parcel_statusstringCurrent status (e.g. CANCELLED).

Parcel Details

GET
Endpoint:/api/v1/ondemand/parcels/{parcel_id}
Returns full details for a specific parcel by its `hashed_id`. Use for active orders (e.g. tracking) or for historical orders (cancelled or completed). Response includes pickup, receiver, fare breakdown, and timestamps.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/{{parcel_id}}?user_type=user&localization=en' \
  --header 'Authorization: Bearer {{access_token}}'
Request Parameters
Field NameField TypeRequiredDescription
parcel_idstringYesParcel's hashed_id (e.g. z1ci99jizkx7).
user_typestringNoActor type for the request.
localizationstringNoLanguage for category names and disclaimer text.
Success Response
200
{ "parcel": { "hashed_id": "z1ci99jizevc", "order_id": "4LHV2YB", "parcel_status": "CANCELLED", "charge": 114.26, "distance": 4584, "duration": 632, "is_paid": 0, "created_at": 1777548230, "accepted_at": 1777548350, "picked_at": 1777551413, "started_at": 1777551416, "completed_at": 1777551425, "pickup": { "address": "31, Road 7, Section 12", "address_notes": "", "delivery_notes": "", "house": "", "latitude": 23.8244683, "longitude": 90.3737437, "name": "Imran", "parcel_type": 104, "phone_number": "015XXXXXX49", "items": [ { "name": "Pizza", "ref_id": "xyz", "quantity": 1, "size": "small", "dimensions": "120,20,30", "weight": 120, "price": 900, "description": "" } ], "total_item_value": 1200, "pickup_ready_at": 1773209029, "pickup_deadline_at": 1773219029 }, "receiver": [ { "address": "Mirpur 12 Bus Stand", "address_notes": "", "delivery_notes": "", "house": "", "latitude": 23.82937676656, "longitude": 90.363920107484, "name": "Imran", "parcel_type": 104, "phone_number": "015XXXXXX49", "road": "Begum Rokeya Avenue", "items": [ { "name": "Pizza", "ref_id": "xyz", "quantity": 1, "size": "small", "dimensions": "120,20,30", "weight": 120, "price": 900, "description": "" } ], "total_item_value": 1200, "dropoff_ready_at": 1773219029, "dropoff_deadline_at": 1773229029 } ], "rider": { "name": "asibul H Hasan", "number": "01767191651", "profile_picture": "/uploads/img/profile/7PqrFI1722490453.png", "type": "bike", "registration_number": "DHK METRO HA 55-5956" }, "support_number": "09678100800", "pickup_proof_img": "/assets/abc-72960e8f.jpg", "dropoff_proof_img": "/assets/bcd-b056ca09.jpg", "sender_collectable_amount": 1170, "sender_payout_fee": 0, "sender_cod_service_fee": 30 } }
Response Data
Field NameField TypeDescription
parcel.hashed_idstringAlphanumeric parcel ID used in subsequent API calls.
parcel.order_idstringHuman-readable order reference.
parcel.parcel_statusstringCurrent parcel status (e.g. PENDING, ACCEPTED, CANCELLED, COMPLETED).
parcel.chargefloatDelivery charge.
parcel.distanceintegerRoute distance in meters.
parcel.durationintegerEstimated or actual duration in seconds.
parcel.is_paidintegerPayment status (0/1).
parcel.created_atintegerCreation timestamp (Unix seconds).
parcel.accepted_atinteger | nullWhen a rider accepted the order (Unix seconds).
parcel.picked_atinteger | nullWhen the parcel was picked up (Unix seconds).
parcel.started_atinteger | nullWhen the rider started the journey (Unix seconds).
parcel.completed_atinteger | nullWhen delivery was completed (Unix seconds).
parcel.pickupobjectPickup details (address, contact, coordinates, items).
parcel.pickup.addressstringFull pickup address.
parcel.pickup.latitudefloatPickup latitude.
parcel.pickup.longitudefloatPickup longitude.
parcel.pickup.namestringPickup contact name.
parcel.pickup.phone_numberstringPickup contact phone number.
parcel.pickup.parcel_typeintegerCategory ID.
parcel.pickup.itemsarrayItems included in the pickup payload.
parcel.receiverarrayReceiver stop(s) with address, contact, items, and time windows.
parcel.receiver[].dropoff_ready_atintegerDropoff ready time (Unix seconds).
parcel.receiver[].dropoff_deadline_atintegerLatest acceptable dropoff time (Unix seconds).
parcel.riderobjectAssigned rider info (may be absent until assigned).
parcel.rider.namestringRider name.
parcel.rider.numberstringRider phone number.
parcel.rider.profile_picturestringRider profile picture path or URL.
parcel.rider.typestringVehicle type (e.g. bike).
parcel.rider.registration_numberstringVehicle registration number.
parcel.support_numberstringCustomer support phone number.
parcel.pickup_proof_imgstringPickup proof image URL (if available).
parcel.dropoff_proof_imgstringDropoff proof image URL (if available).
parcel.sender_collectable_amountfloatCollectable amount of sender for payment on delivery order
parcel.sender_payout_feefloatFee for payout of payment on delivery order
parcel.sender_cod_service_feefloatPayment on delivery service fee taken by pathao

Create Payout Method

POST
Endpoint:/api/v1/ondemand/parcels/payout-methods
Creates a new payout method(bkash) for a parcel.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/payout-methods' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
   "payout_method": "BKASH",
   "account_type": "PERSONAL",
   "account_number": "015XXXXXX49"
}'
Request Parameters
Field NameField TypeRequiredDescription
payout_methodstringYesProvider identifier. Currently only BKASH is supported.
account_typestringYesType of the payout account (e.g. PERSONAL, BUSINESS).
account_numberstringYesAccount number for the payout method.
Success Response
201
{ "payout_method": "BKASH", "account_type": "PERSONAL", "masked_number": "015XXXXXX49", "slug": "84cf4c66262f53771bd547df", "is_default": true }
Response Data
Field NameField TypeDescription
payout_methodstringThe provider identifier.
account_typestringThe account type (PERSONAL or MERCHANT).
masked_numberstringThe account number.
slugstringUnique identifier for the created payout method; use in Update and Delete.
is_defaultbooleantrue if this is the user’s first (and thus default) payout method.

Get Payout Methods

GET
Endpoint:/api/v1/ondemand/parcels/payout-methods
Returns the user’s saved payout methods (filtered to city/country-allowed methods) along with any additional payout options not yet added.
curl \
  --location '{{base_url}}/api/v1/ondemand/parcels/payout-methods?lang=en' \
  --header 'Authorization: Bearer {{access_token}}'
Request Parameters
Field NameField TypeRequiredDescription
langstringNoLanguage for localized response text (en | bn | ne).
from_portalboolNoWhether the request originated from the commerce portal.
Success Response
200
{ "payout_methods": [ { "name": "Bkash", "method": "BKASH", "account_type": "PERSONAL", "account_type_spec": { "merchant": { "account_number_min_length": 10, "account_number_max_length": 10 }, "personal": { "account_number_min_length": 11, "account_number_max_length": 11 } }, "masked_number": "01767191651", "slug": "84cf4c66262f53771bd547df", "icon": "/assets/rebranded-pathao-pay-ic-e8c46d37.png", "notes": { "icon": "/assets/famicons-flash-ic-9eba33b3.png", "text": [ "Instant transfer", "No charges" ], "text_color": "#025BE8" }, "is_default": true } ], "available_options": [] }
Response Data
Field NameField TypeDescription
payout_methodsarrayUser’s saved and active payout methods, filtered to city/country-allowed methods.
payout_methods[].namestringDisplay name of the provider (from config).
payout_methods[].methodstringPayout method identifier (BKASH, NAGAD, PATHAO_PAY).
payout_methods[].account_typestringAccount type: PERSONAL or MERCHANT.
payout_methods[].account_type_specobjectMap of account types to their number length constraints.
payout_methods[].account_type_spec.merchant.account_number_min_lengthintegerMinimum account number length for MERCHANT accounts.
payout_methods[].account_type_spec.merchant.account_number_max_lengthintegerMaximum account number length for MERCHANT accounts.
payout_methods[].account_type_spec.personal.account_number_min_lengthintegerMinimum account number length for PERSONAL accounts.
payout_methods[].account_type_spec.personal.account_number_max_lengthintegerMaximum account number length for PERSONAL accounts.
payout_methods[].masked_numberstringMasked account/mobile number.
payout_methods[].slugstringUnique identifier for this payout method; use in Update and Delete.
payout_methods[].iconstringURL to the provider icon.
payout_methods[].notesobjectInformational notes about this method.
payout_methods[].notes.iconstringIcon identifier for the note (e.g. "info").
payout_methods[].notes.textarrayLocalized note strings (follows lang).
payout_methods[].notes.text_colorstringHex color for note text.
payout_methods[].is_defaultbooleanWhether this is the user’s default payout method.
available_optionsarrayPayout methods the user has not yet added, available in their city/country.
available_options[].namestringDisplay name.
available_options[].methodstringPayout method identifier.
available_options[].iconstringURL to the provider icon.
available_options[].notesobjectInformational notes (same structure as payout_methods[].notes).
available_options[].account_typeobjectMap of supported account types to number length constraints.

Update Payout Method

PATCH
Endpoint:/api/v1/ondemand/parcels/payout-methods/{slug}
Sets a payout method as the user’s default. The previously default method is automatically unset. Only the make_default action is supported.
curl \
  --location \
  --request PATCH '{{base_url}}/api/v1/ondemand/parcels/payout-methods/{{slug}}?lang=en' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
   "make_default": true
}'
Request Parameters
Field NameField TypeRequiredDescription
slugstringYesPayout method slug from Create or Get Payout Methods.
langstringNoLanguage for localized response text (en | bn | ne).
make_defaultbooleanYesMust be true. Sets this method as the default.
Success Response
200
{ "payout_method": "BKASH", "account_type": "PERSONAL", "masked_number": "015XXXXXX49", "slug": "84cf4c66262f53771bd547df", "is_default": true }
Response Data
Field NameField TypeDescription
payout_methodstringThe provider identifier.
account_typestringThe account type.
masked_numberstringThe (masked) account number.
slugstringThe payout method slug.
is_defaultbooleanAlways true after a successful update.

Delete Payout Method

DELETE
Endpoint:/api/v1/ondemand/parcels/payout-methods/{slug}
Deletes (deactivates) a payout method. If the deleted method was the default, the next remaining method is automatically promoted to default.
curl \
  --location \
  --request DELETE '{{base_url}}/api/v1/ondemand/parcels/payout-methods/{{slug}}' \
  --header 'Authorization: Bearer {{access_token}}'
Request Parameters
Field NameField TypeRequiredDescription
slugstringYesPayout method slug from Create or Get Payout Methods.
Success Response
200
{ "message": "payout method deleted successfully" }
Response Data
Field NameField TypeDescription
messagestringConfirmation of successful deletion.