{"openapi":"3.1.0","info":{"title":"SB Checkout Client API","version":"2026-08-26","summary":"Origin-bound API for custom and embedded checkout","description":"Use only a payment intent client_secret created by a trusted backend. The store secret key must never enter a browser. Payment method credentials must be tokenized by an SB secure component; raw PAN, CVV, PIN and track data are rejected."},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","servers":[{"url":"/api/checkout/client/v1","description":"Current origin"}],"security":[{"CheckoutClientSecret":[]}],"tags":[{"name":"Payment Intents","description":"Client payment state machine"},{"name":"Payment Methods","description":"Per-intent method discovery"}],"paths":{"/payment-intents/{id}":{"get":{"operationId":"retrieveClientPaymentIntent","summary":"Retrieve the current payment intent state","tags":["Payment Intents"],"parameters":[{"$ref":"#/components/parameters/PaymentIntentId"},{"$ref":"#/components/parameters/Origin"},{"$ref":"#/components/parameters/ApiVersion"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Client-safe payment intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentResponse"}}}},"400":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/payment-intents/{id}/payment-methods":{"get":{"operationId":"listClientPaymentMethods","summary":"List available methods and capabilities for this intent","tags":["Payment Methods"],"parameters":[{"$ref":"#/components/parameters/PaymentIntentId"},{"$ref":"#/components/parameters/Origin"},{"$ref":"#/components/parameters/ApiVersion"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Payment method descriptors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodListResponse"}}}},"400":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/payment-intents/{id}/confirm":{"post":{"operationId":"confirmClientPaymentIntent","summary":"Create or replay one durable confirmation attempt","tags":["Payment Intents"],"parameters":[{"$ref":"#/components/parameters/PaymentIntentId"},{"$ref":"#/components/parameters/Origin"},{"$ref":"#/components/parameters/ApiVersion"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentConfirm"}}}},"responses":{"200":{"description":"Client-safe payment intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentResponse"}}}},"202":{"description":"Provider result is processing or ambiguous. Retrieve this intent; do not submit a new attempt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentResponse"}}}},"400":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Stable Checkout API error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"CheckoutClientSecret":{"type":"http","scheme":"bearer","bearerFormat":"sbpi_test_*_secret_* or sbpi_live_*_secret_*","description":"Short-lived, origin-bound client secret for exactly one payment intent."}},"parameters":{"PaymentIntentId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sbpi_(test|live)_"}},"Origin":{"name":"Origin","in":"header","required":true,"schema":{"type":"string","format":"uri"}},"ApiVersion":{"name":"SB-Checkout-Version","in":"header","required":false,"schema":{"type":"string","enum":["2026-08-26"]}},"RequestId":{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string","maxLength":96}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":191,"pattern":"^[A-Za-z0-9._:-]+$"}}},"schemas":{"PaymentIntentConfirm":{"type":"object","additionalProperties":false,"required":["paymentMethod"],"properties":{"paymentMethod":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,47}$"},"returnUrl":{"type":["string","null"],"format":"uri"},"paymentMethodData":{"type":["object","null"],"description":"Secure component or provider token data only.","additionalProperties":true}}},"PaymentIntent":{"type":"object","required":["id","object","status","amount","currency"],"properties":{"id":{"type":"string"},"object":{"type":"string","const":"payment_intent"},"mode":{"type":"string","enum":["TEST","LIVE"]},"livemode":{"type":"boolean"},"status":{"type":"string","enum":["REQUIRES_PAYMENT_METHOD","REQUIRES_CONFIRMATION","REQUIRES_ACTION","PROCESSING","REQUIRES_CAPTURE","SUCCEEDED","CANCELED","EXPIRED"]},"amount":{"type":"number","minimum":0},"currency":{"type":"string"},"paymentMethodTypes":{"type":"array","items":{"type":"string"}},"selectedPaymentMethod":{"type":["string","null"]},"nextAction":{"type":["object","null"],"additionalProperties":true},"lastError":{"type":["object","null"],"additionalProperties":true},"expiresAt":{"type":"string","format":"date-time"},"order":{"type":["object","null"],"additionalProperties":true},"attempts":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"PaymentIntentResponse":{"type":"object","required":["requestId","paymentIntent"],"properties":{"requestId":{"type":"string"},"paymentIntent":{"$ref":"#/components/schemas/PaymentIntent"}}},"MethodListResponse":{"type":"object","required":["requestId","data"],"properties":{"requestId":{"type":"string"},"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"ErrorResponse":{"type":"object","required":["requestId","message","error"],"properties":{"requestId":{"type":"string"},"message":{"type":"string"},"error":{"type":"object","additionalProperties":true}}}}}}