Galon Cloud
Galon API v1

/projects/{project_id}/mail/checkout

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

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

NameInTypeDescription
project_idpathstring · required
Idempotency-Keyheaderstring · required

Request body

application/json · schema MailCheckout

FieldTypeDescription
versioninteger · required
billing_countrystring
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`.
phonestringThe 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

StatusDescriptionBody
200Existing checkout
201Checkout created
409Journey or idempotency conflict
422Invalid parametersError
503Payment 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}'