↙️ 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:

ParameterDescription
baseUrlRoot URL for all API requests (production or sandbox).
terNOUnique merchant terminal identifier.
public_keyTerminal public key for API authentication.
private_keyTerminal 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

EnvironmentbaseUrl
Productionhttps://api.boxchrge.com
Sandbox / Localhttp://localhost:9003
POST{baseUrl}/api/s2s
Initiate simple S2S payment session
Remark: 11 mandatory parameters
POST{baseUrl}/api/s2s/encrypt
Initiate 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-request
Request refund for a completed transaction
Remark: 3 mandatory parameters

🔖 Mode of Payment (mop)

Payment ModeCode
Credit CardCC
Debit CardDC
Net BankingNB
WalletWALLET
UPI CollectUPICOLLECT
UPI QR & IntentQRINTENT

🔖 Test Card Numbers

NetworkCard NumberType
Visa41111111111111113DS
Visa4012000033330026Test Approved
Visa4043409999991437Test Declined
Mastercard51111111111111113DS
Mastercard5123450000000008Test Approved
Mastercard5555229999997722Test Declined

🔖 Order Status Codes

order_statusstatus
0Pending
1Approved
2Declined
3Refunded
5Chargeback
7Reversed
8Refund Pending
9Test
10Blocked
25Test Approved
26Test Declined
27Test 3DS Authentication
Talk