Saltar al contenido principal

Payments API

Auto-generated from the OpenAPI spec. Run node docs-site/scripts/fetch-openapi.js to regenerate.

POST /api/v1/payments/stripe/checkout​

Stripe Checkout

Create a one-off Stripe Checkout Session for a membership type.

Requires the studio to have Stripe connected and self-service purchases enabled. Note that no shipped client calls this endpoint — the mobile app and widget both use POST /api/billing/checkout-session instead — but it is reachable with any client access token, so it is validated and tested on the same terms.

success_url and cancel_url must be destinations Agon recognises: the agon:// mobile deep-link scheme, the widget's own origin, this studio's tunnel URL, or a loopback address. Anything else is refused with 400 CHECKOUT_INVALID_REDIRECT_URL before any Stripe object is created — an arbitrary redirect would let this studio's Stripe account mint a studio-branded checkout session pointing at someone else's site.

Request body

FieldRequiredTypeDescription
membership_type_idYesinteger
success_urlYesstring
cancel_urlYesstring

Responses

  • 200 — Successful Response
  • 422 — Validation Error

POST /api/v1/payments/{payment_id}/refund​

Refund Payment

Parameters

NameInRequiredTypeDescription
payment_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/payments/{payment_id}​

Get Payment

Parameters

NameInRequiredTypeDescription
payment_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/payments​

List Payments

Parameters

NameInRequiredTypeDescription
client_idqueryNointeger
pagequeryNointeger
page_sizequeryNointeger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

POST /api/v1/payments​

Record Manual Payment

Request body

FieldRequiredTypeDescription
client_idYesinteger
membership_idNointeger
amountYesnumber
currencyNostring
providerNostring
notesNostring

Responses

  • 201 — Successful Response
  • 422 — Validation Error

currency accepts only EUR, GBP, CHF, USD, SEK, NOK, DKK, PLN, CZK and RON, and defaults to EUR. Any other value is rejected with 422.

The list is restricted to currencies whose minor unit is 1/100, because amounts are converted to minor units before reaching the payment provider. A zero-decimal currency would be charged 100 times over.