POST /projects/{project_id}/mail/checkout
Create or resume payment for a Galon Mail product
The server re-reads the confirmed product and quote; the price is in US dollars, for reference; the exact amount charged is shown before payment. `payment_method` is an identifier returned by `GET /billing/payment-methods` for the billing country: a method not offered for that country is refused (422 `mail_payment_method_unavailable`). Payment releases no sending until the signed, matching confirmation of the secure payment.
Console session only (signed-in console).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id | path | string · required | |
Idempotency-Key | header | string · required |
Request body
application/json · schema MailCheckout
| Field | Type | Description |
|---|---|---|
version | integer · required | |
billing_country | string | |
payment_method | "card" | "mobile_money" | "carte" | An identifier from `GET /billing/payment-methods` for this country; if absent: card. `carte` is still accepted as a legacy alias of `card`. |
phone | string | The client's phone number, in international format ('+225 07 00 00 00 00', reduced to E.164), required when the card is charged through a subscription with a payment provider that requests it; if absent in that case: 422 `mail_checkout_phone_required`. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Existing checkout | |
201 | Checkout created | |
409 | Journey or idempotency conflict | |
422 | Invalid parameters | Error |
503 | Payment unavailable or state to reconcile |
Examples
curl
curl -X POST "$GALON_API_BASE/projects/<project_id>/mail/checkout" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Idempotency-Key: <unique-key>" \
-H "Content-Type: application/json" \
-d '{"version": 1}'