In this section you'll find basic information about PayStation and how to install and use it properly. If you're a first-time user, you should read the Getting Started section first.
Here, you will redirect the customer to the PayStation Hosted page to display the payment channels. The customer will be redirected after completing payment to your website with the payment response.

We have both Live and Test/Sandbox environments in PayStation. You just need to use the proper URL and Store ID to process payments. We provide separate store IDs for live and test.
Live Environment
All transactions made using this environment are counted as real transactions. The URL starts with https://api.paystation.com.bd.
API NAME: Initiate Payment
API URL: https://api.paystation.com.bd/initiate-payment
METHOD: POST
| PARAM_NAME | DATA_TYPE | DESCRIPTION |
|---|---|---|
merchantId | string | (Mandatory) Your Merchant ID will be provided by PayStation. Example: 204-16537301811 |
password | string | (Mandatory) Your Password will be provided by PayStation. Example: gamepass |
invoice_number | string | (Mandatory) Unique invoice number for the transaction. Example: 90011355 |
currency | string | Currency code for the transaction. Example: BDT |
payment_amount | integer | (Mandatory) Transaction amount. Example: 1 |
pay_with_charge | integer | Will the merchant bear the payment charge or not. Example: 1 |
reference | string | Reference information for the transaction. Example: Some Ref Info |
cust_name | string | (Mandatory) Customer's full name. Example: MM |
cust_phone | string | (Mandatory) Customer's phone number. Example: 01726315133 |
cust_email | string | (Mandatory) Customer's email address. Example: [email protected] |
cust_address | string | Customer's physical address. Example: Customer address |
callback_url | string (URL) | (Mandatory) URL to receive transaction status updates. Example: https://api.paystation.com.bd/payment-success/104 |
checkout_items | string / JSON | Details of the purchased items. Example: Some text or JSON |
opt_a | string / JSON | Any optional information. Example: Some text or JSON |
opt_b | string / JSON | Any optional information. Example: Some text or JSON |
opt_c | string / JSON | Any optional information. Example: Some text or JSON |
emi | integer | Send this if you want to do an EMI transaction, otherwise ignore it. Example: 1 |
| PARAM_NAME | 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 |
1. PHP CURL SCRIPT:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.paystation.com.bd/initiate-payment',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'invoice_number' => '90011335545343',
'currency' => 'BDT',
'payment_amount' => '1',
'reference' => 'Some Ref Info',
'cust_name' => 'MM',
'cust_phone' => '01726315133',
'cust_email' => '[email protected]',
'cust_address' => 'Customer address',
'callback_url' => 'https://api.paystation.com.bd/payment-success/104',
'checkout_items' => 'Some text or JSON',
'merchantId' => '1104-164354',
'password' => 'gameone'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
2. SUCCESS RESPONSE (json format):
{
"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/ZzHkhjalJ1ulsjuJOdx1mCSN1nj5AGPAvr1BlBjpccTFlC02hX"
}
3. FAILED RESPONSE (json format):
{
"status_code": "1008",
"status": "failed",
"message": "Duplicate invoice number."
}
After completing the payment, we will send the payment information to the callback URL that you provided in the create payment API. The payment details will be sent via the URL parameters in the callback request.
Example: http://yourdomain.com/success.php?status=Successful&invoice_number=2021252525&trx_id=10XB9900
URL Parameters
| PARAM_NAME | DESCRIPTION |
|---|---|
status | Payment Status: Successful/Failed/Canceled |
invoice_number | Your unique invoice_number that you sent in the payment create API. |
invoice_number | Payment Transaction ID (you will get trx_id for successful payments only). |
API NAME: TRANSACTION STATUS
API URL: https://api.paystation.com.bd/transaction-status
METHOD: POST
| PARAM_NAME | DESCRIPTION |
|---|---|
| Request Header Parameter | |
merchantId | (Mandatory) Your Merchant ID provided by PayStation. Example: 204-16537301811 |
| Request Body | |
invoice_number | (Mandatory) Your unique invoice number that you sent in the initiate payment create API. |
| PARAM_NAME | 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 (Returned if status_code is 200) | |
invoice_number | The unique invoice number for the transaction. Example: 90011335545343 |
trx_status | Current transaction status. Possible values: processing, success, failed, refund.Example: processing.Processing: This status indicates that the customer has initiated the payment process but has not yet completed the transaction. |
trx_id | Unique Payment Transaction ID. (Empty if not available) |
payment_amount | The transaction amount. Example: 1.00 |
order_date_time | The date and time of the transaction. Example: 2025-02-17 13:03:21 |
payer_mobile_no | Payer's mobile number. (Empty if not available) |
payment_method | Payment method used (bKash/Nagad/Rocket/Upay/Mastercard/Visa). (Empty if not available) |
reference | Reference information sent during the payment creation. Example: Some Ref Info |
checkout_items | The checkout items sent in the payment create API. Example: Some text or JSON |
1. PHP CURL REQUEST:
$header = array(
'merchantId:104-1653730183'
);
$body = array(
'invoice_number' => "2021252525"
);
$url = curl_init("https://api.paystation.com.bd/transaction-status");
curl_setopt($url, CURLOPT_HTTPHEADER, $header);
curl_setopt($url, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($url, CURLOPT_RETURNTRANSFER, true);
curl_setopt($url, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($url, CURLOPT_POSTFIELDS, $body);
curl_setopt($url, CURLOPT_FOLLOWLOCATION, 1);
$responseData = curl_exec($url);
curl_close($url);
2. SUCCESS RESPONSE (json format):
{
"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"
}
}
3. SUCCESS RESPONSE (BUT TRANSACTION FAILED):
{
"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"
}
}
4. FAILED RESPONSE (json format):
{
"status_code": "2001",
"status": "failed",
"message": "Invalid Token."
}
API NAME: TRANSACTION STATUS by TRANSACTION ID
API URL: https://api.paystation.com.bd/v2/transaction-status
METHOD: POST
| PARAM_NAME | DESCRIPTION |
|---|---|
| Request Header Parameter | |
merchantId | (Mandatory)Your Merchant ID provided by PayStation. Example: 204-16537301811 |
| Request Body | |
trxId | (Mandatory)Your unique trxId that you sent in the payment create API. |
| PARAM_NAME | 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 (Returned if status_code is 200) | |
invoice_number | The unique invoice number for the transaction. Example: 90011335545343 |
trx_status | Current transaction status. Possible values: processing, success, failed, refund.Example: processing.Processing: This status indicates that the customer has initiated the payment process but has not yet completed the transaction. |
trx_id | Unique Payment Transaction ID. (Empty if not available) Example: CG20D8AYB4 |
trx_amount | The actual transaction amount. Example: 2 |
trx_date | The date when the transaction was made. Format: YYYY-MM-DDExample: 2025-07-02 |
request_amount | The amount requested for the transaction. Example: 2.00 |
payment_amount | The payment amount processed. Example: 2.00 |
order_date_time | The exact date and time of order creation. Format: YYYY-MM-DD HH:MM:SSExample: 2025-07-02 20:21:13 |
payer_mobile_no | Payer mobile number. (Empty if not available) Example: 01811361428 |
payment_method | Payment method used. Possible values: bKash, Nagad, Rocket, Upay, Mastercard, Visa. (Empty if not available)Example: bKash |
reference | Reference information sent during the payment creation. Example: Event Ticket |
1. PHP CURL REQUEST:
$header = array(
'merchantId:104-1653730183'
);
$body = array(
'trxId' => "2021252525"
);
curl --location 'https://api.paystation.com.bd/v2/transaction-status' --header 'merchantId: ***********' --header 'Content-Type: application/json' --data '{
"trxId":""
}'
2. SUCCESS RESPONSE (json format):
{
"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"
}
}
}
3. FAILED RESPONSE (json format):
{
"status_code": "2001",
"status": "failed",
"message": "Transaction not found in system"
}