Skip to content
Navigation

Create a payment session (hosted fields context; Idempotency-Key required)

POST
/v1/payment-sessions

parentOrigin must be a verified checkout origin of the site. testMode false requires a live key and live payments open for the platform and the tenant (LIVE_MODE_DISABLED, TEST_KEY_LIVE_REQUEST). An amount in a currency other than EUR: 422 UNSUPPORTED_CURRENCY. The clientSecret is never stored: a replay derives it again.

Authorization

  • cmsHmac
    API key in header
    required

    Authorization: <token>

Header parameters

  • Idempotency-Key
    string
    required

    Mandatory on every POST. Same key and same request: the stored answer is replayed (Idempotent-Replayed: true); another request: IDEMPOTENCY_KEY_REUSED; still running: IDEMPOTENCY_IN_PROGRESS (409, Retry-After).

    pattern: ^(?!alert:|external:)[A-Za-z0-9_.:-]{8,255}$
  • Api-Version
    optional
    2026-11-18

    Version of the API: absent, the current version answers; an unknown value is refused (API_VERSION_UNSUPPORTED, 400). Every other answer gives the version that produced it.

    default: "2026-11-18"

Request body JSON required

  • siteRef
    string
    required
    pattern: ^[A-Za-z0-9_.:-]{1,64}$
  • parentOrigin
    string
    required
    maxLength: 255 · minLength: 1
  • locale
    string
    required
    pattern: ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8}){0,3}$
  • testMode
    boolean
    required
  • campaignRef
    optional
    string
    pattern: ^[A-Za-z0-9_-]{1,32}$
  • orderRef
    optional
    string
    pattern: ^[A-Za-z0-9][A-Za-z0-9._:/#-]{0,63}$
  • amount
    optional
    object
    • amount
      integer
      required
      maximum: 99999999 · minimum: 0
    • currency
      EUR
      required
  • country
    optional
    string
    pattern: ^[A-Z]{2}$
  • ttlSeconds
    optional
    integer
    maximum: 3600 · minimum: 300
  • metadata
    optional
    map of
    string
  • wallet
    optional
    object
    • amount
      object
      required
      • amount
        integer
        required
        maximum: 99999999 · minimum: 0
      • currency
        EUR
        required
    • recurring
      optional
      object
      • description
        string
        required
        maxLength: 100 · minLength: 1 · pattern: ^[^\p{Cc}\p{Cs}]+$
      • regular
        object
        required
        • amount
          object
          required
          • amount
            integer
            required
            maximum: 99999999 · minimum: 0
          • currency
            EUR
            required
        • interval
          day
          or
          week
          or
          month
          or
          year
          required
        • intervalCount
          integer
          required
          maximum: 365 · minimum: 1
      • managementUrl
        string
        required
        maxLength: 255 · pattern: ^https:\/\/[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?::\d{1,5})?(?:\/[A-Za-z0-9._~-]+)*$
      • offerRef
        optional
        string
        pattern: ^[A-Za-z0-9_-]{1,32}$
      • trial
        optional
        object
        • amount
          object
          required
          • amount
            integer
            required
            maximum: 99999999 · minimum: 0
          • currency
            EUR
            required
        • interval
          day
          or
          week
          or
          month
          or
          year
          required
        • intervalCount
          integer
          required
          maximum: 365 · minimum: 1
      • billingAgreement
        optional
        string
        maxLength: 300 · minLength: 1 · pattern: ^[^\p{Cc}\p{Cs}]+$
  • cardEntry
    optional
    frame
    or
    page
    or
    server
    default: "frame"

Returns

201

Default Response

JSON
  • id
    string
    required
  • clientSecret
    string
    required
  • expiresAt
    string
    required
    format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
  • fields
    object
    required
    • scriptUrl
      string
      required
    • integrity
      string
      required
    • frameOrigin
      string
      required
    • walletOrigin
      optional
      string
    • page
      optional
      object
      • scriptUrl
        string
        required
      • integrity
        string
        required
  • riskMode
    normal
    or
    card_testing
    required
  • acceptedBrands
    array of
    visa
    or
    mastercard
    or
    cb
    or
    amex
    or
    maestro
    required
  • checkout
    object
    required
    • locale
      string
      ·
      one of 7 values
      required
      Allowed values: fr, en, de, es, it, nl, pt
    • methods
      array of
      card
      or
      apple_pay
      or
      google_pay
      required
    • billingAddress
      none
      or
      postal_code
      or
      full
      required
    • appearance
      object
      required
      • textColor
        required
        default: null

        Any of the following:

        • string
        • null
      • backgroundColor
        required
        default: null

        Any of the following:

        • string
        • null
      • borderColor
        required
        default: null

        Any of the following:

        • string
        • null
      • focusColor
        required
        default: null

        Any of the following:

        • string
        • null
      • errorColor
        required
        default: null

        Any of the following:

        • string
        • null
      • placeholderColor
        required
        default: null

        Any of the following:

        • string
        • null
      • borderRadius
        required
        default: null

        Any of the following:

        • integer
        • null
      • fontSize
        required
        default: null

        Any of the following:

        • integer
        • null
      • fontFamily
        required
        default: null

        Any of the following:

        • string
          one of 7 values
          Allowed values: system-ui, sans-serif, serif, Arial, Helvetica, Verdana, Georgia
        • null

default

Problem: the stable code is in code, see x-error-catalog.

JSON
  • type
    string
    required
  • title
    string
    required
  • status
    integer
    required
    maximum: 599 · minimum: 400
  • code
    string
    ·
    one of 81 values
    required
    Allowed values: AMOUNT_LIMIT_EXCEEDED, AMOUNT_MISMATCH, API_VERSION_UNSUPPORTED, AUTH_IP_NOT_ALLOWED, AUTH_KEY_INVALID, AUTH_MALFORMED, AUTH_NONCE_REPLAYED, AUTH_SCOPE_FORBIDDEN, AUTH_SIGNATURE_INVALID, AUTH_TIMESTAMP_OUT_OF_WINDOW, BAD_REQUEST, CAMPAIGN_MISMATCH, CARD_BRAND_UNSUPPORTED, CARD_CVC_INVALID, CARD_EXPIRED, CARD_EXPIRY_INVALID, CARD_HOLDER_INVALID, CARD_NOT_ACCEPTED, CARD_NUMBER_INVALID, CARD_REF_INVALID, CARD_REF_USED, CARD_TOKEN_REVOKED, CARD_VERIFICATION_NOT_AVAILABLE, CONFLICT, CONNECTOR_ACCOUNT_MISMATCH, CONNECTOR_AUTH_FAILED, CONNECTOR_CAPABILITY_MISSING, CONNECTOR_DISABLED, CONNECTOR_ERROR, CONNECTOR_UNAVAILABLE, CUSTOMER_DATA_REQUIRED, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_KEY_MISSING, IDEMPOTENCY_KEY_REUSED, INTERNAL_ERROR, LIVE_MODE_DISABLED, METHOD_NOT_ALLOWED, MID_PAUSED, MID_TRANSFER_NOT_POSSIBLE, NOT_FOUND, ORIGIN_NOT_ALLOWED, PAGE_CARD_ENTRY_DISABLED, PAYLOAD_TOO_LARGE, PAYMENT_INVALID_STATE, PAYMENT_IN_PROGRESS, PAYMENT_METHOD_NOT_ALLOWED, POST_PURCHASE_LIMIT_REACHED, POST_PURCHASE_STEP_DONE, POST_PURCHASE_TOKEN_INVALID, POST_PURCHASE_WINDOW_CLOSED, PROCESSOR_NOT_ENABLED, RATE_LIMITED, REFUND_EXCEEDS_CAPTURED, REFUND_NOT_SUPPORTED, RENEWAL_ALREADY_PAID, RENEWAL_RETRY_NOT_ALLOWED, RENEWAL_RETRY_TOO_EARLY, REQUEST_ORIGIN_FORBIDDEN, RISK_VELOCITY_LIMIT, SANDBOX_ONLY, SERVER_CARD_ENTRY_DISABLED, SERVICE_UNAVAILABLE, SESSION_EXPIRED, SESSION_INVALID_STATE, SESSION_LIMIT_REACHED, SESSION_SECRET_INVALID, SITE_DISABLED, SITE_UNKNOWN, TEST_CARD_REQUIRED, TEST_KEY_LIVE_REQUEST, UNSUPPORTED_CURRENCY, UNSUPPORTED_MEDIA_TYPE, VALIDATION_FAILED, VOID_NOT_SUPPORTED, WALLET_AMOUNT_MISMATCH, WALLET_MERCHANT_VALIDATION_FAILED, WALLET_NOT_AVAILABLE, WALLET_TOKEN_INVALID, WEBHOOK_URL_NOT_ALLOWED, ZERO_AMOUNT_REQUIRES_AUTHORIZE_ONLY
  • requestId
    string
    required
  • retryable
    boolean
    required
  • detail
    optional
    string
  • errors
    optional
    array of
    object
    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

Type to search…

↑↓ navigate↵ selectEsc close