{
  "components": {
    "parameters": {
      "IdempotencyKey": {
        "description": "Replays the stored response for 24 h; reusing it with another body returns 409.",
        "in": "header",
        "name": "Idempotency-Key",
        "required": false,
        "schema": {
          "maxLength": 255,
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Error"
      }
    },
    "schemas": {
      "Address": {
        "description": "Postal address.",
        "properties": {
          "city": {
            "description": "",
            "type": "string"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2.",
            "type": "string"
          },
          "line1": {
            "description": "",
            "type": "string"
          },
          "line2": {
            "description": "",
            "type": "string"
          },
          "postal_code": {
            "description": "",
            "type": "string"
          },
          "state": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CancelInput": {
        "description": "",
        "properties": {
          "at_period_end": {
            "description": "Keep access until the period ends.",
            "type": "boolean"
          },
          "reason": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChangePlanInput": {
        "description": "",
        "properties": {
          "items": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "proration_behavior": {
            "description": "Provider-managed only.",
            "enum": [
              "create_prorations",
              "none",
              "always_invoice"
            ],
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CheckoutCustomer": {
        "description": "Customer to create or match (by external_id) for the session.",
        "properties": {
          "billing_address": {
            "$ref": "#/components/schemas/Address"
          },
          "country": {
            "description": "",
            "type": "string"
          },
          "email": {
            "description": "",
            "type": "string"
          },
          "external_id": {
            "description": "Your user id; creates or matches the customer.",
            "type": "string"
          },
          "id": {
            "description": "Existing cus_…",
            "type": "string"
          },
          "locale": {
            "description": "",
            "type": "string"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "phone": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckoutSession": {
        "description": "A hosted checkout page for one customer.",
        "properties": {
          "allowed_methods": {
            "description": "",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "amount_total": {
            "description": "Minor units.",
            "format": "int64",
            "type": "integer"
          },
          "cancel_url": {
            "description": "",
            "type": "string"
          },
          "client_reference_id": {
            "description": "",
            "type": "string"
          },
          "completed_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "description": "cus_…",
            "type": [
              "string",
              "null"
            ]
          },
          "eligible_methods": {
            "description": "Kinds the customer can use (creation only).",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "expires_at": {
            "description": "",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "cs_…",
            "type": "string"
          },
          "invoice": {
            "description": "inv_…",
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "locale": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "mode": {
            "description": "",
            "enum": [
              "payment",
              "subscription",
              "setup"
            ],
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "checkout.session"
            ],
            "type": "string"
          },
          "setup_payment_method": {
            "description": "pm_…",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "",
            "enum": [
              "open",
              "complete",
              "expired"
            ],
            "type": "string"
          },
          "subscription": {
            "description": "sub_…",
            "type": [
              "string",
              "null"
            ]
          },
          "success_url": {
            "description": "",
            "type": "string"
          },
          "url": {
            "description": "Hosted page; only returned on creation.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "status"
        ],
        "type": "object"
      },
      "CheckoutSessionInput": {
        "description": "",
        "properties": {
          "allowed_methods": {
            "description": "Restrict the offer: kinds (\"mobile_money\"), connections (gwc_…) or one method (gwc_…:card). Pinned connections skip their own country rule.",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "cancel_url": {
            "description": "",
            "type": "string"
          },
          "client_reference_id": {
            "description": "",
            "type": "string"
          },
          "currency": {
            "description": "Defaults to the customer’s, then the project’s.",
            "type": "string"
          },
          "customer": {
            "$ref": "#/components/schemas/CheckoutCustomer"
          },
          "customer_id": {
            "description": "Alternative to customer: an existing cus_….",
            "type": "string"
          },
          "expires_in": {
            "description": "Seconds, default from settings (24 h).",
            "format": "int64",
            "type": "integer"
          },
          "items": {
            "description": "Required unless mode is setup.",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "locale": {
            "description": "fr or en.",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "mode": {
            "description": "payment = one-off, subscription = recurring prices, setup = save a method without charging.",
            "enum": [
              "payment",
              "subscription",
              "setup"
            ],
            "type": "string"
          },
          "success_url": {
            "description": "Absolute URL; {SESSION_ID} is replaced.",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "success_url"
        ],
        "type": "object"
      },
      "ConfirmInput": {
        "description": "",
        "properties": {
          "confirm": {
            "description": "false to reject; default true.",
            "type": "boolean"
          },
          "reason": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "CurrencyOption": {
        "description": "Amount of a price in one currency.",
        "properties": {
          "amount": {
            "description": "Minor units (5000 XAF, 900 = 9.00 USD).",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "ISO 4217.",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "amount"
        ],
        "type": "object"
      },
      "Customer": {
        "description": "A person or company that pays you.",
        "properties": {
          "anonymized": {
            "description": "True once personal data was erased.",
            "type": "boolean"
          },
          "billing_address": {
            "$ref": "#/components/schemas/Address"
          },
          "country": {
            "description": "ISO alpha-2.",
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "Preferred currency.",
            "type": [
              "string",
              "null"
            ]
          },
          "default_payment_method": {
            "description": "pm_…",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "",
            "type": "string"
          },
          "external_id": {
            "description": "Your own user id; unique per environment.",
            "type": "string"
          },
          "id": {
            "description": "cus_…",
            "type": "string"
          },
          "locale": {
            "description": "fr or en.",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "customer"
            ],
            "type": "string"
          },
          "phone": {
            "description": "E.164.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object"
        ],
        "type": "object"
      },
      "CustomerInput": {
        "description": "Fields to create or update a customer.",
        "properties": {
          "billing_address": {
            "$ref": "#/components/schemas/Address"
          },
          "country": {
            "description": "ISO alpha-2.",
            "type": "string"
          },
          "currency": {
            "description": "ISO 4217.",
            "type": "string"
          },
          "email": {
            "description": "",
            "type": "string"
          },
          "external_id": {
            "description": "Your user id.",
            "type": "string"
          },
          "locale": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "phone": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Deleted": {
        "description": "",
        "properties": {
          "deleted": {
            "description": "",
            "type": "boolean"
          },
          "id": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "EligibleMethod": {
        "description": "A payment method the customer can use.",
        "properties": {
          "assurance": {
            "description": "",
            "enum": [
              "signed",
              "unsigned",
              "no_status_endpoint"
            ],
            "type": "string"
          },
          "flows": {
            "description": "",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "gateway": {
            "description": "",
            "type": "string"
          },
          "gateway_connection": {
            "description": "gwc_…",
            "type": "string"
          },
          "kind": {
            "description": "",
            "type": "string"
          },
          "label": {
            "description": "",
            "type": "string"
          },
          "needs_phone": {
            "description": "",
            "type": "boolean"
          },
          "operators": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/Operator"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Entitlement": {
        "description": "Access decision for one product.",
        "properties": {
          "entitled": {
            "description": "Whether to grant access now.",
            "type": "boolean"
          },
          "entitled_until": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "features": {
            "additionalProperties": true,
            "description": "",
            "type": "object"
          },
          "group_key": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "product_id": {
            "description": "prod_…",
            "type": "string"
          },
          "product_name": {
            "description": "",
            "type": "string"
          },
          "reason": {
            "description": "active, grace_period, …",
            "type": "string"
          },
          "status": {
            "description": "Subscription status.",
            "type": "string"
          },
          "subscription_id": {
            "description": "sub_…",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "entitled"
        ],
        "type": "object"
      },
      "Error": {
        "description": "Error envelope returned with every non-2xx response.",
        "properties": {
          "error": {
            "description": "",
            "properties": {
              "code": {
                "description": "Machine-readable code, e.g. price_currency_unsupported.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable explanation.",
                "type": "string"
              },
              "param": {
                "description": "Request parameter at fault, when relevant.",
                "type": "string"
              },
              "request_id": {
                "description": "Identifier to quote to support.",
                "type": "string"
              },
              "type": {
                "description": "Error category.",
                "enum": [
                  "invalid_request",
                  "authentication",
                  "permission",
                  "not_found",
                  "conflict",
                  "rate_limit",
                  "gateway",
                  "api"
                ],
                "type": "string"
              }
            },
            "required": [
              "type",
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Event": {
        "description": "Something that happened; also the webhook payload.",
        "properties": {
          "api_version": {
            "description": "",
            "type": "string"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "data": {
            "description": "",
            "properties": {
              "object": {
                "additionalProperties": true,
                "description": "The object after the change.",
                "type": "object"
              }
            },
            "type": "object"
          },
          "id": {
            "description": "evt_…",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "event"
            ],
            "type": "string"
          },
          "type": {
            "description": "e.g. subscription.activated, invoice.paid.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type"
        ],
        "type": "object"
      },
      "Invoice": {
        "description": "What a customer owes. The only object that can be paid.",
        "properties": {
          "amount_due": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "amount_paid": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "amount_refunded": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "attempt_count": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "billing_reason": {
            "description": "",
            "enum": [
              "subscription_create",
              "subscription_cycle",
              "subscription_update",
              "manual",
              "checkout"
            ],
            "type": "string"
          },
          "checkout_session": {
            "description": "cs_…",
            "type": [
              "string",
              "null"
            ]
          },
          "collection_method": {
            "description": "",
            "enum": [
              "automatic",
              "send_invoice"
            ],
            "type": "string"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "customer_snapshot": {
            "additionalProperties": true,
            "description": "",
            "type": "object"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "due_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "finalized_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "inv_…",
            "type": "string"
          },
          "lines": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "next_attempt_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "description": "Gap-free number, assigned at finalisation.",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "",
            "enum": [
              "invoice"
            ],
            "type": "string"
          },
          "paid_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "period": {
            "description": "Period this invoice grants (subscription invoices).",
            "properties": {
              "end": {
                "description": "",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "start": {
                "description": "",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "provider_hosted_url": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "provider_invoice_id": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "provider_pdf_url": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "",
            "type": "string"
          },
          "status": {
            "description": "",
            "enum": [
              "draft",
              "open",
              "paid",
              "void",
              "uncollectible"
            ],
            "type": "string"
          },
          "subscription": {
            "description": "sub_…",
            "type": [
              "string",
              "null"
            ]
          },
          "subtotal": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "tax_total": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "voided_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "status"
        ],
        "type": "object"
      },
      "InvoiceInput": {
        "description": "Manual invoice.",
        "properties": {
          "auto_finalize": {
            "description": "",
            "type": "boolean"
          },
          "collection_method": {
            "description": "",
            "enum": [
              "automatic",
              "send_invoice"
            ],
            "type": "string"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "days_until_due": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "items": {
            "description": "",
            "items": {
              "description": "",
              "properties": {
                "amount": {
                  "description": "Ad-hoc line without a price.",
                  "format": "int64",
                  "type": "integer"
                },
                "description": {
                  "description": "",
                  "type": "string"
                },
                "price": {
                  "description": "price_…",
                  "type": "string"
                },
                "quantity": {
                  "description": "",
                  "format": "int64",
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          }
        },
        "required": [
          "customer",
          "items"
        ],
        "type": "object"
      },
      "InvoiceLine": {
        "description": "",
        "properties": {
          "amount": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "id": {
            "description": "il_…",
            "type": "string"
          },
          "period": {
            "description": "",
            "properties": {
              "end": {
                "description": "",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "start": {
                "description": "",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "price": {
            "description": "price_…",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "tax_amount": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "tax_rate_bp": {
            "description": "Basis points.",
            "format": "int64",
            "type": "integer"
          },
          "unit_amount": {
            "description": "",
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LineItem": {
        "description": "",
        "properties": {
          "price": {
            "description": "price_…",
            "type": "string"
          },
          "quantity": {
            "description": "Default 1.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "price"
        ],
        "type": "object"
      },
      "List": {
        "description": "A page of results, newest first.",
        "properties": {
          "data": {
            "description": "",
            "items": {},
            "type": "array"
          },
          "has_more": {
            "description": "More items exist after this page.",
            "type": "boolean"
          },
          "object": {
            "description": "",
            "enum": [
              "list"
            ],
            "type": "string"
          },
          "url": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "NextAction": {
        "description": "What the customer must do next.",
        "properties": {
          "address": {
            "description": "",
            "type": "string"
          },
          "client_secret": {
            "description": "",
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "social_links: whatsapp, telegram, dikalo, sms.",
            "type": "object"
          },
          "message": {
            "description": "",
            "type": "string"
          },
          "otp_length": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "publishable_key": {
            "description": "",
            "type": "string"
          },
          "redirect_url": {
            "description": "",
            "type": "string"
          },
          "type": {
            "description": "",
            "enum": [
              "redirect",
              "widget",
              "client_secret",
              "ussd_prompt",
              "otp_required",
              "social_links",
              "crypto_address"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "OTPInput": {
        "description": "",
        "properties": {
          "code": {
            "description": "Code typed by the customer; never stored.",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "Operator": {
        "description": "A mobile money operator.",
        "properties": {
          "code": {
            "description": "",
            "type": "string"
          },
          "collection_fee_bp": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "country": {
            "description": "",
            "type": "string"
          },
          "enabled": {
            "description": "",
            "type": "boolean"
          },
          "id": {
            "description": "gwo_…",
            "type": "string"
          },
          "kind": {
            "description": "",
            "type": "string"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "requires_browser": {
            "description": "",
            "type": "boolean"
          },
          "requires_otp": {
            "description": "",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Payment": {
        "description": "One attempt to collect an invoice through one gateway.",
        "properties": {
          "amount": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "country": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "expires_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_code": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_message": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "flow": {
            "description": "",
            "type": "string"
          },
          "gateway": {
            "description": "stripe, notchpay, …",
            "type": "string"
          },
          "gateway_connection": {
            "description": "gwc_…",
            "type": "string"
          },
          "id": {
            "description": "pay_…",
            "type": "string"
          },
          "initiated_by": {
            "description": "",
            "type": "string"
          },
          "invoice": {
            "description": "inv_…",
            "type": "string"
          },
          "method_kind": {
            "description": "",
            "type": "string"
          },
          "needs_manual_review": {
            "description": "",
            "type": "boolean"
          },
          "next_action": {
            "$ref": "#/components/schemas/NextAction"
          },
          "object": {
            "description": "",
            "enum": [
              "payment"
            ],
            "type": "string"
          },
          "operator": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "otp_attempts_remaining": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "payer_phone": {
            "description": "Masked.",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "description": "pm_…",
            "type": [
              "string",
              "null"
            ]
          },
          "provider_amount": {
            "description": "",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "provider_currency": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "provider_ref": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "retryable": {
            "description": "",
            "type": "boolean"
          },
          "review_reason": {
            "description": "",
            "type": "string"
          },
          "settled_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "",
            "enum": [
              "created",
              "requires_action",
              "processing",
              "succeeded",
              "failed",
              "canceled",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "status"
        ],
        "type": "object"
      },
      "PaymentLink": {
        "description": "A reusable public URL for a price; every visit opens a fresh checkout.",
        "properties": {
          "active": {
            "description": "",
            "type": "boolean"
          },
          "allowed_methods": {
            "description": "Pinned methods (kind, gwc_… or gwc_…:kind). Empty = chosen by the buyer’s country and currency.",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "cancel_url": {
            "description": "",
            "type": "string"
          },
          "checkouts_completed": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "checkouts_opened": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "Empty = customer / project default.",
            "type": "string"
          },
          "id": {
            "description": "plink_…",
            "type": "string"
          },
          "items": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "payment_link"
            ],
            "type": "string"
          },
          "success_url": {
            "description": "",
            "type": "string"
          },
          "url": {
            "description": "Share this URL.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "url"
        ],
        "type": "object"
      },
      "PaymentLinkInput": {
        "description": "",
        "properties": {
          "active": {
            "description": "Update only.",
            "type": "boolean"
          },
          "allowed_methods": {
            "description": "kind (\"mobile_money\"), gwc_… (every kind of a connection) or gwc_…:kind. Pinned connections skip their own country rule.",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "cancel_url": {
            "description": "",
            "type": "string"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "price": {
            "description": "price_… of the catalogue (create only). Give price or price_data.",
            "type": "string"
          },
          "price_data": {
            "description": "Custom amount: a hidden product and price are created for it (new price on every change, so paid invoices keep their amount).",
            "properties": {
              "amount": {
                "description": "Minor units: 25000 XAF, 950 = 9.50 USD.",
                "format": "int64",
                "type": "integer"
              },
              "currency": {
                "description": "ISO 4217.",
                "type": "string"
              },
              "description": {
                "description": "",
                "type": "string"
              },
              "interval": {
                "description": "Recurring only, default month.",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "type": "string"
              },
              "interval_count": {
                "description": "Recurring only, default 1.",
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "What the buyer pays for; required on create.",
                "type": "string"
              },
              "type": {
                "description": "Default one_time.",
                "enum": [
                  "one_time",
                  "recurring"
                ],
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ],
            "type": "object"
          },
          "quantity": {
            "description": "Default 1 (create only).",
            "format": "int64",
            "type": "integer"
          },
          "success_url": {
            "description": "Default: a hosted thank-you page.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentMethod": {
        "description": "A saved card, wallet or mobile money account.",
        "properties": {
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "created_via": {
            "description": "",
            "type": "string"
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "default": {
            "description": "",
            "type": "boolean"
          },
          "display": {
            "description": "",
            "properties": {
              "brand": {
                "description": "",
                "type": "string"
              },
              "email": {
                "description": "",
                "type": "string"
              },
              "exp_month": {
                "description": "",
                "format": "int64",
                "type": "integer"
              },
              "exp_year": {
                "description": "",
                "format": "int64",
                "type": "integer"
              },
              "last4": {
                "description": "",
                "type": "string"
              },
              "msisdn_masked": {
                "description": "",
                "type": "string"
              },
              "operator": {
                "description": "",
                "type": "string"
              }
            },
            "type": "object"
          },
          "gateway": {
            "description": "",
            "type": "string"
          },
          "gateway_connection": {
            "description": "gwc_…",
            "type": "string"
          },
          "id": {
            "description": "pm_…",
            "type": "string"
          },
          "kind": {
            "description": "card, mobile_money, paypal…",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "payment_method"
            ],
            "type": "string"
          },
          "status": {
            "description": "",
            "enum": [
              "active",
              "expired",
              "detached",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object"
        ],
        "type": "object"
      },
      "PaymentMethodRef": {
        "description": "",
        "properties": {
          "payment_method": {
            "description": "pm_…; default method when omitted.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalSessionInput": {
        "description": "",
        "properties": {
          "allowed_actions": {
            "description": "",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "allowed_prices": {
            "description": "Plans offered in “change plan”.",
            "items": {
              "description": "price_…",
              "type": "string"
            },
            "type": "array"
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "locale": {
            "description": "",
            "type": "string"
          },
          "return_url": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "customer"
        ],
        "type": "object"
      },
      "Price": {
        "description": "How much a product costs, per currency.",
        "properties": {
          "active": {
            "description": "",
            "type": "boolean"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency_options": {
            "description": "One amount per supported currency; no FX conversion exists.",
            "items": {
              "$ref": "#/components/schemas/CurrencyOption"
            },
            "type": "array"
          },
          "external_checkout_url": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "price_…",
            "type": "string"
          },
          "lookup_key": {
            "description": "Stable key your code can use instead of the id.",
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "nickname": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "price"
            ],
            "type": "string"
          },
          "product": {
            "description": "prod_…",
            "type": "string"
          },
          "recurring": {
            "description": "Set for recurring prices.",
            "properties": {
              "interval": {
                "description": "",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "type": "string"
              },
              "interval_count": {
                "description": "",
                "format": "int64",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "tax_behavior": {
            "description": "",
            "enum": [
              "project",
              "inclusive",
              "exclusive"
            ],
            "type": "string"
          },
          "type": {
            "description": "",
            "enum": [
              "one_time",
              "recurring"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "product",
          "type"
        ],
        "type": "object"
      },
      "PriceInput": {
        "description": "Fields to create a price.",
        "properties": {
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Minor units per currency, e.g. {\"XAF\": 5000, \"USD\": 900}.",
            "type": "object"
          },
          "external_checkout_url": {
            "description": "",
            "type": "string"
          },
          "interval": {
            "description": "Recurring only.",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string"
          },
          "interval_count": {
            "description": "Recurring only, default 1.",
            "format": "int64",
            "type": "integer"
          },
          "lookup_key": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "nickname": {
            "description": "",
            "type": "string"
          },
          "product": {
            "description": "prod_…",
            "type": "string"
          },
          "tax_behavior": {
            "description": "",
            "enum": [
              "project",
              "inclusive",
              "exclusive"
            ],
            "type": "string"
          },
          "type": {
            "description": "",
            "enum": [
              "one_time",
              "recurring"
            ],
            "type": "string"
          }
        },
        "required": [
          "product",
          "type",
          "amounts"
        ],
        "type": "object"
      },
      "PriceUpdate": {
        "description": "Mutable fields of a price (amounts only while unused).",
        "properties": {
          "active": {
            "description": "",
            "type": "boolean"
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Only before the price is used.",
            "type": "object"
          },
          "lookup_key": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "nickname": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PricingSessionInput": {
        "description": "Pricing page link bound to a customer you know.",
        "properties": {
          "cancel_url": {
            "description": "",
            "type": "string"
          },
          "currency": {
            "description": "Preselected currency.",
            "type": "string"
          },
          "customer": {
            "description": "",
            "properties": {
              "country": {
                "description": "",
                "type": "string"
              },
              "email": {
                "description": "",
                "type": "string"
              },
              "external_id": {
                "description": "",
                "type": "string"
              },
              "locale": {
                "description": "",
                "type": "string"
              },
              "name": {
                "description": "",
                "type": "string"
              }
            },
            "required": [
              "external_id"
            ],
            "type": "object"
          },
          "expires_in": {
            "description": "Seconds, default 86400, max 7 days.",
            "format": "int64",
            "type": "integer"
          },
          "group_key": {
            "description": "Only plans of this group.",
            "type": "string"
          },
          "locale": {
            "description": "",
            "type": "string"
          },
          "success_url": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "customer"
        ],
        "type": "object"
      },
      "Product": {
        "description": "Something you sell.",
        "properties": {
          "active": {
            "description": "",
            "type": "boolean"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "features": {
            "additionalProperties": true,
            "description": "Free-form features shown on the pricing page and returned with entitlements.",
            "type": "object"
          },
          "group_key": {
            "description": "Products sharing a group key allow one entitled subscription per customer.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "prod_…",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "product"
            ],
            "type": "string"
          },
          "updated": {
            "description": "Last update (Unix seconds)",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "object",
          "name"
        ],
        "type": "object"
      },
      "ProductInput": {
        "description": "Fields to create or update a product.",
        "properties": {
          "active": {
            "description": "",
            "type": "boolean"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "features": {
            "additionalProperties": true,
            "description": "",
            "type": "object"
          },
          "group_key": {
            "description": "",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "name": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Redelivered": {
        "description": "",
        "properties": {
          "deliveries_enqueued": {
            "description": "Deliveries queued.",
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "description": "evt_…",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Refund": {
        "description": "",
        "properties": {
          "amount": {
            "description": "",
            "format": "int64",
            "type": "integer"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "credit_note": {
            "description": "cn_…",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "failure_message": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "re_…",
            "type": "string"
          },
          "invoice": {
            "description": "inv_…",
            "type": "string"
          },
          "kind": {
            "description": "",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "refund"
            ],
            "type": "string"
          },
          "payment": {
            "description": "pay_…",
            "type": "string"
          },
          "provider_ref": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "description": "",
            "type": "string"
          },
          "status": {
            "description": "",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "canceled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "status"
        ],
        "type": "object"
      },
      "RefundInput": {
        "description": "",
        "properties": {
          "amount": {
            "description": "Minor units; default the remaining refundable amount.",
            "format": "int64",
            "type": "integer"
          },
          "manual": {
            "description": "Record a refund made outside the gateway.",
            "type": "boolean"
          },
          "reason": {
            "description": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResendInput": {
        "description": "",
        "properties": {
          "operator": {
            "description": "New operator code.",
            "type": "string"
          },
          "phone": {
            "description": "New number.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SecretRotated": {
        "description": "",
        "properties": {
          "id": {
            "description": "we_…",
            "type": "string"
          },
          "secret": {
            "description": "New signing secret, shown once.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "secret"
        ],
        "type": "object"
      },
      "SessionLink": {
        "description": "A short-lived hosted page link.",
        "properties": {
          "expires_at": {
            "description": "",
            "format": "date-time",
            "type": "string"
          },
          "object": {
            "description": "portal.session or pricing.session",
            "type": "string"
          },
          "url": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "Subscription": {
        "description": "Recurring billing for one customer.",
        "properties": {
          "cancel_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "cancel_at_period_end": {
            "description": "",
            "type": "boolean"
          },
          "canceled_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "collection_method": {
            "description": "",
            "enum": [
              "automatic",
              "send_invoice"
            ],
            "type": "string"
          },
          "collection_mode": {
            "description": "provider_managed = billed by the gateway (Stripe Billing); platform_managed = billed by the platform.",
            "enum": [
              "provider_managed",
              "platform_managed"
            ],
            "type": "string"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "current_period_end": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "current_period_start": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "default_payment_method": {
            "description": "pm_…",
            "type": [
              "string",
              "null"
            ]
          },
          "ended_at": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "gateway_connection": {
            "description": "gwc_…",
            "type": [
              "string",
              "null"
            ]
          },
          "group_key": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "sub_…",
            "type": "string"
          },
          "items": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/SubscriptionItem"
            },
            "type": "array"
          },
          "latest_invoice": {
            "description": "inv_…",
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "object": {
            "description": "",
            "enum": [
              "subscription"
            ],
            "type": "string"
          },
          "pause_collection": {
            "description": "",
            "type": "boolean"
          },
          "pending_change": {
            "additionalProperties": true,
            "description": "Plan change waiting for its invoice to be paid.",
            "type": "object"
          },
          "provider_subscription_id": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "",
            "type": "string"
          },
          "status": {
            "description": "",
            "enum": [
              "incomplete",
              "incomplete_expired",
              "active",
              "past_due",
              "paused",
              "unpaid",
              "canceled"
            ],
            "type": "string"
          },
          "trial_end": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "status"
        ],
        "type": "object"
      },
      "SubscriptionInput": {
        "description": "Create a subscription with a saved method (no checkout).",
        "properties": {
          "collection_method": {
            "description": "",
            "enum": [
              "automatic",
              "send_invoice"
            ],
            "type": "string"
          },
          "currency": {
            "description": "",
            "type": "string"
          },
          "customer": {
            "description": "cus_…",
            "type": "string"
          },
          "gateway_connection": {
            "description": "gwc_…",
            "type": "string"
          },
          "items": {
            "description": "",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "mark_paid_reason": {
            "description": "Operator-assigned plan: first invoice settled manually with this reason.",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Up to 50 string key/value pairs for your own use.",
            "type": "object"
          },
          "payment_method": {
            "description": "pm_…",
            "type": "string"
          }
        },
        "required": [
          "customer",
          "items"
        ],
        "type": "object"
      },
      "SubscriptionItem": {
        "description": "",
        "properties": {
          "id": {
            "description": "si_…",
            "type": "string"
          },
          "price": {
            "description": "price_…",
            "type": "string"
          },
          "quantity": {
            "description": "",
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WebhookEndpoint": {
        "description": "",
        "properties": {
          "api_version": {
            "description": "",
            "type": "string"
          },
          "created": {
            "description": "Creation time (Unix seconds)",
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "description": "",
            "type": "string"
          },
          "enabled": {
            "description": "",
            "type": "boolean"
          },
          "enabled_events": {
            "description": "",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "failing_since": {
            "description": "",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "we_…",
            "type": "string"
          },
          "object": {
            "description": "",
            "enum": [
              "webhook_endpoint"
            ],
            "type": "string"
          },
          "secret": {
            "description": "Signing secret, returned once on creation and rotation.",
            "type": "string"
          },
          "url": {
            "description": "",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "url"
        ],
        "type": "object"
      },
      "WebhookEndpointInput": {
        "description": "",
        "properties": {
          "description": {
            "description": "",
            "type": "string"
          },
          "enabled": {
            "description": "Update only.",
            "type": "boolean"
          },
          "enabled_events": {
            "description": "Event types, wildcards allowed (subscription.*). Default [*].",
            "items": {
              "description": "",
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "description": "HTTPS URL.",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "sk_test_… / sk_live_…",
        "description": "Secret (sk_), restricted (rk_) or publishable (pk_) key.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "REST API of the billing platform. Authenticate with `Authorization: Bearer sk_test_…` (the key selects the environment). Amounts are integer minor units with an ISO 4217 currency. Send an `Idempotency-Key` on every POST.",
    "license": {
      "identifier": "LicenseRef-Proprietary",
      "name": "Proprietary"
    },
    "title": "Billing Platform API",
    "version": "2026-01-01"
  },
  "openapi": "3.1.0",
  "paths": {
    "/checkout/sessions": {
      "get": {
        "operationId": "checkoutSessions_list",
        "parameters": [
          {
            "description": "open, complete or expired.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/CheckoutSession"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of CheckoutSession objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List checkout sessions",
        "tags": [
          "Checkout sessions"
        ],
        "x-order": 16,
        "x-scope": "checkout:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "checkoutSessions"
      },
      "post": {
        "description": "Returns the hosted checkout url to redirect the customer to. Send an Idempotency-Key.",
        "operationId": "checkoutSessions_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutSessionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "CheckoutSession"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a checkout session",
        "tags": [
          "Checkout sessions"
        ],
        "x-order": 15,
        "x-scope": "checkout:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "checkoutSessions"
      }
    },
    "/checkout/sessions/{id}": {
      "get": {
        "description": "Call this on return instead of trusting the redirect.",
        "operationId": "checkoutSessions_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "CheckoutSession"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a checkout session",
        "tags": [
          "Checkout sessions"
        ],
        "x-order": 17,
        "x-scope": "checkout:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "checkoutSessions"
      }
    },
    "/checkout/sessions/{id}/expire": {
      "post": {
        "operationId": "checkoutSessions_expire",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "CheckoutSession"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Expire a checkout session",
        "tags": [
          "Checkout sessions"
        ],
        "x-order": 18,
        "x-scope": "checkout:write",
        "x-sdk-method": "expire",
        "x-sdk-resource": "checkoutSessions"
      }
    },
    "/customers": {
      "get": {
        "operationId": "customers_list",
        "parameters": [
          {
            "description": "Filter by your user id.",
            "in": "query",
            "name": "external_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by email.",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Customer"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Customer objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List customers",
        "tags": [
          "Customers"
        ],
        "x-order": 1,
        "x-scope": "customers:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "customers"
      },
      "post": {
        "operationId": "customers_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 0,
        "x-scope": "customers:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "customers"
      }
    },
    "/customers/{id}": {
      "delete": {
        "description": "Erases personal data; invoices and payments are kept.",
        "operationId": "customers_del",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Anonymise a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 4,
        "x-scope": "customers:write",
        "x-sdk-method": "del",
        "x-sdk-resource": "customers"
      },
      "get": {
        "operationId": "customers_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 2,
        "x-scope": "customers:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "customers"
      },
      "patch": {
        "operationId": "customers_update",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            },
            "description": "Customer"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Update a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 3,
        "x-scope": "customers:write",
        "x-sdk-method": "update",
        "x-sdk-resource": "customers"
      }
    },
    "/customers/{id}/entitlements": {
      "get": {
        "description": "The single place access is decided, from subscription status and the grace policy.",
        "operationId": "customers_entitlements",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Entitlement"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Entitlement objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List a customer’s entitlements",
        "tags": [
          "Customers"
        ],
        "x-order": 5,
        "x-scope": "customers:read",
        "x-sdk-method": "entitlements",
        "x-sdk-resource": "customers"
      }
    },
    "/customers/{id}/payment_methods": {
      "get": {
        "operationId": "customers_paymentMethods",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/PaymentMethod"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of PaymentMethod objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List a customer’s saved payment methods",
        "tags": [
          "Customers"
        ],
        "x-order": 6,
        "x-scope": "payment_methods:read",
        "x-sdk-method": "paymentMethods",
        "x-sdk-resource": "customers"
      }
    },
    "/events": {
      "get": {
        "operationId": "events_list",
        "parameters": [
          {
            "description": "Filter by type, e.g. invoice.paid.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by object id.",
            "in": "query",
            "name": "object_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Event"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Event objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "x-order": 60,
        "x-scope": "events:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "events"
      }
    },
    "/events/{id}": {
      "get": {
        "operationId": "events_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            },
            "description": "Event"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve an event",
        "tags": [
          "Events"
        ],
        "x-order": 61,
        "x-scope": "events:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "events"
      }
    },
    "/events/{id}/redeliver": {
      "post": {
        "operationId": "events_redeliver",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Redelivered"
                }
              }
            },
            "description": "Redelivered"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Redeliver an event to every matching endpoint",
        "tags": [
          "Events"
        ],
        "x-order": 62,
        "x-scope": "events:write",
        "x-sdk-method": "redeliver",
        "x-sdk-resource": "events"
      }
    },
    "/invoices": {
      "get": {
        "operationId": "invoices_list",
        "parameters": [
          {
            "description": "Filter by cus_….",
            "in": "query",
            "name": "customer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by sub_….",
            "in": "query",
            "name": "subscription",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by status.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Invoice"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Invoice objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ],
        "x-order": 28,
        "x-scope": "invoices:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "invoices"
      },
      "post": {
        "operationId": "invoices_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Invoice"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a manual invoice",
        "tags": [
          "Invoices"
        ],
        "x-order": 29,
        "x-scope": "invoices:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}": {
      "get": {
        "operationId": "invoices_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Invoice"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve an invoice",
        "tags": [
          "Invoices"
        ],
        "x-order": 30,
        "x-scope": "invoices:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/finalize": {
      "post": {
        "operationId": "invoices_finalize",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Invoice"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Finalise a draft invoice",
        "tags": [
          "Invoices"
        ],
        "x-order": 33,
        "x-scope": "invoices:write",
        "x-sdk-method": "finalize",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/link": {
      "get": {
        "operationId": "invoices_link",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionLink"
                }
              }
            },
            "description": "SessionLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Get the hosted pay link",
        "tags": [
          "Invoices"
        ],
        "x-order": 32,
        "x-scope": "invoices:read",
        "x-sdk-method": "link",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/mark_uncollectible": {
      "post": {
        "operationId": "invoices_markUncollectible",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Invoice"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Mark uncollectible",
        "tags": [
          "Invoices"
        ],
        "x-order": 36,
        "x-scope": "invoices:write",
        "x-sdk-method": "markUncollectible",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/pay": {
      "post": {
        "operationId": "invoices_pay",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentMethodRef"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Charge an open invoice",
        "tags": [
          "Invoices"
        ],
        "x-order": 34,
        "x-scope": "invoices:write",
        "x-sdk-method": "pay",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/pdf": {
      "get": {
        "operationId": "invoices_pdf",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "PDF file."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Download the invoice PDF",
        "tags": [
          "Invoices"
        ],
        "x-order": 31,
        "x-scope": "invoices:read",
        "x-sdk-binary": true,
        "x-sdk-method": "pdf",
        "x-sdk-resource": "invoices"
      }
    },
    "/invoices/{id}/void": {
      "post": {
        "operationId": "invoices_void",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Invoice"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Void an invoice",
        "tags": [
          "Invoices"
        ],
        "x-order": 35,
        "x-scope": "invoices:write",
        "x-sdk-method": "void",
        "x-sdk-resource": "invoices"
      }
    },
    "/methods/eligible": {
      "get": {
        "operationId": "methods_eligible",
        "parameters": [
          {
            "description": "cus_…, used for the country.",
            "in": "query",
            "name": "customer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Minor units.",
            "in": "query",
            "name": "amount",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "ISO 4217.",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "ISO alpha-2.",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "one_time (default), subscription or setup.",
            "in": "query",
            "name": "flow",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/EligibleMethod"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of EligibleMethod objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List eligible payment methods",
        "tags": [
          "Methods"
        ],
        "x-order": 63,
        "x-scope": "methods:read",
        "x-sdk-method": "eligible",
        "x-sdk-resource": "methods"
      }
    },
    "/methods/operators": {
      "get": {
        "operationId": "methods_operators",
        "parameters": [
          {
            "description": "ISO alpha-2.",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Operator"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Operator objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List enabled mobile money operators",
        "tags": [
          "Methods"
        ],
        "x-order": 64,
        "x-scope": "methods:read",
        "x-sdk-method": "operators",
        "x-sdk-resource": "methods"
      }
    },
    "/payment_links": {
      "get": {
        "operationId": "paymentLinks_list",
        "parameters": [
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/PaymentLink"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of PaymentLink objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List payment links",
        "tags": [
          "Payment links"
        ],
        "x-order": 51,
        "x-scope": "checkout:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "paymentLinks"
      },
      "post": {
        "description": "Optionally pin the payment methods offered; without pins the buyer sees the methods matching their country and currency.",
        "operationId": "paymentLinks_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            },
            "description": "PaymentLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a payment link",
        "tags": [
          "Payment links"
        ],
        "x-order": 50,
        "x-scope": "checkout:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "paymentLinks"
      }
    },
    "/payment_links/{id}": {
      "get": {
        "operationId": "paymentLinks_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            },
            "description": "PaymentLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a payment link",
        "tags": [
          "Payment links"
        ],
        "x-order": 52,
        "x-scope": "checkout:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "paymentLinks"
      },
      "patch": {
        "description": "Rename, change pinned methods or URLs, or deactivate (active: false).",
        "operationId": "paymentLinks_update",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            },
            "description": "PaymentLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Update a payment link",
        "tags": [
          "Payment links"
        ],
        "x-order": 53,
        "x-scope": "checkout:write",
        "x-sdk-method": "update",
        "x-sdk-resource": "paymentLinks"
      }
    },
    "/payment_methods/{id}": {
      "delete": {
        "operationId": "paymentMethods_detach",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            },
            "description": "PaymentMethod"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Detach a payment method",
        "tags": [
          "Payment methods"
        ],
        "x-order": 47,
        "x-scope": "payment_methods:write",
        "x-sdk-method": "detach",
        "x-sdk-resource": "paymentMethods"
      },
      "get": {
        "operationId": "paymentMethods_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            },
            "description": "PaymentMethod"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a payment method",
        "tags": [
          "Payment methods"
        ],
        "x-order": 45,
        "x-scope": "payment_methods:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "paymentMethods"
      }
    },
    "/payment_methods/{id}/set_default": {
      "post": {
        "operationId": "paymentMethods_setDefault",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            },
            "description": "PaymentMethod"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Make it the customer’s default",
        "tags": [
          "Payment methods"
        ],
        "x-order": 46,
        "x-scope": "payment_methods:write",
        "x-sdk-method": "setDefault",
        "x-sdk-resource": "paymentMethods"
      }
    },
    "/payments": {
      "get": {
        "operationId": "payments_list",
        "parameters": [
          {
            "description": "Filter by inv_….",
            "in": "query",
            "name": "invoice",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by cus_….",
            "in": "query",
            "name": "customer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by status.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Payment"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Payment objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List payments",
        "tags": [
          "Payments"
        ],
        "x-order": 37,
        "x-scope": "payments:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}": {
      "get": {
        "description": "Includes next_action for headless integrations.",
        "operationId": "payments_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a payment",
        "tags": [
          "Payments"
        ],
        "x-order": 38,
        "x-scope": "payments:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}/authorize_otp": {
      "post": {
        "operationId": "payments_authorizeOtp",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OTPInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Submit a mobile money OTP",
        "tags": [
          "Payments"
        ],
        "x-order": 40,
        "x-scope": "payments:write",
        "x-sdk-method": "authorizeOtp",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}/confirm": {
      "post": {
        "description": "Secret keys only; audited.",
        "operationId": "payments_confirm",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Confirm or reject manually",
        "tags": [
          "Payments"
        ],
        "x-order": 42,
        "x-scope": "payments:write",
        "x-sdk-method": "confirm",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}/poll": {
      "post": {
        "operationId": "payments_poll",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Ask the gateway for the current status",
        "tags": [
          "Payments"
        ],
        "x-order": 43,
        "x-scope": "payments:write",
        "x-sdk-method": "poll",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}/refunds": {
      "post": {
        "operationId": "payments_refund",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refund"
                }
              }
            },
            "description": "Refund"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Refund a payment",
        "tags": [
          "Payments"
        ],
        "x-order": 39,
        "x-scope": "payments:write",
        "x-sdk-method": "refund",
        "x-sdk-resource": "payments"
      }
    },
    "/payments/{id}/resend": {
      "post": {
        "description": "Creates a new attempt on the same invoice and cancels this one.",
        "operationId": "payments_resend",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Payment"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Send a new phone prompt",
        "tags": [
          "Payments"
        ],
        "x-order": 41,
        "x-scope": "payments:write",
        "x-sdk-method": "resend",
        "x-sdk-resource": "payments"
      }
    },
    "/portal/sessions": {
      "post": {
        "description": "Valid 30 minutes by default.",
        "operationId": "portalSessions_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalSessionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionLink"
                }
              }
            },
            "description": "SessionLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a customer portal link",
        "tags": [
          "Portal"
        ],
        "x-order": 48,
        "x-scope": "portal:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "portalSessions"
      }
    },
    "/prices": {
      "get": {
        "operationId": "prices_list",
        "parameters": [
          {
            "description": "Filter by prod_….",
            "in": "query",
            "name": "product",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter on active.",
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Price"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Price objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List prices",
        "tags": [
          "Prices"
        ],
        "x-order": 12,
        "x-scope": "products:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "prices"
      },
      "post": {
        "description": "Give an amount for every currency you sell in: there is no exchange-rate conversion.",
        "operationId": "prices_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a price",
        "tags": [
          "Prices"
        ],
        "x-order": 11,
        "x-scope": "products:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "prices"
      }
    },
    "/prices/{id}": {
      "get": {
        "operationId": "prices_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a price",
        "tags": [
          "Prices"
        ],
        "x-order": 13,
        "x-scope": "products:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "prices"
      },
      "patch": {
        "operationId": "prices_update",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            },
            "description": "Price"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Update a price",
        "tags": [
          "Prices"
        ],
        "x-order": 14,
        "x-scope": "products:write",
        "x-sdk-method": "update",
        "x-sdk-resource": "prices"
      }
    },
    "/pricing_sessions": {
      "post": {
        "description": "Shows the plan list to a known customer, marks their current plan and skips the email step.",
        "operationId": "pricingSessions_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PricingSessionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionLink"
                }
              }
            },
            "description": "SessionLink"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a pricing page link",
        "tags": [
          "Pricing page"
        ],
        "x-order": 49,
        "x-scope": "checkout:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "pricingSessions"
      }
    },
    "/products": {
      "get": {
        "operationId": "products_list",
        "parameters": [
          {
            "description": "Filter on active.",
            "in": "query",
            "name": "active",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Product"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Product objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "x-order": 8,
        "x-scope": "products:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "products"
      },
      "post": {
        "operationId": "products_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a product",
        "tags": [
          "Products"
        ],
        "x-order": 7,
        "x-scope": "products:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "products"
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "products_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a product",
        "tags": [
          "Products"
        ],
        "x-order": 9,
        "x-scope": "products:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "products"
      },
      "patch": {
        "operationId": "products_update",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Product"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Update a product",
        "tags": [
          "Products"
        ],
        "x-order": 10,
        "x-scope": "products:write",
        "x-sdk-method": "update",
        "x-sdk-resource": "products"
      }
    },
    "/refunds/{id}": {
      "get": {
        "operationId": "refunds_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refund"
                }
              }
            },
            "description": "Refund"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a refund",
        "tags": [
          "Refunds"
        ],
        "x-order": 44,
        "x-scope": "payments:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "refunds"
      }
    },
    "/subscriptions": {
      "get": {
        "operationId": "subscriptions_list",
        "parameters": [
          {
            "description": "Filter by cus_….",
            "in": "query",
            "name": "customer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by status.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "provider_managed or platform_managed.",
            "in": "query",
            "name": "collection_mode",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–100, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: id of the last item of the previous page.",
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cursor: id of the first item of the next page.",
            "in": "query",
            "name": "ending_before",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/Subscription"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of Subscription objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List subscriptions",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 20,
        "x-scope": "subscriptions:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "subscriptions"
      },
      "post": {
        "description": "For customers with a saved method; most integrations use a subscription checkout instead.",
        "operationId": "subscriptions_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a subscription",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 19,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}": {
      "get": {
        "operationId": "subscriptions_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a subscription",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 21,
        "x-scope": "subscriptions:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/cancel": {
      "post": {
        "operationId": "subscriptions_cancel",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Cancel a subscription",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 23,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "cancel",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/change_plan": {
      "post": {
        "description": "Platform-managed: creates an invoice for the new price, switched on payment. Provider-managed: gateway proration.",
        "operationId": "subscriptions_changePlan",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Change plan",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 22,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "changePlan",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/pause": {
      "post": {
        "operationId": "subscriptions_pause",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Pause collection",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 25,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "pause",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/payment_method": {
      "post": {
        "description": "Retries the open invoice immediately when past due.",
        "operationId": "subscriptions_setPaymentMethod",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentMethodRef"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Change the payment method",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 27,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "setPaymentMethod",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/resume": {
      "post": {
        "operationId": "subscriptions_resume",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Remove a scheduled cancellation",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 24,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "resume",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/subscriptions/{id}/unpause": {
      "post": {
        "operationId": "subscriptions_unpause",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Subscription"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Resume collection",
        "tags": [
          "Subscriptions"
        ],
        "x-order": 26,
        "x-scope": "subscriptions:write",
        "x-sdk-method": "unpause",
        "x-sdk-resource": "subscriptions"
      }
    },
    "/webhook_endpoints": {
      "get": {
        "operationId": "webhookEndpoints_list",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "properties": {
                        "data": {
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/WebhookEndpoint"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A page of WebhookEndpoint objects."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "List webhook endpoints",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 55,
        "x-scope": "webhooks:read",
        "x-sdk-method": "list",
        "x-sdk-resource": "webhookEndpoints"
      },
      "post": {
        "description": "The response carries the signing secret, once.",
        "operationId": "webhookEndpoints_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "WebhookEndpoint"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Create a webhook endpoint",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 54,
        "x-scope": "webhooks:write",
        "x-sdk-method": "create",
        "x-sdk-resource": "webhookEndpoints"
      }
    },
    "/webhook_endpoints/{id}": {
      "delete": {
        "operationId": "webhookEndpoints_del",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            },
            "description": "Deleted"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Delete a webhook endpoint",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 58,
        "x-scope": "webhooks:write",
        "x-sdk-method": "del",
        "x-sdk-resource": "webhookEndpoints"
      },
      "get": {
        "operationId": "webhookEndpoints_retrieve",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "WebhookEndpoint"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Retrieve a webhook endpoint",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 56,
        "x-scope": "webhooks:read",
        "x-sdk-method": "retrieve",
        "x-sdk-resource": "webhookEndpoints"
      },
      "patch": {
        "operationId": "webhookEndpoints_update",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "WebhookEndpoint"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Update a webhook endpoint",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 57,
        "x-scope": "webhooks:write",
        "x-sdk-method": "update",
        "x-sdk-resource": "webhookEndpoints"
      }
    },
    "/webhook_endpoints/{id}/rotate_secret": {
      "post": {
        "operationId": "webhookEndpoints_rotateSecret",
        "parameters": [
          {
            "description": "Object id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretRotated"
                }
              }
            },
            "description": "SecretRotated"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Rotate the signing secret",
        "tags": [
          "Webhook endpoints"
        ],
        "x-order": 59,
        "x-scope": "webhooks:write",
        "x-sdk-method": "rotateSecret",
        "x-sdk-resource": "webhookEndpoints"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "This installation",
      "url": "https://pay.marthaia.com/v1"
    }
  ],
  "tags": [
    {
      "description": "People or companies that pay you, matched to your users by external_id.",
      "name": "Customers"
    },
    {
      "description": "What you sell. A group_key makes products mutually exclusive plans.",
      "name": "Products"
    },
    {
      "description": "How much a product costs, with an explicit amount per currency.",
      "name": "Prices"
    },
    {
      "description": "Hosted checkout pages: create one, redirect the customer, read it back on return.",
      "name": "Checkout sessions"
    },
    {
      "description": "Recurring billing, billed by the gateway (provider_managed) or by the platform (platform_managed).",
      "name": "Subscriptions"
    },
    {
      "description": "What a customer owes; the only object that is ever paid.",
      "name": "Invoices"
    },
    {
      "description": "Attempts to collect an invoice through one gateway.",
      "name": "Payments"
    },
    {
      "description": "Money returned to the customer, with a credit note.",
      "name": "Refunds"
    },
    {
      "description": "Saved cards, wallets and mobile money accounts.",
      "name": "Payment methods"
    },
    {
      "description": "Short-lived links to the hosted customer portal.",
      "name": "Portal"
    },
    {
      "description": "Links to the hosted pricing page for a known customer.",
      "name": "Pricing page"
    },
    {
      "description": "Reusable public URLs for a price, optionally limited to chosen payment methods.",
      "name": "Payment links"
    },
    {
      "description": "URLs that receive signed event notifications.",
      "name": "Webhook endpoints"
    },
    {
      "description": "Everything that happened, also delivered by webhook.",
      "name": "Events"
    },
    {
      "description": "Which payment methods and operators a customer can use.",
      "name": "Methods"
    }
  ]
}