Skip to main content
POST

Complete Checkout Session

Charges the payment token and issues tickets. This is the only endpoint that moves money.
Requires checkout: write, an allowlisted partner key, and a signed request. Signature verification matters most here: it runs over the raw body before parsing, so a tampered amount or a swapped token cannot reach the payment logic.
The session must be ready_for_payment. Completing one that is not returns 409 invalid_session_state.

Path Parameters

string
required
The session to pay.

Body

object
required
object
A final chance to supply or correct the buyer before the ticket is issued.
payment_data accepts a token and nothing else resembling a card. The object is validated strictly: a key like card or card_number is rejected with 400, not ignored.Gomry has no raw-PAN code path. Accepting cardholder data here would move the platform from PCI SAQ-A to SAQ-D, and a card number reaching our logs and request traces is the one failure that cannot be walked back. If your agent holds a raw card number rather than a token, it cannot complete a Gomry checkout — send the buyer to the event url from the catalog instead.

Response

200 with the session, now status: "completed" and carrying an order. Surface order.permalink_url to your buyer. It opens without a Gomry login and is the same link the confirmation email sends.
completed means tickets exist. We never report completed on a succeeded payment that failed to produce tickets — that would be money taken without a product. If you get completed, the tickets are issued.

Completion is idempotent

Completing an already-completed session returns the existing order rather than charging again, and concurrent complete calls on one session cannot both charge. Always send an Idempotency-Key, and reuse the same one when retrying. If a response is lost in transit, retrying with the same key is safe.

Approval-required tickets

When a tier has requires_approval: true, a successful completion produces a pending request, not admission. The session reports completed and the payment is taken, but the organizer must still approve. Check requires_approval on the catalog detail before selling, and tell your buyer. An agent that reports “you’re going” on an approval-required ticket has told the buyer something untrue.

Failures

amount_mismatch exists so a buyer is never charged a number they did not agree to. Never retry it blindly with the old total; re-read the session and re-confirm.