Create a charge
Take a payment. A repeated `idempotency_key` returns the original charge with 201 rather than a conflict. A client that did not hear our answer and asked again wants the charge, not an error it has to interpret.
Take a payment.
A repeated idempotency_key returns the original charge with 201 rather
than a conflict. A client that did not hear our answer and asked again
wants the charge, not an error it has to interpret.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/b/v1/charges" \ -H "Content-Type: application/json" \ -d '{ "idempotency_key": "order-1042", "amount_minor": 500000, "currency": "RWF" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "reference": "string", "amount_minor": 0, "fee_minor": 0, "net_minor": 0, "refunded_minor": 0, "currency": "string", "status": "string", "channel": "string", "provider": "string", "failure_reason": "string", "is_test": true, "created_at": "2019-08-24T14:15:22Z", "confirmed_at": "2019-08-24T14:15:22Z", "settled_at": "2019-08-24T14:15:22Z", "expected_settlement_at": "2019-08-24T14:15:22Z", "payer_name": "string"}List charges GET
Most recent first, scoped to your business and your key's mode.
Quote the fee on a charge GET
InversePay's fee on a charge, from your plan, before you open it. Priced exactly as the charge itself will be, so the quote is the fee. To put your own margin on a sale, decide what you want to keep and ask with `net_minor`. On a plan charging 2%, say, keeping 10,000 RWF means charging 10,205 RWF. The fee is on the amount the payer pays, so adding 2% to your price falls just short. `price` is the plan the quote was priced on, so you can price any other amount without asking again: the percentage of the amount, rounded down, plus the flat part, then no less than the floor and no more than the cap.