↙️ PAYIN — Server Connect
Integrate BoxCharge into your website or app to accept customer payments via secure server-to-server API.
The PAYIN section covers how to integrate BoxCharge into your website or mobile application to accept payments from customers. This server-to-server integration enables secure and seamless payment collection through BoxCharge's API.
- Authenticate API requests
- Create and manage payment sessions
- Handle payment callbacks and verify transactions
- Test the PAYIN flow in sandbox mode before going live
🔖 Essential Integration Parameters
To authenticate and interact with BoxCharge APIs, you need these parameters from your terminal dashboard:
| Parameter | Description |
|---|---|
| baseUrl | Root URL for all API requests (production or sandbox). |
| terNO | Unique merchant terminal identifier. |
| public_key | Terminal public key for API authentication. |
| private_key | Terminal private key — required for encrypted S2S flows. |
Always replace placeholders with exact values from your terminal. Incorrect keys will cause requests to fail.
🔖 API Endpoints Overview
| Environment | baseUrl |
|---|---|
| Production | https://api.boxchrge.com |
| Sandbox / Local | http://localhost:9003 |
POST
{baseUrl}/api/s2sInitiate simple S2S payment session
Remark: 11 mandatory parameters
POST
{baseUrl}/api/s2s/encryptInitiate encrypted S2S payment
Remark: 12 mandatory parameters + AES-256-CBC
GET
{baseUrl}/api/authurl/s2s/{transID}Query transaction status by TransID or reference
Remark: 1 mandatory parameter
POST
{baseUrl}/api/transactions/refund-requestRequest refund for a completed transaction
Remark: 3 mandatory parameters
🔖 Mode of Payment (mop)
| Payment Mode | Code |
|---|---|
| Credit Card | CC |
| Debit Card | DC |
| Net Banking | NB |
| Wallet | WALLET |
| UPI Collect | UPICOLLECT |
| UPI QR & Intent | QRINTENT |
🔖 Test Card Numbers
| Network | Card Number | Type |
|---|---|---|
| Visa | 4111111111111111 | 3DS |
| Visa | 4012000033330026 | Test Approved |
| Visa | 4043409999991437 | Test Declined |
| Mastercard | 5111111111111111 | 3DS |
| Mastercard | 5123450000000008 | Test Approved |
| Mastercard | 5555229999997722 | Test Declined |
🔖 Order Status Codes
| order_status | status |
|---|---|
| 0 | Pending |
| 1 | Approved |
| 2 | Declined |
| 3 | Refunded |
| 5 | Chargeback |
| 7 | Reversed |
| 8 | Refund Pending |
| 9 | Test |
| 10 | Blocked |
| 25 | Test Approved |
| 26 | Test Declined |
| 27 | Test 3DS Authentication |
