What it does
Collect an additional amount against an already-placed order, addressed by your own
vendor_order_ref — e.g. a metered fare that ran past the estimate. Requires additional_charges_enabled on the mini app. One additional charge per order — once a charge is collected, further charges on the same order are rejected. Each charge is also capped at the mini app's configured maximum. Idempotent on vendor_charge_ref.Path
amountRequired
The extra amount to collect, as a decimal string.
reason
Reason shown on the receipt. ≤ 255 chars.
vendor_charge_ref
Idempotency key for this charge (1–40 chars). Re-sending the same ref replays the original charge instead of collecting again.
Request schema
{
"amount": <string, decimal>, // required, > 0
"reason": <string, ≤255>, // optional
"vendor_charge_ref": <string, 1..40> // optional — idempotency key
}Response
replayedboolean
true when the same vendor_charge_ref was seen before — the original charge is returned and nothing new is collected.data.collected_viastring
Which leg settled it:
card (saved card, off-session), wallet, or negative_balance (recorded as debt, recovered from future credits).data.shortfallstring, decimal
The portion recorded as a negative wallet balance.
0.00 when fully collected.error_code (on 4xx)string
ADDITIONAL_CHARGES_NOT_ENABLED (403), ORDER_NOT_CHARGEABLE (409), ORDER_ALREADY_CHARGED (409 — one charge per order), CHARGE_EXCEEDS_LIMIT (422 — over the mini app's maximum), INVALID_AMOUNT (400). Only orders in paid / processing / completed can be charged.Response schema
// 201 Created — charge collected (200 on idempotent replay)
{
"status": true,
"replayed": <boolean>,
"data": {
"charge_uuid": "7b1e…",
"vendor_order_ref": "VND-CART-9b3f12",
"amount": "5.00",
"currency": "SAR",
"reason": "Trip ran 8 min over the estimate",
"status": "collected",
"collected_via": "card", // card | wallet | negative_balance
"shortfall": "0.00",
"payment_id": "pay_abc",
"created_at": "…",
"updated_at": "…"
},
"message": "Charge collected"
}
// 403 ADDITIONAL_CHARGES_NOT_ENABLED — not enabled for this mini app
// 409 ORDER_NOT_CHARGEABLE — order is created (unpaid) / cancelled / refunded
// 409 ORDER_ALREADY_CHARGED — this order already took its one additional charge
// 422 CHARGE_EXCEEDS_LIMIT — amount is above the mini app's maximum additional charge
{
"status": false,
"error_code": "ORDER_ALREADY_CHARGED",
"message": "this order has already taken an additional charge; only one is allowed"
}Try it
Base URL
https://microservices.shoppinggate.app/mini-app-core/