
- Tanga
- Payme
- To'lov
- Backend
Payme: three cases the documentation doesn't cover
108
Tanga used to sell PRO by card transfer: the user sends money, uploads a receipt, and I approve it. Automatic payment through Payme was the next step.
In the Merchant API it is Payme that calls the merchant: six JSON-RPC methods, from "can this order be paid?" to "payment done" and "cancel". The HTTP status is always 200 and errors live in the body; amounts are in tiyin and times in milliseconds. A transaction that isn't completed within 12 hours is cancelled with reason 4.
Three cases weren't in the documentation: what to answer after that timeout, what to do when the same order arrives with a different transaction id, and when a completed payment may still be cancelled. Guessing an error code is a bad idea where money is involved, so I took the answers from Payme's official PHP template and wrote down every assumption.
Orders live in a table that doesn't depend on the provider: the price is fixed when the order is created, and an order can have only one active transaction. A refund shortens the PRO period and marks the ledger entry as void.
It shipped with the payment button hidden. A request without a key gets error −32504, which proves the endpoint is live without letting anyone pay yet.
Takeaway: when the docs are silent, read the vendor's reference implementation, and record what you took from it.