Payments / 1 / 1
Payment gateway
A payer pays for an order through a gateway, and the gateway calls your shop four times. What each call means and where money or goods get lost.
- 14 min
- Intermediate
- 9 steps
- Reply p95
- 120 ms
- Double charges
- 0 /day
- Shipped unpaid
- 0 /day
- request
- reply
- redelivery
- duplicate
- lost
Numbers are a model scenario, not measurements
The real request
Gateway → Shop APIRequest
POST /merchant/rpc HTTP/1.1
Content-Type: application/json
Authorization1: hidden
{
"jsonrpc": "2.0",
"method": "CheckPerformTransaction",
"params": {
"amount": 2500000,
"account": { "order_id": 3"1042" }
},
"id": 1
}
Response
HTTP/1.1 200 OK
{
"jsonrpc": "2.0",
"result": { "allow": 4true },
"id": 1
}
Authorization· hidden — The gateway proves it is the gateway. A shared secret, hidden here.amount— In the smallest unit (tiyin):500000is 5 000 so'm. Never a float.order_id— Your own order number, which the payer typed or the payment link carried.allow— Yes: the order exists, is unpaid and the amount matches.