Integration Manual
The manual is designed to make integration swift and easy and to cover possible case scenarios with sample codes and guides.
Introduction
Make your transactions quick and easy. Experience fast, secure, and hassle-free payments with AssanPay - designed to simplify your financial transactions anytime, anywhere.
- Cross-Browser: AssanPay ensures seamless performance across all major web browsers, providing a consistent and reliable user experience.
- Amazing Features: Secure, fast, and user-friendly payment solutions - all in one platform.
- Easy Payment: Simplify transactions with secure and hassle-free payments.
Workflow Is What We Do
Redirect User to Payment Page (Redirectional/Cashier Model)
Base URL
Base URLhttps://api.assanpay.com
Initiate a Payment Request
Method: POST
Endpoint: /payment-request/{merchantId}
Full Example
Endpointhttps://api.assanpay.com/payment-request/{merchantId}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| merchantId | String | Required | Unique Merchant ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| amount | String | Required | Payment amount (natural numbers or float with two decimal number) |
| order_id | String | Optional | Unique order reference for tracking. Length must be 20 characters or less without any special characters |
| store_name | String | Required | Name of the store making the payment request |
| link | String | Optional | URL must be in https:// to redirect after payment (success/failure). |
Example
Request Body (JSON){
"amount": "10",
"order_id": "12340", // must be unique
"store_name": "Your store",
"link": "https://www.google.com", // must be in https://
}
Responses
| Code | Description | Links |
|---|---|---|
| 200 | Payment Request created successfully | No Links |
| 500 | Internal Server Error (Error for Required fields) | No Links |
| 500 | Internal Server Error (Unique constraint failed on the fields: tried to insert a duplicate transactionId into the database) | No Links |
Successful Response
Response (200 - Success){
"status": "true",
"message": "Payment request created successfully",
"data": {
"id": "ddc6b617-3126-4866-9782-c68f535034b6",
"transactionId": "T202512181151100kr4f",
"amount": "10",
"description": "null",
"dueDate": "null",
"status": "pending",
"link": "/pay/ddc6b617-3126-4866-9782-c68f535034b6",
"metadata": {
"return_url": "yourUrl.com"
},
"provider": "null",
"userId": "5",
"createdAt": "2025-12-18T06:51:10.839Z",
"updatedAt": "2025-12-18T06:51:10.848Z",
"deletedAt": "null",
"merchant_transaction_id": "12340",
"completeLink": "https://merchant.assanpay.com/aik-qr/ddc6b617-3126-4866-9782-c68f535034b6",
"order_id": "12340"
}
}
Failure Example (200) - Order Id already exists
Response (200 - Duplicate){
"success": "true",
"message": "Order Id already exists",
"data": "{}",
"statusCode": "200"
}
Failure Example (500/400) - Required field missing / Transaction not Created
Response (400/500 - Error){
"statusText": "error",
"status": 400,
"message": "Argument `amount` is missing."
}
{
"statusText": "fail",
"status": "400",
"message": "Transaction not Created"
}
{
"status": "error",
"message": "Something went wrong"
}
Status Inquiry
This endpoint allows you to inquire about the payment status using the order ID.
Base URL
Base URLhttps://api.assanpay.com
Endpoint
Method: GET
Path: /payment/all-inquiry/
Full Example
Endpointhttps://api.assanpay.com/payment/all-inquiry/{merchantId}?transactionId=orderId
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| transactionId | String | Required | The order ID of the payment |
No Request Body
Status Responses
| Code | Description | Links |
|---|---|---|
| 200 | Payment status retrieved successfully | No Links |
| 404 | Payment Data Not Found | No Links |
Successful Response
Response (200 - Success){
"status": "true",
"message": "Payment status retrieved successfully",
"data": {
"orderId": "12340",
"transactionStaus": "Pending",
"transactionAmount": "10",
"transactionDateTime": "2025-12-18T06:51:10.836Z",
"responseDesc": null,
"responseMode": "MA"
}
}
Failure Example (404) - Payment Data Not Found
Response (404 - Not Found){
"status": "error",
"message": "Failed to retrieve payout status",
"data": {
"status": 404,
"message": "Payment data not found",
"errcode": "validation"
}
}
Thank You
You've Successfully Integrated AssanPay In Your Website.
Have a query? Drop us a message!