v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Payment Gateways

Authorize payment or setup intent

Authorize a payment intent or setup intent (e.g. Stripe payment intent or Stripe setup intent). Returns clientSecret and optional paymentIntent or setupIntent.

Required scopes: flex.billing.paymentGateways.authorize

post/api/v2/organizations/{orgSlug}/payment-gateways/authorize

Path parameters

orgSlugstring required

organization slug

Request body

locationsstring[] required

Location IDs for which the payment/authorization is being made.

type'stripe' required

The payment provider type. Currently only Stripe is supported.

paymentConfiguration'recurring-payments' | 'one-time-payments' required

The payment configuration (recurring-payments or one-time-payments).

Example request

{
  "locations": [
    "507f1f77bcf86cd799439011"
  ],
  "payment": {
    "currency": "eur",
    "amount": 1000,
    "savePaymentDetails": true
  }
}

Response

clientSecretstring required

The client secret of this intent. Used for client-side retrieval using a publishable key.

paymentIntentstring

Stripe Payment Intent ID when authorizing a payment intent.

setupIntentstring

Stripe Setup Intent ID when authorizing a setup intent.

Example response

{
  "clientSecret": "pi_xxx_secret_yyy",
  "paymentIntent": "pi_xxx",
  "setupIntent": "seti_xxx"
}