Documentation for Integration
Integrate secure payment processing, transaction verification, and payout services using our REST APIs.
Choose Your Integration
REST API
Full control for custom applications and mobile apps.
Shopify
Install the plugin and start accepting payments in minutes.

OpenCart
Upload the extension, configure credentials, and test checkout.

Odoo
Connect Sales, Invoicing and Website checkout seamlessly.
Overview
Welcome to PayStation Integration guide. PayStation provides a secure, flexible, and robust payment gateway solution in Bangladesh. Whether you are selling physical goods, software services, online bookings, or managing payouts, our developer suite offers rich tools for integration.
Hosted Checkout
Redirect customers to our beautiful checkout page supporting cards, mobile wallets, and internet banking.
API Ref Verification
Server-to-server endpoints to verify transaction status and details via secure API keys.
Environments
We maintain separate environments for sandbox testing and production live payments. Ensure you are using the correct credentials and endpoints.
Secret Key Protection
Always keep your store passwords and secret keys securely stored on your backend servers. Do not expose them in clients, frontend scripts, or public GitHub repositories.
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox (Test) | https://sandbox.paystation.com.bd | For building, verifying, and mock payment simulations. |
| Production (Live) | https://api.paystation.com.bd | For routing live customer cards and transaction clearing. |
Authentication
PayStation verifies incoming requests via combination headers and body parameters. For the Initiate Payment API, parameters like `merchantId` and `password` are provided in the payload body. For the Transaction Status APIs, `merchantId` must be supplied inside the HTTP headers.
Error Codes
When an API call returns a response, the `status_code` field reports the outcome.
| Status Code | Status Name | Meaning / Notes |
|---|---|---|
200 | Success | The request was successfully authenticated and executed. |
1008 | Duplicate Invoice | The requested unique invoice number has already been processed. |
2001 | Invalid Token / Not Found | Transaction details could not be resolved or secret key mismatch. |
Hosted Checkout
Redirect the customer to the PayStation Hosted Checkout. Our system lists all native cards, EMI choices, mobile wallets (bKash, Nagad, Rocket, Upay), and bank channels automatically. Once payment is complete, we direct the customer back to your `callback_url` with parameters indicating payment outcomes.
Checkout Integration Flow
- 1Your backend initiates payment to PayStation
- 2Retrieve the secure checkout URL in response
- 3Redirect customer browser to checkout portal
- 4Return callback to success page and capture parameters

Request Body Parameters
| Param | Type | Requirement | Description |
|---|---|---|---|
merchantId | string | Required | Your Merchant ID will be provided by PayStation. Example: 204-16537301811 |
password | string | Required | Your Password will be provided by PayStation. Example: gamepass |
invoice_number | string | Required | Unique invoice number for the transaction. Example: 90011355 |
currency | string | Optional | Currency code for the transaction. Example: BDT |
payment_amount | integer | Required | Transaction amount. Example: 1 |
pay_with_charge | integer | Optional | Will the merchant bear the payment charge or not. If 1, the customer will bear the charge; if 0, the merchant will bear the charge. Example: 1 |
reference | string | Optional | Reference information for the transaction. Example: Some Ref Info |
cust_name | string | Required | Customer's full name. Example: MM |
cust_phone | string | Required | Customer's phone number. Example: 01726315133 |
cust_email | string | Required | Customer's email address. Example: [email protected] |
cust_address | string | Optional | Customer's physical address. Example: Customer address |
callback_url | string (URL) | Required | URL to receive transaction status updates. Example: https://api.paystation.com.bd/payment-success/104 |
checkout_items | string / JSON | Optional | Details of the purchased items. Example: Some text or JSON |
opt_a | string / JSON | Optional | Any optional information. Example: Some text or JSON |
opt_b | string / JSON | Optional | Any optional information. Example: Some text or JSON |
opt_c | string / JSON | Optional | Any optional information. Example: Some text or JSON |
emi | integer | Optional | Send this if you want to do an EMI transaction, otherwise ignore it. Example: 1 |
curl -X POST https://api.paystation.com.bd/initiate-payment \ -H "Accept: application/json" \ -d "merchantId=204-16537301811" \ -d "password=gamepass" \ -d "invoice_number=90011355" \ -d "currency=BDT" \ -d "payment_amount=1" \ -d "reference=Some Ref Info" \ -d "cust_name=MM" \ -d "cust_phone=01726315133" \ -d "[email protected]" \ -d "cust_address=Customer address" \ -d "callback_url=https://api.paystation.com.bd/payment-success/104" \ -d "checkout_items=Some text or JSON"
Response Fields
| Param | Description |
|---|---|
status_code | Status code 200 indicates the request was successful. Any other code indicates failure. |
status | Indicates the status of the request: success or failed. |
message | Provides additional details about the response. Example: Payment Link Created Successfully. |
payment_amount | The amount for the payment. Example: 1 |
invoice_number | The unique invoice number for the transaction. Example: 90011335545343 |
payment_url | The URL for the payment checkout page. Example: https://api.paystation.com.bd/checkout/12117397758013220/ZzHkhjalJ1ulsjuJOdx1mCSN1nj5AGPAvr1BlBjpccTFlC02hX |
{
"status_code": "200",
"status": "success",
"message": "Payment Link Created Successfully.",
"payment_amount": "1",
"invoice_number": "90011335545343",
"payment_url": "https://api.paystation.com.bd/checkout/12117397758013220/ZzHkh..."
}{
"status_code": "1008",
"status": "failed",
"message": "Duplicate invoice number."
}Transaction Status (v1)
Query payment status server-to-server using the unique invoice number generated by your system.
merchantIdcurl -X POST https://api.paystation.com.bd/transaction-status \ -H "merchantId: 104-1653730183" \ -d "invoice_number=2021252525"
Request Parameters
| Param | Location | Type | Requirement | Description |
|---|---|---|---|---|
merchantId | Header | string | Required | Your Merchant ID provided by PayStation. Example: 204-16537301811 |
invoice_number | Body | string | Required | Your unique invoice number that you sent in the initiate payment create API. |
Response Fields
| Param | Description |
|---|---|
status_code | Status code 200 indicates that the request was successfully processed. |
status | Indicates the request status: success or failed. |
message | Provides details about the response. Example: Transaction found |
| data object (Returned if status_code is 200) | |
data.invoice_number | The unique invoice number for the transaction. Example: 90011335545343 |
data.trx_status | Current transaction status. Possible values: processing, success, failed, refund.Processing: indicates the customer initiated the payment process but has not completed it yet. |
data.trx_id | Unique Payment Transaction ID. (Empty if not available) |
data.payment_amount | The transaction amount. Example: 1.00 |
data.order_date_time | The date and time of the transaction. Example: 2025-02-17 13:03:21 |
data.payer_mobile_no | Payer's mobile number. (Empty if not available) |
data.payment_method | Payment method used (bKash/Nagad/Rocket/Upay/Mastercard/Visa). |
data.reference | Reference information sent during the payment creation. Example: Some Ref Info |
data.checkout_items | The checkout items sent in the payment create API. Example: Some text or JSON |
{
"status_code": "200",
"status": "success",
"message": "Transaction found.",
"data": {
"invoice_number": "2021252525",
"trx_status": "Success",
"trx_id": "10XB9900",
"payment_amount": "120",
"order_date_time": "2022-12-25 10:25:30",
"payer_mobile_no": "01700000001",
"payment_method": "bkash",
"reference": "102030",
"checkout_items": "orderItems"
}
}{
"status_code": "200",
"status": "success",
"message": "Transaction found",
"data": {
"invoice_number": "2021252525",
"trx_status": "Failed",
"trx_id": "",
"payment_amount": "120.00",
"order_date_time": "2023-01-14 11:04:42",
"payer_mobile_no": "",
"payment_method": "",
"reference": "102030",
"checkout_items": "orderItems"
}
}{
"status_code": "2001",
"status": "failed",
"message": "Invalid Token."
}Transaction Status (v2)
Query payment status server-to-server using the unique `trxId` returned by PayStation after successful checkouts.
merchantId, Content-Type: application/jsoncurl -X POST https://api.paystation.com.bd/v2/transaction-status \
-H "merchantId: 104-1653730183" \
-H "Content-Type: application/json" \
-d '{"trxId": "CG20D8AYB4"}'Request Parameters
| Param | Location | Type | Requirement | Description |
|---|---|---|---|---|
merchantId | Header | string | Required | Your Merchant ID provided by PayStation. Example: 204-16537301811 |
trxId | Body (JSON) | string | Required | Your unique trxId returned by PayStation in the payment creation response. |
Response Fields
| Param | Description |
|---|---|
status_code | Status code 200 indicates that the request was successfully processed. |
status | Indicates the request status: success or failed. |
message | Provides details about the response. Example: Transaction found |
| data object (Returned if status_code is 200) | |
data.invoice_number | The unique invoice number for the transaction. Example: 90011335545343 |
data.trx_status | Current transaction status. Possible values: processing, success, failed, refund.Processing: indicates the customer initiated the payment process but has not completed it yet. |
data.trx_id | Unique Payment Transaction ID. Example: CG20D8AYB4 |
data.trx_amount | The actual transaction amount. Example: 2 |
data.trx_date | The date when the transaction was made. Format: YYYY-MM-DD. Example: 2025-07-02 |
data.request_amount | The amount requested for the transaction. Example: 2.00 |
data.payment_amount | The payment amount processed. Example: 2.00 |
data.order_date_time | The exact date and time of order creation. Format: YYYY-MM-DD HH:MM:SS. Example: 2025-07-02 20:21:13 |
data.payer_mobile_no | Payer mobile number. (Empty if not available). Example: 01811361428 |
data.payment_method | Payment method used. Possible values: bKash, Nagad, Rocket, Upay, Mastercard, Visa. Example: bKash |
data.reference | Reference information sent during the payment creation. Example: Event Ticket |
{
"status_code": "200",
"status": "success",
"message": "Transaction found",
"data": {
"invoice_number": "59734251219",
"trx_status": "success",
"trx_id": "CG20D8AYB4121",
"trx_amount": 2,
"trx_date": "2025-07-02",
"request_amount": "2.00",
"payment_amount": "2.00",
"order_date_time": "2025-07-02 20:21:13",
"payer_mobile_no": "018*******",
"payment_method": "bKash",
"reference": "Event Ticket"
}
}{
"status_code": "2001",
"status": "failed",
"message": "Transaction not found in system"
}Headers
API calls (particularly v2 endpoints) expect JSON body payload and appropriate headers:
| Header Name | Value / Description |
|---|---|
merchantId | Your store ID provided by PayStation. |
Content-Type | application/json (for POST requests) |
Status Codes
PayStation maps statuses to clean parameters returned in the transaction query response:
• success: Transaction paid successfully.
• processing: Payment initialized by user, but not completed yet.
• failed: Transaction failed at card/wallet authentication.
Support Center
If you encounter issues during payment gateway integration, testing, card transactions, or store registration verification, please contact our merchant onboarding team.