{
	"openapi": "3.0.0",
	"info": {
		"title": "Shuttle API",
		"description": "Complete API specification for the Shuttle platform.\n\n# List APIs\nList APIs allow you to pass search criteria, order clauses, and expansion parameters.\n\n## Criteria\nThe `criteria` parameter allows filtering results based on specific conditions:\n\nSupports operators:\n- `!=`, `>=`, `>`, `<`, `<=`: Standard comparison operators\n- `=`: Exact match, separate multiple values with `;` for IN operation\n- `~=`: Partial match (case insensitive)\n- `<>`: Between, separate values with `;` (e.g., `<>min;max`)\n- `!`: Is null\n- `!!`: Is not null\n\nSeparate multiple criteria with commas (`,`)\n\nNotes:\n- Strings are case insensitive (some exceptions apply)\n- Booleans are Y/N (TIP: we recommend checking for `=Y` or `!=Y` as some objects treat false as null)\n\nExamples:\n```\ncriteria=status=ACTIVE;FAILING\ncriteria=status=ACTIVE;FAILING,email=dave@gmail.com\ncriteria=scheduler=Y\n```\n\nRemember to URL encode the criteria parameter.\n\n## Order\nThe `order` parameter controls the sort order of results:\n\n- Supports any field that criteria supports\n- Defaults to `created:desc` if not specified\n- Will order ascending unless you specify `desc`\n- Separate multiple order fields with commas (`,`)\n\nExamples:\n```\norder=updated\norder=updated:desc\norder=status,updated:desc\n```\n\n## Expansion\nThe `expand` parameter allows you to include related objects in the response:\n\n- Specify fields to expand, separated by commas\n- Some objects support nested expansion using dot notation\n- Expanded objects are included in the response under their respective fields\n\nExample:\n```\nexpand=account,payment_method\nexpand=contract.account,payment_method\n```\n\n# Authentication\nAll API requests must be authenticated using one of these methods:\n\n## 1. Basic authentication\nUse your secret key as credentials:\n```\nAuthorization: Basic Base64(secret_key:)\n```\n- Required: Include your instance key in the URL path\n- Example: `https://app.shuttleglobal.com/c/api/instances/{instance_key}/transactions`\n\n## 2. Bearer token authentication\nUse an OAuth access token:\n```\nAuthorization: Bearer <access_token>\n```\n- Leave the instance key out of the URL (the token identifies the instance)\n- Example: `https://app.shuttleglobal.com/c/api/transactions`\n- Get tokens from the OAuth /token endpoint\n- Only tokens issued for your instance will work\n",
		"license": {
			"name": "Proprietary",
			"url": "https://shuttleglobal.com/terms"
		},
		"version": "1.0.0"
	},
	"tags": [
		{
			"name": "payment-links",
			"description": "API for managing payment links in the Shuttle platform."
		},
		{
			"name": "charges",
			"description": "API for managing payment charges in the Shuttle platform."
		},
		{
			"name": "contracts",
			"description": "API for managing contracts in the Shuttle platform."
		},
		{
			"name": "deep-links",
			"description": "API for managing deep links in the Shuttle platform."
		},
		{
			"name": "checkout-monitor",
			"description": "API for monitoring checkout sessions in the Shuttle platform."
		},
		{
			"name": "accounts",
			"description": "API for managing accounts in the Shuttle platform."
		},
		{
			"name": "instance-webhooks",
			"description": "API for managing instance webhooks in the Shuttle platform."
		},
		{
			"name": "payment-methods",
			"description": "API for managing payment methods in the Shuttle platform."
		},
		{
			"name": "oauth",
			"description": "API for OAuth 2.0 authentication in the Shuttle platform."
		},
		{
			"name": "payments",
			"description": "API for managing payments in the Shuttle platform."
		},
		{
			"name": "refunds",
			"description": "API for managing refunds in the Shuttle platform."
		},
		{
			"name": "captures",
			"description": "API for retrieving capture transactions in the Shuttle platform."
		},
		{
			"name": "voids",
			"description": "API for retrieving void transactions in the Shuttle platform."
		},
		{
			"name": "checkouts",
			"description": "API for managing checkout sessions in the Shuttle platform."
		},
		{
			"name": "legal-entities",
			"description": "API for managing legal entities in the Shuttle platform."
		},
		{
			"name": "legal-entity-routes",
			"description": "API for managing legal entity routes in the Shuttle platform."
		},
		{
			"name": "workflows",
			"description": "API for managing payment workflows in the Shuttle platform."
		},
		{
			"name": "processors",
			"description": "API for listing payment processors in the Shuttle platform."
		},
		{
			"name": "Instances",
			"description": "API for managing merchant instances in the Shuttle platform."
		},
		{
			"name": "strings",
			"description": "API for reading and updating localised strings in the Shuttle platform."
		}
	],
	"servers": [
		{
			"url": "https://app.shuttleglobal.com/c/api/instances/{instance_key}",
			"description": "Production server with API Key Authentication",
			"variables": {
				"instance_key": {
					"description": "Your instance key (required for Basic auth)",
					"default": "default"
				}
			}
		},
		{
			"url": "https://app.shuttleglobal.com/c/api",
			"description": "Production server with Bearer Token Authentication"
		}
	],
	"security": [
		{
			"basicAuth": []
		},
		{
			"bearerAuth": []
		}
	],
	"paths": {
		"/payment_links": {
			"post": {
				"summary": "Create a new payment link",
				"operationId": "createPaymentLink",
				"tags": [
					"payment-links"
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"payment_link"
								],
								"properties": {
									"payment_link": {
										"type": "object",
										"properties": {
											"expires": {
												"type": "string",
												"format": "date-time",
												"description": "Expiry date for the payment link.\nMust be a future date - cannot set expiry to a past date.\n"
											},
											"options": {
												"type": "object",
												"description": "Configuration options for the payment link experience",
												"properties": {
													"account": {
														"oneOf": [
															{
																"type": "string",
																"pattern": "^acc_[0-9]+_[0-9a-z]+$",
																"description": "Account ID to skip authentication section"
															},
															{
																"type": "object",
																"description": "Customer account details",
																"properties": {
																	"address": {
																		"type": "object",
																		"description": "Customer's address",
																		"properties": {
																			"country": {
																				"type": "string",
																				"description": "Country code"
																			},
																			"line1": {
																				"type": "string",
																				"description": "Address line 1"
																			},
																			"line2": {
																				"type": "string",
																				"description": "Address line 2"
																			},
																			"line3": {
																				"type": "string",
																				"description": "Address line 3"
																			},
																			"line4": {
																				"type": "string",
																				"description": "City/Town"
																			},
																			"line5": {
																				"type": "string",
																				"description": "Post code/ZIP code"
																			},
																			"line6": {
																				"type": "string",
																				"description": "State/Province (using ISO 3166-2 subdivision codes, e.g., 'CA' for California)"
																			}
																		}
																	},
																	"crm_key": {
																		"type": "string",
																		"description": "External CRM identifier for the customer"
																	},
																	"email": {
																		"type": "string",
																		"format": "email",
																		"description": "Customer's email address"
																	},
																	"first_name": {
																		"type": "string",
																		"description": "Customer's first name"
																	},
																	"last_name": {
																		"type": "string",
																		"description": "Customer's last name"
																	},
																	"phone": {
																		"type": "string",
																		"description": "Customer's phone number"
																	}
																}
															}
														]
													},
													"allow_description": {
														"type": "boolean",
														"description": "Whether to allow the payer to add a comment"
													},
													"alt_key": {
														"type": "string",
														"description": "Fixed reference for the payment (if specified, user cannot modify)"
													},
													"amount": {
														"type": "string",
														"description": "Fixed amount for the payment in major currency units, as a decimal string\nwithout commas, using '.' as the decimal separator (e.g. \"18.18\" for £18.18).\nIf specified, the payer cannot modify it.\n",
														"example": "18.18"
													},
													"description": {
														"type": "string",
														"description": "Fixed comment to show with payment"
													},
													"currency": {
														"type": "string",
														"description": "Three-letter ISO currency code",
														"pattern": "^[A-Z]{3}$"
													},
													"default_alt_key": {
														"type": "string",
														"description": "Default reference that user can modify"
													},
													"default_amount": {
														"type": "string",
														"description": "Default amount in major currency units, as a decimal string without commas,\nusing '.' as the decimal separator (e.g. \"100.00\"). The payer can modify it.\n",
														"example": "100.00"
													},
													"default_description": {
														"type": "string",
														"description": "Default comment to show (can be changed by payer if allow_description is true)"
													},
													"name": {
														"type": "string",
														"description": "Custom name for the payment link (defaults to instance name)"
													},
													"page_intro": {
														"type": "string",
														"description": "Custom introduction message for the payment page"
													},
													"page_pending_message": {
														"type": "string",
														"description": "Message to display to the user when their payment is pending authorization.\nOnly shown on the receipt page when skip_receipt is false and no pending_url is provided.\n"
													},
													"page_success_message": {
														"type": "string",
														"description": "Message to display to the user when their payment is successful.\nOnly shown on the receipt page when skip_receipt is false and no success_url is provided.\n"
													},
													"pending_url": {
														"type": "string",
														"format": "uri",
														"description": "URL to redirect to when a payment requires authorization (pending state).\nIf skip_receipt is true, redirect happens immediately after payment submission.\nIf skip_receipt is false, URL is presented as a button on the receipt page.\nQuery parameters will be appended to this URL - see RedirectUrlParameters schema.\nParameters include: payment_link, status, contract, charge, transaction, payment_method, account.\nExample: https://shop.example.com/pending?payment_link=pl_1234_abcdef&status=PENDING...\nUse these parameters to verify payment status and retrieve additional details via API.\n"
													},
													"save_card": {
														"type": "boolean",
														"description": "Controls whether the payment method will be saved:\n- If true: Payment method will be saved with the payment\n- If false: Payment method won't be saved and user won't be given the option\n- If not set: User will be given the option to save their payment method\n\nNote that `save_card: false` also withdraws any payment method that can only be\nused by storing a token first - GoCardless Direct Debit and Instant Bank Pay, for\nexample - since those cannot be offered under a hard \"never save\" instruction. To\ntake a payment that saves nothing while still offering them, leave `save_card`\nunset and use `default_save_card` with `hide_save_card_toggle` instead.\n"
													},
													"default_save_card": {
														"type": "boolean",
														"description": "Initial state of the \"save payment method\" checkbox. The payer can still change it,\nand it is ignored when `save_card` is set. Unlike `save_card`, it does not restrict\nwhich payment methods are offered.\n"
													},
													"hide_save_card_toggle": {
														"type": "boolean",
														"description": "Hides the \"save payment method\" checkbox from the payer, leaving whatever\n`default_save_card` set in force. Pair the two to express a preference rather than\nan instruction: do not save, but stay available to methods that need a token.\n"
													},
													"skip_receipt": {
														"type": "boolean",
														"default": false,
														"description": "Controls redirect behavior after payment submission:\n* true - Immediately redirect to success_url/pending_url\n* false - Show receipt page with messages before redirect\n- If true: Immediately redirect to success_url (successful payment) or pending_url (pending authorization)\n- If false: Show receipt page with a button to proceed to the appropriate URL\n"
													},
													"source": {
														"type": "string",
														"enum": [
															"ECOMMERCE"
														],
														"default": "ECOMMERCE",
														"description": "Source of the payment link"
													},
													"channel": {
														"type": "string",
														"description": "Channel identifier to process the payment through"
													},
													"force_add": {
														"type": "boolean",
														"description": "Only allow new payment methods, do not show saved payment methods"
													},
													"timezone": {
														"type": "string",
														"description": "IANA timezone name for date/time display (e.g., America/New_York)"
													},
													"success_url": {
														"type": "string",
														"format": "uri",
														"description": "URL to redirect users after successful payment completion.\nQuery parameters included in redirect:\n* payment_link - Payment link ID\n* status - Will be 'COMPLETED'\n* contract - Contract ID if created\n* charge - Charge ID if created\n* transaction - Transaction ID if created\n* payment_method - Payment method ID if created\n* account - Account ID if created\nIf skip_receipt is true, redirect happens immediately after successful authorization.\nIf skip_receipt is false, URL is presented as a button on the receipt page.\nQuery parameters will be appended to this URL - see RedirectUrlParameters schema.\nParameters include: payment_link, status, contract, charge, transaction, payment_method, account.\nExample: https://shop.example.com/success?payment_link=pl_1234_abcdef&status=COMPLETED...\nUse these parameters to verify payment status and retrieve additional details via API.\n"
													}
												}
											},
											"state": {
												"oneOf": [
													{
														"type": "object"
													},
													{
														"type": "string"
													},
													{
														"type": "array"
													}
												],
												"description": "Custom state data for link creator. Can be an object, string, or array.\nMaximum size when stringified is 10KB.\n"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Payment link created successfully",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_link": {
											"$ref": "#/components/schemas/PaymentLink"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"description": "Instance not found (only checked after successful authentication)"
					},
					"500": {
						"description": "Internal server error",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"error": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string"
												},
												"message": {
													"type": "string"
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/payment_links/{id}": {
			"get": {
				"summary": "Get a payment link by ID",
				"operationId": "getPaymentLink",
				"tags": [
					"payment-links"
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "The payment link's ID (`pl_...`).",
						"schema": {
							"type": "string",
							"pattern": "^pl_[a-zA-Z0-9]+_[a-zA-Z0-9-]+$"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"description": "Comma-separated list of fields to expand (account, contract, charge, transaction, payment_method, payment). Note: These fields will only be populated for payment links with status PAYMENT_PENDING or PAYMENT_SUCCESS."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Payment link details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_link": {
											"$ref": "#/components/schemas/PaymentLink"
										}
									}
								}
							}
						}
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"put": {
				"summary": "Update a payment link",
				"operationId": "updatePaymentLink",
				"tags": [
					"payment-links"
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "The payment link's ID (`pl_...`).",
						"schema": {
							"type": "string",
							"pattern": "^pl_[a-zA-Z0-9]+_[a-zA-Z0-9-]+$"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"payment_link"
								],
								"properties": {
									"mode": {
										"type": "string",
										"enum": [
											"PATCH",
											"REPLACE"
										],
										"default": "REPLACE",
										"description": "Controls how the update is applied:\n* PATCH - Only update specified fields, retaining existing values for unspecified fields\n* REPLACE - Replace only the specified fields at the top level of the payment link object. Unspecified top-level fields (like options, state) are preserved. When updating nested objects like options or state, the entire nested object is replaced with the provided values. (default)\n\nExample behavior:\n1. Original payment link has: `{expires: \"2026-08-01T00:00:00Z\", options: {currency: \"USD\", amount: \"10.00\"}}`\n2. Update with PATCH mode and `{expires: \"2026-09-01T00:00:00Z\"}`: Results in `{expires: \"2026-09-01T00:00:00Z\", options: {currency: \"USD\", amount: \"10.00\"}}`\n3. Update with REPLACE mode and `{expires: \"2026-09-01T00:00:00Z\"}`: Results in `{expires: \"2026-09-01T00:00:00Z\", options: {currency: \"USD\", amount: \"10.00\"}}`\n4. Update with REPLACE mode and `{options: {currency: \"EUR\"}}`: Results in `{expires: \"2026-08-01T00:00:00Z\", options: {currency: \"EUR\"}}` (note that amount is removed)\n"
									},
									"payment_link": {
										"type": "object",
										"properties": {
											"expires": {
												"type": "string",
												"format": "date-time",
												"description": "Expiry date for the payment link.\nMust be a future date - cannot set expiry to a past date.\n"
											},
											"options": {
												"type": "object",
												"description": "Configuration options for the payment link experience",
												"properties": {
													"account": {
														"oneOf": [
															{
																"type": "string",
																"pattern": "^acc_[0-9]+_[0-9a-z]+$",
																"description": "Account ID to skip authentication section"
															},
															{
																"type": "object",
																"description": "Customer account details",
																"properties": {
																	"address": {
																		"type": "object",
																		"description": "Customer's address",
																		"properties": {
																			"country": {
																				"type": "string",
																				"description": "Country code"
																			},
																			"line1": {
																				"type": "string",
																				"description": "Address line 1"
																			},
																			"line2": {
																				"type": "string",
																				"description": "Address line 2"
																			},
																			"line3": {
																				"type": "string",
																				"description": "Address line 3"
																			},
																			"line4": {
																				"type": "string",
																				"description": "City/Town"
																			},
																			"line5": {
																				"type": "string",
																				"description": "Post code/ZIP code"
																			},
																			"line6": {
																				"type": "string",
																				"description": "State/Province (using ISO 3166-2 subdivision codes, e.g., 'CA' for California)"
																			}
																		}
																	},
																	"crm_key": {
																		"type": "string",
																		"description": "External CRM identifier for the customer"
																	},
																	"email": {
																		"type": "string",
																		"format": "email",
																		"description": "Customer's email address"
																	},
																	"first_name": {
																		"type": "string",
																		"description": "Customer's first name"
																	},
																	"last_name": {
																		"type": "string",
																		"description": "Customer's last name"
																	},
																	"phone": {
																		"type": "string",
																		"description": "Customer's phone number"
																	}
																}
															}
														]
													},
													"allow_description": {
														"type": "boolean",
														"description": "Whether to allow the payer to add a comment"
													},
													"alt_key": {
														"type": "string",
														"description": "Fixed reference for the payment (if specified, user cannot modify)"
													},
													"amount": {
														"type": "string",
														"description": "Fixed amount for the payment in major currency units, as a decimal string\nwithout commas, using '.' as the decimal separator (e.g. \"18.18\" for £18.18).\nIf specified, the payer cannot modify it.\n",
														"example": "18.18"
													},
													"description": {
														"type": "string",
														"description": "Fixed comment to show with payment"
													},
													"currency": {
														"type": "string",
														"description": "Three-letter ISO currency code",
														"pattern": "^[A-Z]{3}$"
													},
													"default_alt_key": {
														"type": "string",
														"description": "Default reference that user can modify"
													},
													"default_amount": {
														"type": "string",
														"description": "Default amount in major currency units, as a decimal string without commas,\nusing '.' as the decimal separator (e.g. \"100.00\"). The payer can modify it.\n",
														"example": "100.00"
													},
													"default_description": {
														"type": "string",
														"description": "Default comment to show (can be changed by payer if allow_description is true)"
													},
													"name": {
														"type": "string",
														"description": "Custom name for the payment link (defaults to instance name)"
													},
													"page_intro": {
														"type": "string",
														"description": "Custom introduction message for the payment page"
													},
													"page_pending_message": {
														"type": "string",
														"description": "Message to display to the user when their payment is pending authorization.\nOnly shown on the receipt page when skip_receipt is false and no pending_url is provided.\n"
													},
													"page_success_message": {
														"type": "string",
														"description": "Message to display to the user when their payment is successful.\nOnly shown on the receipt page when skip_receipt is false and no success_url is provided.\n"
													},
													"pending_url": {
														"type": "string",
														"format": "uri",
														"description": "URL to redirect users when payment requires authorization.\nQuery parameters included in redirect:\n* payment_link - Payment link ID\n* status - Will be 'PENDING'\n* contract - Contract ID if created\n* charge - Charge ID if created\n* transaction - Transaction ID if created\n* payment_method - Payment method ID if created\n* account - Account ID if created\n"
													},
													"save_card": {
														"type": "boolean",
														"description": "Controls whether payment methods are saved with payments.\n* true - Always save payment method\n* false - Never save payment method\n* null/undefined - Let user choose whether to save\n\n`false` also withdraws any payment method that can only be used by storing a token\nfirst - GoCardless Direct Debit and Instant Bank Pay, for example. To save nothing\nwhile still offering them, leave this unset and use `default_save_card` with\n`hide_save_card_toggle`.\n"
													},
													"default_save_card": {
														"type": "boolean",
														"description": "Initial state of the \"save payment method\" checkbox. The payer can still change it,\nand it is ignored when `save_card` is set. Unlike `save_card`, it does not restrict\nwhich payment methods are offered.\n"
													},
													"hide_save_card_toggle": {
														"type": "boolean",
														"description": "Hides the \"save payment method\" checkbox from the payer, leaving whatever\n`default_save_card` set in force.\n"
													},
													"skip_receipt": {
														"type": "boolean",
														"default": false,
														"description": "Controls redirect behavior after payment submission:\n* true - Immediately redirect to success_url/pending_url\n* false - Show receipt page with messages before redirect\n"
													},
													"source": {
														"type": "string",
														"enum": [
															"ECOMMERCE"
														],
														"default": "ECOMMERCE",
														"description": "Source of the payment link"
													},
													"channel": {
														"type": "string",
														"description": "Channel identifier to process the payment through"
													},
													"force_add": {
														"type": "boolean",
														"description": "Only allow new payment methods, do not show saved payment methods"
													},
													"timezone": {
														"type": "string",
														"description": "IANA timezone name for date/time display (e.g., America/New_York)"
													},
													"success_url": {
														"type": "string",
														"format": "uri",
														"description": "URL to redirect users after successful payment completion.\nQuery parameters included in redirect:\n* payment_link - Payment link ID\n* status - Will be 'COMPLETED'\n* contract - Contract ID if created\n* charge - Charge ID if created\n* transaction - Transaction ID if created\n* payment_method - Payment method ID if created\n* account - Account ID if created\nIf skip_receipt is true, redirect happens immediately after successful authorization.\nIf skip_receipt is false, URL is presented as a button on the receipt page.\nQuery parameters will be appended to this URL - see RedirectUrlParameters schema.\nParameters include: payment_link, status, contract, charge, transaction, payment_method, account.\nExample: https://shop.example.com/success?payment_link=pl_1234_abcdef&status=COMPLETED...\nUse these parameters to verify payment status and retrieve additional details via API.\n"
													}
												}
											},
											"state": {
												"oneOf": [
													{
														"type": "object"
													},
													{
														"type": "string"
													},
													{
														"type": "array"
													}
												],
												"description": "Custom state data for link creator. Can be an object, string, or array.\nMaximum size when stringified is 10KB.\n"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Payment link updated successfully",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_link": {
											"$ref": "#/components/schemas/PaymentLink"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"delete": {
				"summary": "Archive a payment link",
				"operationId": "archivePaymentLink",
				"tags": [
					"payment-links"
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "The payment link's ID (`pl_...`).",
						"schema": {
							"type": "string",
							"pattern": "^pl_[a-zA-Z0-9]+_[a-zA-Z0-9-]+$"
						}
					}
				],
				"responses": {
					"204": {
						"description": "Payment link archived successfully"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			}
		},
		"/charges": {
			"get": {
				"summary": "List charges",
				"operationId": "listCharges",
				"tags": [
					"charges"
				],
				"description": "Search and filter charge objects with pagination support.\n\nAvailable fields for criteria and order:\n- id\n- alt_key\n- contract\n- created\n- due\n- outstanding_amount\n- recurring: \"Y\" (true) \"N\" (false)\n- status\n- updated\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering charges. Available fields:\n- id\n- alt_key (your reference for a scheduled charge)\n- contract\n- created\n- due\n- outstanding_amount\n- recurring (Y/N)\n- status\n- updated\n\nExamples:\n- `status=ACTIVE`\n- `contract=co_12345_67890`\n- `alt_key=INSTALMENT_2`\n- `due<>2024-01-01;2024-12-31`\n- `outstanding_amount>=10`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\nSeparate multiple order fields with commas.\n\nExamples:\n- `order=due`\n- `order=outstanding_amount:desc`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- contract (contract object)\n- created_session (session object)\n- updated_session (session object)\n\nExample: `expand=contract`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of charges",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"charges": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Charge"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"error": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string"
												},
												"message": {
													"type": "string"
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/charges/{charge_id}": {
			"parameters": [
				{
					"name": "charge_id",
					"in": "path",
					"required": true,
					"description": "The charge's ID (`cg_...`), or the `alt_key` you gave it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "Get a charge",
				"operationId": "getCharge",
				"tags": [
					"charges"
				],
				"description": "Retrieve details of a specific charge.\n\nYou can expand the following fields:\n- contract\n- created_session\n- updated_session\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Charge details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"charge": {
											"$ref": "#/components/schemas/Charge"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					}
				}
			},
			"put": {
				"summary": "Update a charge",
				"operationId": "updateCharge",
				"tags": [
					"charges"
				],
				"description": "Update specific properties of a charge. Only certain fields can be modified:\n- status: Toggle between ACTIVE or WRITTENOFF\n- amount: New amount due (cannot be less than amount already paid)\n- due: Due date (if set to past date, payment may be taken immediately)\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"charge": {
										"type": "object",
										"properties": {
											"status": {
												"type": "string",
												"enum": [
													"ACTIVE",
													"WRITTENOFF"
												]
											},
											"amount": {
												"type": "string",
												"description": "New amount due, cannot be less than amount already paid"
											},
											"due": {
												"type": "string",
												"format": "date-time",
												"description": "When the charge is due"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated charge",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"charge": {
											"$ref": "#/components/schemas/Charge"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					}
				}
			}
		},
		"/accounts": {
			"get": {
				"summary": "List accounts",
				"operationId": "listAccounts",
				"tags": [
					"accounts"
				],
				"description": "Search and list account objects with various filtering criteria.\n\nThe search criteria syntax supports various operators:\n- `=` Exact match (multiple values with `;` for IN)\n- `~=` Partial match (contains)\n- `!=`, `>=`, `>`, `<`, `<=` Comparisons\n- `<>` Between (separate with `;`)\n- `!` Is null\n- `!!` Is not null\n\nMultiple criteria can be combined with `,` (AND).\nSee project README.md for detailed examples and usage.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering accounts. Available fields:\n- id\n- first_name\n- last_name\n- email\n- phone\n- company\n- crm_key\n- crm\n- channel\n- division\n- tags\n- last_transacted\n- created\n- updated\n\nExamples:\n- `email=user@example.com`\n- `status=ACTIVE;PENDING`\n- `company~=Tech`\n- `created<>2024-01-01;2024-12-31`\n- `status=ACTIVE,email~=example.com`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\nSeparate multiple order fields with commas.\n\nExamples:\n- `order=updated`\n- `order=last_name:desc`\n- `order=company,created:desc`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- last_transaction (transaction object)\n- created_session (session object)\n- updated_session (session object)\n\nExample: `expand=last_transaction,created_session`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"required": false,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"required": false,
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of accounts",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"accounts": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Account"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"description": "Invalid credentials (authentication is validated before instance key)"
					},
					"404": {
						"description": "Instance not found (only checked after successful authentication)"
					}
				}
			},
			"post": {
				"summary": "Create an account",
				"operationId": "createAccount",
				"tags": [
					"accounts"
				],
				"description": "Create a new account in the system.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"account"
								],
								"properties": {
									"account": {
										"type": "object",
										"required": [
											"crm_key"
										],
										"properties": {
											"company": {
												"type": "string",
												"description": "Company name"
											},
											"crm_key": {
												"type": "string",
												"description": "Your identifier for the account"
											},
											"email": {
												"type": "string",
												"description": "Email address. Invalid addresses are accepted to prevent interrupting payments due to email validation issues. Client applications can implement their own validation if needed."
											},
											"first_name": {
												"type": "string",
												"description": "First name of the account holder"
											},
											"last_name": {
												"type": "string",
												"description": "Last name of the account holder"
											},
											"phone": {
												"type": "string",
												"description": "Phone number. Any format is accepted to prevent interrupting payments due to phone validation issues. Client applications can implement their own validation if needed."
											},
											"address": {
												"$ref": "#/components/schemas/Account/properties/address"
											},
											"metadata": {
												"type": "object",
												"description": "Custom key-value pairs stored on the account",
												"additionalProperties": {
													"type": "string"
												}
											},
											"tags": {
												"type": "string",
												"description": "CSV of tags/references for searching"
											},
											"locale": {
												"type": "string",
												"description": "Locale of the user"
											},
											"timezone": {
												"type": "string",
												"description": "Timezone in IANA format"
											}
										}
									}
								}
							},
							"examples": {
								"basic": {
									"summary": "Basic account creation",
									"value": {
										"account": {
											"crm_key": "customer_123",
											"first_name": "John",
											"last_name": "Doe",
											"email": "john.doe@example.com"
										}
									}
								},
								"full": {
									"summary": "Full account with all fields",
									"value": {
										"account": {
											"crm_key": "customer_456",
											"first_name": "Jane",
											"last_name": "Smith",
											"company": "Acme Corp",
											"email": "jane.smith@acme.com",
											"phone": "+1-555-123-4567",
											"address": {
												"line1": "123 Main St",
												"line2": "Suite 100",
												"line4": "San Francisco",
												"line5": "94105",
												"line6": "CA",
												"country": "US"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Created account",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"account": {
											"$ref": "#/components/schemas/Account"
										}
									}
								},
								"examples": {
									"success": {
										"summary": "Successful account creation response",
										"value": {
											"account": {
												"id": "acc_12345_67890",
												"crm_key": "customer_456",
												"first_name": "Jane",
												"last_name": "Smith",
												"company": "Acme Corp",
												"email": "jane.smith@acme.com",
												"phone": "+1-555-123-4567",
												"address": {
													"line1": "123 Main St",
													"line2": "Suite 100",
													"line4": "San Francisco",
													"line5": "94105",
													"line6": "CA",
													"country": "US"
												},
												"status": "ACTIVE",
												"created": "2025-02-07T20:13:10Z",
												"updated": "2025-02-07T20:13:10Z",
												"v": 1
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"description": "Invalid credentials (authentication is validated before instance key)"
					},
					"404": {
						"description": "Instance not found (only checked after successful authentication)"
					}
				}
			}
		},
		"/accounts/{account_id}": {
			"parameters": [
				{
					"name": "account_id",
					"in": "path",
					"description": "The account's ID (`acc_...`), or its `crm_key`. If more than one account has that `crm_key`, the most recently updated one is used.",
					"required": true,
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "Get an account",
				"operationId": "getAccount",
				"tags": [
					"accounts"
				],
				"description": "Retrieve a single account by its ID or `crm_key`.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Available fields:\n- created_session\n- last_transaction\n- updated_session\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Account details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"account": {
											"$ref": "#/components/schemas/Account"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"put": {
				"summary": "Update an account",
				"operationId": "updateAccount",
				"tags": [
					"accounts"
				],
				"description": "Update an existing account's details. You can address the account by its ID or `crm_key`.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"account"
								],
								"properties": {
									"account": {
										"type": "object",
										"properties": {
											"address": {
												"$ref": "#/components/schemas/Account/properties/address"
											},
											"company": {
												"type": "string",
												"description": "Company name"
											},
											"email": {
												"type": "string",
												"description": "Email address. Invalid addresses are accepted to prevent interrupting payments due to email validation issues. Client applications can implement their own validation if needed."
											},
											"first_name": {
												"type": "string",
												"description": "First name of the account holder"
											},
											"last_name": {
												"type": "string",
												"description": "Last name of the account holder"
											},
											"locale": {
												"type": "string",
												"description": "Locale of the user"
											},
											"metadata": {
												"type": "object",
												"description": "Custom key-value pairs stored on the account",
												"additionalProperties": {
													"type": "string"
												}
											},
											"phone": {
												"type": "string",
												"description": "Phone number. Any format is accepted to prevent interrupting payments due to phone validation issues. Client applications can implement their own validation if needed."
											},
											"tags": {
												"type": "string",
												"description": "CSV of tags/references for searching"
											},
											"timezone": {
												"type": "string",
												"description": "Timezone in IANA format"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated account",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"account": {
											"$ref": "#/components/schemas/Account"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"description": "Invalid credentials (authentication is validated before instance key)"
					},
					"404": {
						"description": "Instance not found (only checked after successful authentication)"
					}
				}
			}
		},
		"/payments/{payment_id}": {
			"get": {
				"operationId": "getPayment",
				"tags": [
					"payments"
				],
				"summary": "Get a payment",
				"description": "Retrieve details of a specific payment. You can expand additional related objects using the expand parameter.\n\nAvailable expand options:\n* contract\n* transaction\n* parts\n* payment_method\n",
				"parameters": [
					{
						"name": "payment_id",
						"in": "path",
						"required": true,
						"description": "The payment's ID (`pay_...`), capture ID (`ca_...`) or transaction ID (`tr_...`), or the `alt_key` you gave it (case-insensitive).\nAn ID must be for a payment, capture or authorisation, otherwise 404 `Payment not found`.\nAn `alt_key` returns the newest record with that key.\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Related objects to include in the response",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Payment details",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PaymentResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"404": {
						"description": "Payment not found"
					}
				}
			}
		},
		"/payments": {
			"post": {
				"operationId": "createPayment",
				"tags": [
					"payments"
				],
				"summary": "Create a payment",
				"description": "Create a new payment. The payment can be immediate or scheduled, one-time or recurring.\nUnless rejected prior to processing, the API request will succeed and return a payment object\nin a SUCCESS or DECLINE status.\n",
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PaymentRequest"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Payment created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/PaymentResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					}
				}
			}
		},
		"/payments/{payment_id}/refund": {
			"post": {
				"operationId": "refundPayment",
				"tags": [
					"payments"
				],
				"summary": "Refund a payment",
				"description": "You can refund a payment in part or full, or simply mark a payment as refunded (if refunded offline). \nYou can refund \"PAYMENT\" and \"CAPTURE\" type transactions, but not \"AUTH\" (void an AUTH to release what is still reserved on it).\n\nNote, support for multi-refund (e.g., I pay $100 and refund $20 followed by a second refund of $80) \nis not available on all gateways.\n",
				"parameters": [
					{
						"name": "payment_id",
						"in": "path",
						"required": true,
						"description": "The payment's ID (`pay_...`), capture ID (`ca_...`) or transaction ID (`tr_...`), or the `alt_key` you gave it (case-insensitive).\nThe record must be a payment or capture, otherwise 404 `Payment not found`.\nAn `alt_key` resolves to the newest payment or capture with that key, ignoring failed attempts;\nif another one with the same `alt_key` was created in the last six months, the request fails with `Duplicate alt_key`.\n",
						"schema": {
							"type": "string"
						},
						"example": "tr_11842_10000"
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SimpleRefundRequest"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Refund processed",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"refund": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The unique ID of the refund",
													"example": "ref_11842_11073"
												},
												"payment": {
													"type": "string",
													"description": "The original payment this refund relates to",
													"example": "pay_11842_11072"
												},
												"amount": {
													"type": "string",
													"description": "The amount refunded",
													"example": "10"
												},
												"created": {
													"type": "string",
													"format": "date-time",
													"description": "When the refund was created/instructed",
													"example": "2020-11-27T15:17:15.000Z"
												},
												"processed": {
													"type": "string",
													"format": "date-time",
													"description": "When the refund completed processing",
													"example": "2020-11-27T15:17:18.000Z"
												},
												"reason": {
													"type": "string",
													"description": "The reason for the refund",
													"example": "Customer requested cancellation"
												},
												"reference": {
													"type": "string",
													"description": "A unique customer facing reference for the refund",
													"example": "BOLT-00011073"
												},
												"source_transaction": {
													"type": "string",
													"description": "The original transaction that is being refunded - may be a payment or a capture",
													"example": "tr_11842_11072"
												},
												"status": {
													"type": "string",
													"description": "The status of the refund transaction\n",
													"enum": [
														"SUCCESS",
														"PENDING",
														"DECLINED",
														"INVALID_PAYMENT_METHOD",
														"UNRESOLVED",
														"UNATTRIBUTED"
													]
												},
												"gateway_status": {
													"type": "string",
													"description": "The gateway status of the refund transaction\n",
													"enum": [
														"APPROVED",
														"PENDING",
														"DECLINED",
														"DECLINED_ERROR",
														"UNRESOLVED",
														"MANUAL"
													]
												},
												"gateway_message": {
													"type": "string",
													"description": "The message from the gateway (if pending or declined)"
												},
												"manual": {
													"type": "boolean",
													"description": "false if the refund was instructed, or true if it was only recorded (in which case \nthe onus is on the user to perform the refund via an offline method)\n",
													"default": false
												},
												"currency": {
													"type": "string",
													"description": "The currency of the refund (always the same as source transaction)",
													"example": "USD"
												},
												"account": {
													"type": "string",
													"description": "The ID of the person this refund is for"
												},
												"parts": {
													"type": "array",
													"description": "An array of parts objects for which charge(s) the refund was applied to",
													"items": {
														"type": "object"
													}
												},
												"offline": {
													"type": "boolean",
													"description": "true if this is just a record to indicate a refund was performed offline",
													"default": false
												},
												"updated": {
													"type": "string",
													"format": "date-time",
													"description": "The date the record was last updated"
												},
												"v": {
													"type": "integer",
													"description": "The version of the record"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Payment not found"
					}
				}
			}
		},
		"/payments/{payment_id}/capture": {
			"post": {
				"operationId": "capturePayment",
				"tags": [
					"payments"
				],
				"summary": "Capture a payment",
				"description": "Capture funds for a previously authorized payment. You must have created a payment with action=AUTH first.\n\nYou can capture the full authorized amount or a partial amount. Multiple partial captures are supported\non some gateways, up to the total authorized amount.\n",
				"parameters": [
					{
						"name": "payment_id",
						"in": "path",
						"required": true,
						"description": "The authorisation's payment ID (`pay_...`) or transaction ID (`tr_...`), or the `alt_key` you gave it (case-insensitive).\nThe record must be an authorisation, otherwise 404 `Payment not found`.\nAn `alt_key` resolves to the newest authorisation with an amount still open, ignoring failed attempts.\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CaptureRequest"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Capture processed",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CaptureResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid capture parameters"
					},
					"404": {
						"description": "Payment not found or not eligible for capture"
					}
				}
			}
		},
		"/payments/{payment_id}/void": {
			"post": {
				"operationId": "voidPayment",
				"tags": [
					"payments"
				],
				"summary": "Void a payment",
				"description": "Void (cancel) an authorisation, releasing the hold on the customer's funds.\nThe void is for the authorised amount less anything already captured, and nothing more can be captured afterwards.\n\nThere are no parameters required to void a payment.\n",
				"parameters": [
					{
						"name": "payment_id",
						"in": "path",
						"required": true,
						"description": "The authorisation's payment ID (`pay_...`) or transaction ID (`tr_...`), or the `alt_key` you gave it (case-insensitive).\nThe record must be an authorisation, otherwise 404 `Payment not found`.\nAn `alt_key` resolves to the newest authorisation with an amount still open, ignoring failed attempts.\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"type": "object"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Void processed",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/VoidResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Payment not found"
					}
				}
			}
		},
		"/refunds/{refund_id}": {
			"get": {
				"operationId": "getRefund",
				"tags": [
					"refunds"
				],
				"summary": "Get a refund",
				"description": "Retrieve details of a specific refund. You can expand additional related objects using the expand parameter.\n\nAvailable expand options:\n* account\n* created_session\n* parts\n* source_transaction\n* updated_session\n",
				"parameters": [
					{
						"name": "refund_id",
						"in": "path",
						"required": true,
						"description": "The refund's ID (`ref_...`).",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Related objects to include in the response",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Refund details",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/RefundResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"404": {
						"description": "Refund not found"
					}
				}
			}
		},
		"/captures/{capture_id}/refund": {
			"post": {
				"operationId": "refundCapture",
				"tags": [
					"refunds"
				],
				"summary": "Refund a capture",
				"description": "You can refund a capture in part or full, or simply mark a payment as refunded (if refunded offline).\n\nNote, support for multi-refund (e.g., I pay $100 and refund $20 followed by a second refund of $80) \nis not available on all gateways.\n",
				"parameters": [
					{
						"name": "capture_id",
						"in": "path",
						"required": true,
						"description": "The capture's ID (`ca_...`).",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SimpleRefundRequest"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Refund processed",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/RefundResponse"
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid refund parameters"
					},
					"404": {
						"description": "Capture not found or not eligible for refund"
					}
				}
			}
		},
		"/captures/{capture_id}": {
			"get": {
				"operationId": "getCapture",
				"tags": [
					"captures"
				],
				"summary": "Get a capture",
				"description": "Retrieve details of a specific capture transaction.\n\nYou can expand the following fields:\n* account\n* created_session\n* parts\n* source_transaction\n* updated_session\n",
				"parameters": [
					{
						"name": "capture_id",
						"in": "path",
						"required": true,
						"description": "The capture's ID (`ca_...`).",
						"schema": {
							"type": "string",
							"pattern": "^ca_[0-9]+_[0-9a-z]+$"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Capture details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"capture": {
											"$ref": "#/components/schemas/Capture"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"404": {
						"description": "Capture not found"
					}
				}
			}
		},
		"/voids/{void_id}": {
			"get": {
				"operationId": "getVoid",
				"tags": [
					"voids"
				],
				"summary": "Get a void",
				"description": "Retrieve details of a specific void transaction.\n\nYou can expand the following fields:\n* account\n* created_session\n* parts\n* source_transaction\n* updated_session\n",
				"parameters": [
					{
						"name": "void_id",
						"in": "path",
						"required": true,
						"description": "The void's ID (`vo_...`).",
						"schema": {
							"type": "string",
							"pattern": "^vo_[0-9]+_[0-9a-z]+$"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Void details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"void": {
											"$ref": "#/components/schemas/Void"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"404": {
						"description": "Void not found"
					}
				}
			}
		},
		"/contracts": {
			"get": {
				"summary": "List contracts",
				"operationId": "listContracts",
				"tags": [
					"contracts"
				],
				"description": "Search and filter contract objects with pagination support.\n\nAvailable fields for criteria and order:\n* id\n* account\n* alt_key\n* channel\n* completed\n* created\n* designation\n* division\n* frequency\n* gateway\n* initiative\n* legal_entity\n* next_charge\n* next_payment\n* nonce\n* occurrences\n* outstanding_amount\n* payment_method\n* retry_complete\n* retry_count\n* scheduler\n* status\n* updated\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering contracts. Available fields:\n- id\n- account\n- alt_key\n- channel\n- completed\n- created\n- designation\n- division\n- frequency\n- gateway\n- initiative\n- legal_entity\n- next_charge\n- next_payment\n- nonce\n- occurrences\n- outstanding_amount\n- payment_method\n- payment_method_status\n- payment_method_expires\n- retry_complete (Y/N)\n- retry_count\n- scheduler (Y/N)\n- status\n- updated\n\nExamples:\n- `status=ACTIVE;FAILING`\n- `account=acc_12345_67890`\n- `scheduler=Y`\n- `next_payment<>2024-01-01;2024-12-31`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\nSeparate multiple order fields with commas.\n\nExamples:\n- `order=next_payment`\n- `order=status,created:desc`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- account (account object)\n- payment_method (payment method object)\n- gateway (gateway object)\n- legal_entity (legal entity object)\n- initiative (initiative object)\n- designation (designation object)\n- channel (channel object)\n- last_transaction (transaction object)\n- last_charge (charge object)\n- created_session (session object)\n- updated_session (session object)\n\nExample: `expand=account,payment_method,last_transaction`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of contracts",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"contracts": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/get/responses/200/content/application~1json/schema/properties/contract"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}": {
			"get": {
				"summary": "Get a contract",
				"operationId": "getContract",
				"tags": [
					"contracts"
				],
				"description": "Retrieve details of a specific contract, by its ID or the `alt_key` you gave it.\n\nYou can expand the following fields:\n* account\n* created_session\n* payment_method\n* last_transaction\n* last_charge\n* updated_session\n",
				"parameters": [
					{
						"name": "contract_id",
						"in": "path",
						"required": true,
						"description": "The contract's ID (`co_...`), or the `alt_key` you gave it.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Contract details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"contract": {
											"type": "object",
											"description": "A contract representing a one-time or recurring payment agreement",
											"properties": {
												"account": {
													"type": "string",
													"description": "Associated account ID"
												},
												"alt_key": {
													"type": "string",
													"description": "Your reference for the contract"
												},
												"amount": {
													"type": "string",
													"description": "Contract amount"
												},
												"channel": {
													"type": "string",
													"description": "Channel ID"
												},
												"completed": {
													"type": "string",
													"format": "date-time",
													"description": "When the contract was completed"
												},
												"created": {
													"type": "string",
													"format": "date-time",
													"description": "When the contract was created"
												},
												"currency": {
													"type": "string",
													"description": "Currency code"
												},
												"description": {
													"type": "string",
													"description": "Description passed to the payment API"
												},
												"designation": {
													"type": "string",
													"description": "Designation ID"
												},
												"frequency": {
													"type": "string",
													"enum": [
														"WEEKLY",
														"FORTNIGHTLY",
														"BIMONTHLY",
														"MONTHLY",
														"QUARTERLY",
														"BIANNUALLY",
														"ANNUALLY"
													],
													"description": "Payment frequency for recurring contracts"
												},
												"gateway": {
													"type": "string",
													"description": "Payment gateway ID"
												},
												"id": {
													"type": "string",
													"description": "Contract ID"
												},
												"initiated": {
													"type": "string",
													"format": "date-time",
													"description": "When the contract was initiated"
												},
												"initiative": {
													"type": "string",
													"description": "Initiative ID"
												},
												"keep_active_until": {
													"type": "string",
													"format": "date-time",
													"description": "Optional. When set to a future date, the contract stays active until this date even after its final scheduled payment is collected, so mid-term amendments can still be applied. Once the date has passed and no balance is outstanding, the contract completes normally. Omitted when not set."
												},
												"last_charge": {
													"type": "string",
													"description": "ID of the last charge"
												},
												"last_transaction": {
													"type": "string",
													"description": "ID of the last transaction"
												},
												"legal_entity": {
													"type": "string",
													"description": "Legal entity ID"
												},
												"metadata": {
													"type": "object",
													"description": "Custom key-value pairs stored on the contract",
													"additionalProperties": {
														"type": "string"
													},
													"example": {
														"order_id": "12345",
														"customer_reference": "CUS-001"
													}
												},
												"next_contract": {
													"type": "string",
													"description": "ID of the successor contract (created when amount or frequency is changed)"
												},
												"next_payment": {
													"type": "string",
													"format": "date-time",
													"description": "When the next payment will be attempted"
												},
												"nonce": {
													"type": "string",
													"description": "Unique identifier for duplicate payment prevention. If the same nonce is submitted within 24 hours:\n1. No new contract will be created\n2. The success status of the previous contract will be returned\n"
												},
												"account_alt_key": {
													"type": "string",
													"description": "Your identifier for the account on this contract"
												},
												"charge_count": {
													"type": "integer",
													"description": "Number of charges raised on this contract"
												},
												"event_date": {
													"type": "string",
													"format": "date-time",
													"description": "Event date associated with the payment"
												},
												"outstanding_amount": {
													"type": "string",
													"description": "Amount remaining to be paid"
												},
												"payment_method": {
													"type": "string",
													"description": "Payment method ID"
												},
												"recurring": {
													"type": "boolean",
													"description": "Whether this is a recurring contract"
												},
												"retry_complete": {
													"type": "boolean",
													"description": "Whether retry attempts are exhausted"
												},
												"retry_count": {
													"type": "integer",
													"description": "Number of retry attempts made"
												},
												"status": {
													"type": "string",
													"enum": [
														"SETUP",
														"ACTIVE",
														"FAILING",
														"PENDING",
														"SUSPENDED",
														"UNRESOLVED",
														"COMPLETED",
														"CANCELLED",
														"CANCELLING"
													],
													"description": "Current contract status"
												},
												"updated": {
													"type": "string",
													"format": "date-time",
													"description": "When the contract was last modified"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			},
			"put": {
				"summary": "Update a contract",
				"operationId": "updateContract",
				"tags": [
					"contracts"
				],
				"description": "Update specific properties of a contract. The following fields can be modified:\n* next_charge: Next charge date or 'now'. Not accepted on a scheduled-charges contract or together with `charges` (move a charge's `due` instead), nor once every occurrence has been charged\n* occurrences: Total number of charges. Send `0` to remove the cap (until cancelled). Raising or removing the cap is refused once every occurrence has been charged\n* next_payment: Next payment attempt date, no more than 24 hours in the past, or 'now'. Send an empty string to clear it (not on a scheduled-charges contract)\n* payment_method: New payment method ID. It must belong to the contract's account and be active. On a scheduled single payment it changes the card the payment will be taken with. Cannot be combined with `status: SUSPENDED`\n* amount: New charge amount (creates new contract)\n* resume: Resume cancelled contract\n* scheduled_date: New schedule date\n* status: SUSPENDED/ACTIVE\n* metadata: Custom key-value pairs stored on the contract\n* alt_key: Your reference for the contract\n* description: Payment description\n* event_date: Event date\n* keep_active_until: Optional date that keeps the contract active past its final scheduled payment, so late amendments can still be applied. Send an empty string to clear it, or 'now' to end it now\n* charges: Add, update, or remove scheduled charges on a scheduled-charges contract\n* modify_in_place: Edit the existing contract and its charges directly instead of cancelling and cloning (only relevant when `charges` is supplied)\n\n**Resume restriction:** when resuming a cancelled or suspended contract (by setting `resume: true` or `status: ACTIVE`), you cannot change `amount`, `frequency`, `charges`, `event_date` or `payment_method` in the same request.\n\n**Legal entities:** a contract's `legal_entity` / `legal_entities` split cannot be changed after it is created. Sending the current value back is accepted and ignored; any other value is refused. Each charge's own `legal_entities` can be changed, and must add up to the charge amount.\n\n**Dates:** `next_charge`, `next_payment`, `keep_active_until` and each charge's `due` must be ISO 8601 dates (e.g. `2026-12-31T12:00:00+01:00`). A date with an offset is honoured; a date without one is read as UTC. An invalid date, such as 30 February, is refused.\n\nA value equal to the one already stored (for example a contract sent back unchanged) is not re-checked.\n",
				"parameters": [
					{
						"name": "contract_id",
						"in": "path",
						"required": true,
						"description": "The contract's ID (`co_...`).",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"contract": {
										"type": "object",
										"properties": {
											"alt_key": {
												"type": "string",
												"description": "Your reference for the contract"
											},
											"amount": {
												"type": "string"
											},
											"description": {
												"type": "string",
												"description": "Payment description"
											},
											"event_date": {
												"type": "string",
												"format": "date-time",
												"description": "Event date associated with the payment"
											},
											"keep_active_until": {
												"type": "string",
												"format": "date-time",
												"description": "Optional. When set to a future date, the contract stays active until this date even after its final scheduled payment is collected, so mid-term amendments can still be applied. Setting a past date, or an empty string to clear it, lets the contract complete normally once no balance is outstanding."
											},
											"metadata": {
												"type": "object",
												"description": "Custom key-value pairs to store on the contract",
												"additionalProperties": {
													"type": "string"
												},
												"example": {
													"order_id": "12345",
													"customer_reference": "CUS-001"
												}
											},
											"next_charge": {
												"type": "string",
												"format": "date-time"
											},
											"next_payment": {
												"type": "string",
												"format": "date-time",
												"description": "Next payment attempt date, no more than 24 hours in the past, or 'now'. An empty string clears it (not on a scheduled-charges contract)."
											},
											"occurrences": {
												"type": "integer",
												"description": "Total number of charges. `0` removes the cap, so the contract continues until cancelled."
											},
											"payment_method": {
												"type": "string",
												"description": "Payment method ID of the contract's account, active or failing. Cannot be combined with `status: SUSPENDED`."
											},
											"resume": {
												"type": "boolean"
											},
											"scheduled_date": {
												"type": "string",
												"format": "date-time"
											},
											"status": {
												"type": "string",
												"enum": [
													"SUSPENDED",
													"ACTIVE"
												]
											},
											"charges": {
												"type": "array",
												"description": "Change the scheduled charges on a scheduled-charges contract. Two modes\nare available, controlled by `modify_in_place`.\n\n### Replacement mode (default)\n\nThe existing contract is cancelled and a new one is created. The array\nmust list every charge from the existing contract — this is how you\nacknowledge its current state. What each entry does depends on the\nstate of the charge it refers to:\n\n* **Already-processed charges** (paid, in-flight, or written off) — pass\n  `{ id }` *or* `{ alt_key }` with no other fields. Listing them is\n  purely about acknowledging the prior state of the existing contract;\n  they remain on the cancelled original as historical record and are\n  **not** recreated on the new contract. Passing additional fields on\n  these entries is rejected.\n* **Unpaid existing charges** are transferred across to the new\n  contract. Pass `{ id }` or `{ alt_key }` to carry the charge over\n  unchanged, or include `amount`, `due`, or other fields in the same\n  entry to modify it during the transfer.\n* **Create** a new charge on the new contract — pass `{ amount, due }`\n  (and optionally `alt_key`) with no `id` or `alt_key` matching an\n  existing charge.\n\n### In-place mode (`modify_in_place: true`)\n\nEdits the existing contract and its charges directly. No new contract is\ncreated and existing charge IDs are retained. Each entry takes one of\nthree shapes:\n\n* **Add** a new charge — omit `id`. `amount` and `due` are required.\n* **Update** an existing charge — include its `id` plus the fields to\n  change (e.g., `amount` or `due`). Omitted fields are left unchanged.\n* **Remove** an existing charge — include its `id` *or* `alt_key` with `delete: true`.\n\n### Validation\n\nThe same rules apply as on create: a new or moved `due` cannot be more than\n7 days in the past (an existing charge whose `due` is unchanged is not\nchecked), amounts must be greater than zero, and a charge's\n`legal_entities` must add up to its amount - changing the amount of a split\ncharge means sending a matching split.\n\nNot permitted on a resume operation — see the resume restriction above.\n",
												"items": {
													"type": "object",
													"description": "A single entry in the `charges` array on a contract update. The valid combinations\ndepend on whether `modify_in_place` is set — see the `charges` description on the\nupdate endpoint for the full rules.\n",
													"properties": {
														"id": {
															"type": "string",
															"description": "Existing charge ID. In replacement mode (default), `id` (interchangeable with\n`alt_key`) identifies a charge from the existing contract: processed charges\nstay on the cancelled original, while unpaid charges are transferred to the\nnew contract and may be modified by passing additional fields. In\n`modify_in_place` mode, include `id` to update or delete an existing charge.\n",
															"example": "cg_11842_10005"
														},
														"alt_key": {
															"type": "string",
															"description": "Your reference for this charge. When updating, can be used in place of `id`\nto identify an existing charge on the contract.\n",
															"example": "INSTALMENT_4"
														},
														"amount": {
															"type": "string",
															"description": "The charge amount. Required when creating a charge.",
															"example": "50.00"
														},
														"due": {
															"type": "string",
															"description": "When the charge is due. Required when creating a charge. Accepts an ISO 8601\ntimestamp or the literal string `\"now\"`. Cannot be more than 24 hours in the\npast.\n",
															"example": "2026-08-01T09:00:00Z"
														},
														"delete": {
															"type": "boolean",
															"description": "Only valid in `modify_in_place` mode. Set to `true` together with `id` or\n`alt_key` to remove the charge from the contract.\n"
														}
													}
												},
												"example": [
													{
														"id": "cg_11842_10005",
														"amount": "75.00"
													},
													{
														"alt_key": "INSTALMENT_4",
														"amount": "50.00",
														"due": "2026-08-01T09:00:00Z"
													},
													{
														"id": "cg_11842_10006",
														"delete": true
													}
												]
											},
											"modify_in_place": {
												"type": "boolean",
												"description": "Only relevant when `charges` is supplied. When `true`, edits the existing\ncontract and its charges in place rather than cancelling the contract and\ncreating a new one. See the `charges` description for the entry shapes\neach mode accepts. Defaults to `false`.\n"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated contract",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"contract": {
											"$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/get/responses/200/content/application~1json/schema/properties/contract"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}/future_charges": {
			"parameters": [
				{
					"name": "contract_id",
					"in": "path",
					"required": true,
					"description": "The contract's ID (`co_...`), or the `alt_key` you gave it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "Get future charges",
				"operationId": "getFutureCharges",
				"tags": [
					"contracts"
				],
				"description": "Lists projected future charges for a recurring (frequency-based) contract — up to 3 years\nor 100 charges ahead. For contracts created with explicit scheduled charges, use\n[List contract charges](/reference/inst-listcontractcharges) instead, which returns the\nconcrete charges that were created upfront.\n",
				"responses": {
					"200": {
						"description": "List of future charges",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"charges": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Charge"
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}/charges": {
			"parameters": [
				{
					"name": "contract_id",
					"in": "path",
					"required": true,
					"description": "The contract's ID (`co_...`).",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "List contract charges",
				"operationId": "listContractCharges",
				"tags": [
					"contracts"
				],
				"description": "List the charges attached to a contract. Ordered by due date ascending by default.\n\nThis endpoint is most useful for contracts created with explicit scheduled charges,\nwhere all charges are created upfront at contract creation. For frequency-based\nrecurring contracts, charges are generated on schedule as each billing cycle comes\ndue — use [Get future charges](/reference/inst-getfuturecharges) to see projected future\ncharges that have not yet been generated.\n",
				"parameters": [
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Defaults to `due` (due date ascending) if not specified.\nAppend `:desc` for descending order.\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- contract (contract object)\n- created_session (session object)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of charges on the contract",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"charges": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Charge"
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					}
				}
			}
		},
		"/contracts/{contract_id}/cancel": {
			"parameters": [
				{
					"name": "contract_id",
					"in": "path",
					"required": true,
					"description": "The contract's ID (`co_...`), or the `alt_key` you gave it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"post": {
				"summary": "Cancel a contract",
				"operationId": "cancelContract",
				"tags": [
					"contracts"
				],
				"description": "Cancelling a contract will prevent future charges being created on a contract and stop all\nautomated payments. A contract may still have an outstanding balance at time of cancellation.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"write_off": {
										"type": "boolean",
										"description": "If any outstanding amount should be written off. If not and there's an outstanding amount, the contract will transition to CANCELLING status"
									},
									"cancel_retries": {
										"type": "boolean",
										"description": "If automatic retries should be stopped for any outstanding amount. This will set next_payment to blank"
									},
									"strict": {
										"type": "boolean",
										"description": "If true, reject the cancellation when a transaction is in progress on the contract. Use when you need certainty that no further payment will be allocated after cancellation. Defaults to false, in which case the cancellation proceeds and any in-progress transaction resolves independently."
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated contract",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"contract": {
											"$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/get/responses/200/content/application~1json/schema/properties/contract"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}/payment": {
			"parameters": [
				{
					"name": "contract_id",
					"in": "path",
					"required": true,
					"description": "The contract's ID (`co_...`), or the `alt_key` you gave it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"post": {
				"summary": "Create a payment",
				"operationId": "contractCreatePayment",
				"tags": [
					"contracts"
				],
				"description": "For recurring payments which have an amount overdue you can instruct us to attempt payment\nof the outstanding balance on either the default payment method or an alternative one.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"amount": {
										"type": "string",
										"description": "Amount to process. By default the total outstanding. Cannot be greater than outstanding amount. Not available for split payments (enterprise)"
									},
									"payment_method": {
										"type": "string",
										"description": "Payment method to use. By default the contract's payment method will be used"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Created transaction",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"transaction": {
											"$ref": "#/paths/~1transactions~1%7Btransaction_id%7D/get/responses/200/content/application~1json/schema/properties/transaction"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}/payment_method_url": {
			"parameters": [
				{
					"name": "contract_id",
					"in": "path",
					"required": true,
					"description": "The contract's ID (`co_...`).",
					"schema": {
						"type": "string"
					}
				}
			],
			"post": {
				"summary": "Create URL to update payment method",
				"operationId": "createPaymentMethodUrl",
				"tags": [
					"contracts"
				],
				"description": "Generate an encoded URL to direct a browser to, allowing a user to modify their method of\npayment on a recurring contract.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"locale": {
										"type": "string",
										"description": "2 letter language code or full locale (eg 'en' or 'en_US'). Uses browser locale if not specified"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Generated URL",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"url": {
											"type": "string",
											"description": "URL to redirect the user to"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/contracts/{contract_id}/refund": {
			"post": {
				"operationId": "refundContract",
				"tags": [
					"refunds"
				],
				"summary": "Refund a contract",
				"description": "You can refund a contract, which allows you to refund multiple transactions at once for recurring \npayments / subscriptions. \n",
				"parameters": [
					{
						"name": "contract_id",
						"in": "path",
						"required": true,
						"description": "The contract's ID (`co_...`), or the `alt_key` you gave it.",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ContractRefundRequest"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Refund processed",
						"content": {
							"application/json": {
								"schema": {
									"oneOf": [
										{
											"$ref": "#/components/schemas/ContractRefundValidateResponse"
										},
										{
											"$ref": "#/components/schemas/ContractRefundExecuteResponse"
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Bad request",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContractRefundErrorResponse"
								}
							}
						}
					}
				}
			}
		},
		"/webhooks": {
			"post": {
				"summary": "Attach webhook",
				"operationId": "attachWebhook",
				"description": "Adds a URL to the instance's `webhook_target`, alongside any URLs already there (see [Webhook configuration](/reference/webhooks-intro#webhook-configuration)).\nAttaching a URL that is already attached updates its `retries` instead of adding it again.\n",
				"tags": [
					"instance-webhooks"
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"webhook"
								],
								"properties": {
									"webhook": {
										"$ref": "#/components/schemas/WebhookCreate"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Webhook successfully attached",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/WebhookAttachResponse"
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			}
		},
		"/webhooks/{id}": {
			"delete": {
				"summary": "Detach webhook",
				"operationId": "detachWebhook",
				"description": "Removes the URL with this `id` from the instance's `webhook_target`. The `id` is the one returned when you attached the URL.\n",
				"tags": [
					"instance-webhooks"
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "The webhook `id` returned by [Attach webhook](/reference/attachwebhook)",
						"schema": {
							"type": "string",
							"pattern": "^[a-f0-9]{32}$",
							"example": "5d41402abc4b2a76b9719d911017c592"
						}
					}
				],
				"responses": {
					"204": {
						"description": "Webhook successfully detached"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			}
		},
		"/transactions": {
			"get": {
				"operationId": "listTransactions",
				"summary": "List transactions",
				"description": "This request performs a simple search against `transaction` objects.\n\nAvailable fields for `criteria` and `order`:\n* account\n* action\n* alt_key\n* amount\n* contract\n* created\n* currency\n* gateway\n* gateway_reference\n* id\n* initiated\n* payment_method\n* processed\n* reference\n* source\n* source_transaction\n* status\n* sub_status\n* updated\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering transactions. Available fields:\n- id\n- account\n- action\n- alt_key\n- amount\n- contract\n- created\n- currency\n- gateway\n- gateway_reference\n- gateway_status\n- initiated\n- payment_method\n- processed\n- reference\n- source\n- source_transaction\n- status\n- sub_status\n- updated\n\nExamples:\n- `status=SUCCESS`\n- `account=acc_12345_67890`\n- `action=PAYMENT`\n- `created<>2024-01-01;2024-12-31`\n- `gateway_reference=ch_1234567890`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\nSeparate multiple order fields with commas.\n\nExamples:\n- `order=processed:desc`\n- `order=amount:desc`\n- `order=status,created:desc`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- account (account object)\n- captures (capture objects)\n- contract (contract object)\n- created_session (session object)\n- gateway (gateway object)\n- parts (transaction part objects)\n- payment_method (payment method object)\n- refunds (refund objects)\n- source_transaction (transaction object)\n- updated_session (session object)\n\nExample: `expand=account,contract,payment_method`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"transactions": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1transactions~1%7Btransaction_id%7D/get/responses/200/content/application~1json/schema/properties/transaction"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					}
				}
			}
		},
		"/transactions/{transaction_id}": {
			"get": {
				"operationId": "getTransaction",
				"summary": "Get a transaction",
				"description": "Get details of a specific transaction.\n\nYou can expand the following fields:\n- account\n- captures\n- contract\n- created_session\n- gateway\n- parts\n- payment_method\n- refunds\n- source_transaction\n- updated_session\n",
				"parameters": [
					{
						"name": "transaction_id",
						"in": "path",
						"required": true,
						"description": "The transaction's ID (`tr_...`), or its `alt_key`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"transaction": {
											"type": "object",
											"properties": {
												"account": {
													"type": "string",
													"description": "The person the transaction was for"
												},
												"action": {
													"type": "string",
													"enum": [
														"PAYMENT",
														"REFUND",
														"AUTH",
														"CAPTURE",
														"VOID"
													],
													"description": "The type of transaction"
												},
												"alt_key": {
													"type": "string",
													"description": "Your reference for the transaction"
												},
												"amount": {
													"type": "string",
													"description": "The amount of the transaction"
												},
												"authorisation_code": {
													"type": "string",
													"description": "The authorisation code returned from the gateway"
												},
												"authorised": {
													"type": "string",
													"description": "The amount authorised (and uncaptured) if an AUTH"
												},
												"balance": {
													"type": "string",
													"description": "The payment amount less any refunds"
												},
												"browser_ip_address": {
													"type": "string",
													"description": "The browser's IP address"
												},
												"browser_accept_header": {
													"type": "string",
													"description": "The browser's accept header"
												},
												"browser_javascript": {
													"type": "boolean",
													"description": "If the browser has javascript enabled"
												},
												"browser_locale": {
													"type": "string",
													"description": "The browser's locale"
												},
												"browser_user_agent": {
													"type": "string",
													"description": "The browser's user agent"
												},
												"browser_size": {
													"type": "string",
													"description": "The browser's screen dimension"
												},
												"browser_java_enabled": {
													"type": "boolean",
													"description": "If the browser has java enabled"
												},
												"browser_color_depth": {
													"type": "string",
													"description": "The browser's color depth"
												},
												"browser_timezone": {
													"type": "string",
													"description": "The browser's timezone"
												},
												"captures": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "The IDs of any related captures"
												},
												"captured": {
													"type": "string",
													"description": "The amount of the authorisation that has been captured if an AUTH"
												},
												"channel": {
													"type": "string",
													"description": "(enterprise) The channel the transaction was processed via"
												},
												"contract": {
													"type": "string",
													"description": "The contract this transaction belongs to"
												},
												"created": {
													"type": "string",
													"format": "date-time",
													"description": "When the transaction was created"
												},
												"created_session": {
													"type": "string",
													"description": "The session the object was created by"
												},
												"currency": {
													"type": "string",
													"description": "The currency in ISO format"
												},
												"description": {
													"type": "string",
													"description": "The order description"
												},
												"designation": {
													"type": "string",
													"description": "(enterprise) The designation the transaction was processed via"
												},
												"division": {
													"type": "string",
													"description": "(enterprise) The division from which the payment was instructed"
												},
												"expires": {
													"type": "string",
													"format": "date-time",
													"description": "If action = AUTH the date the authorisation expires (where known)"
												},
												"gateway": {
													"type": "string",
													"description": "The gateway the transaction was processed via"
												},
												"gateway_message": {
													"type": "string",
													"description": "The status message returned by the gateway"
												},
												"gateway_metadata": {
													"type": "object",
													"description": "Any metadata returned by the gateway"
												},
												"gateway_reference": {
													"type": "string",
													"description": "The gateway identifier for the transaction"
												},
												"gateway_status": {
													"type": "string",
													"description": "The category or error message received from the gateway"
												},
												"gateway_view_transaction": {
													"type": "string",
													"description": "For gateways that support it, a link to the processor's dashboard"
												},
												"id": {
													"type": "string",
													"description": "The ID of the transaction"
												},
												"initiated": {
													"type": "string",
													"format": "date-time",
													"description": "When the transaction was instructed by the user"
												},
												"initiative": {
													"type": "string",
													"description": "(enterprise) The initiative the transaction was for"
												},
												"legal_entity": {
													"type": "string",
													"description": "(enterprise) The legal entity the transaction was processed via"
												},
												"next_attempt": {
													"type": "string",
													"description": "The next payment attempt if a declined payment that was retried"
												},
												"metadata": {
													"type": "object",
													"description": "Custom key-value pairs stored on the transaction",
													"additionalProperties": true
												},
												"parts": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "Array of parts objects for which charge(s) the transaction was applied to"
												},
												"payment_method": {
													"type": "string",
													"description": "The payment_method / card used"
												},
												"payment_method_used_token": {
													"type": "boolean",
													"description": "Whether a saved payment method token was used (true) or if payment details were submitted directly with this transaction (false)"
												},
												"processed": {
													"type": "string",
													"format": "date-time",
													"description": "When the transaction was processed"
												},
												"redirect_url": {
													"type": "string",
													"description": "The URL if 3DS is required"
												},
												"reason": {
													"type": "string",
													"description": "If action == REFUND the reason for refund"
												},
												"reference": {
													"type": "string",
													"description": "The transaction customer facing reference (format BOLT-123445)"
												},
												"refunds": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "The IDs of any related refunds"
												},
												"refund": {
													"type": "string",
													"description": "If action == REFUND a link to the refund object"
												},
												"refunded": {
													"type": "string",
													"description": "The amount of the transaction that has been refunded"
												},
												"resolved": {
													"type": "string",
													"format": "date-time",
													"description": "When the transaction was resolved"
												},
												"settle_currency": {
													"type": "string",
													"description": "The currency the transaction was settled in if different"
												},
												"settle_fee_amount": {
													"type": "string",
													"description": "The amount of fees deducted for processing"
												},
												"settle_gross_amount": {
													"type": "string",
													"description": "The amount paid in the settlement currency"
												},
												"settle_net_amount": {
													"type": "string",
													"description": "The amount settled less fees"
												},
												"source": {
													"type": "string",
													"enum": [
														"ECOMMERCE",
														"MOTO",
														"RECURRING",
														"POS"
													],
													"description": "The source for the transaction"
												},
												"source_transaction": {
													"type": "string",
													"description": "For refunds, references the transaction being refunded"
												},
												"status": {
													"type": "string",
													"enum": [
														"SUCCESS",
														"PENDING",
														"DECLINED",
														"REQAUTH",
														"INVALID_PAYMENT_METHOD",
														"UNRESOLVED",
														"UNATTRIBUTED"
													],
													"description": "The status of the transaction:\n* SUCCESS - The transaction was approved\n* PENDING - The transaction is still in progress\n* DECLINED - The transaction was declined\n* REQAUTH - The payment requires authorization step (e.g. 3D secure)\n* INVALID_PAYMENT_METHOD - Invalid payment method used\n* UNRESOLVED - No conclusive approval/decline received\n* UNATTRIBUTED - Success but internal recording issue\n"
												},
												"sub_status": {
													"type": "string",
													"enum": [
														"NO_ACTION_REQUIRED",
														"CUSTOMER_ACTION_REQUIRED",
														"MERCHANT_ACTION_REQUIRED"
													],
													"description": "Sub-status of the transaction, present when the gateway is waiting for someone to act:\n* CUSTOMER_ACTION_REQUIRED - the customer still has something to do, e.g. a bank transfer\n  or Multibanco payment is PENDING until they make the transfer or pay the voucher\n* MERCHANT_ACTION_REQUIRED - reserved for future use\n* NO_ACTION_REQUIRED - nothing is outstanding\n\nOmitted and `NO_ACTION_REQUIRED` mean the same thing - treat an absent `sub_status` as\nno action required.\n"
												},
												"sub_status_reason": {
													"type": "string",
													"description": "Free-text description of the sub-status, e.g. `follow_bank_transfer_instructions`, `follow_voucher_instructions` or `partially_funded`. Descriptive only - not searchable.",
													"example": "follow_bank_transfer_instructions"
												},
												"target_date": {
													"type": "string",
													"format": "date-time",
													"description": "Intended payment date. Present only when the transaction was created ahead of its target date because the payment method requires gateway advance notice (e.g. SEPA/BACS/GoCardless/Stripe ACH). This is the target date, not the settlement date, and is omitted for payment methods that charge on the due date."
												},
												"updated": {
													"type": "string",
													"format": "date-time",
													"description": "When the transaction was last updated"
												},
												"updated_session": {
													"type": "string",
													"description": "The session the object was updated by"
												},
												"voided": {
													"type": "string",
													"description": "The amount of the authorisation that has been voided if an AUTH"
												},
												"voids": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "The IDs of any related void transactions"
												},
												"v": {
													"type": "integer",
													"description": "The version of the object"
												},
												"workflows": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "Any workflows that were applied to the payment"
												},
												"workflow_status": {
													"type": "string",
													"enum": [
														"OK",
														"STOP",
														"SUSPEND"
													],
													"description": "The current status of the workflow"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Transaction not found"
					}
				}
			}
		},
		"/gateways": {
			"get": {
				"operationId": "listGateways",
				"summary": "List gateways",
				"description": "List and search gateways for an instance.\n\nAvailable search fields:\n* `id`: Gateway ID\n* `code`: Your gateway reference\n* `created`: Creation timestamp\n* `division`: Division ID\n* `processor`: Processor type (e.g., STRIPE)\n* `status`: Gateway status\n* `updated`: Last update timestamp\n\nExpandable fields:\n* `authenticate_js`: JavaScript for express checkout\n* `checkout_js`: JavaScript for normal checkout\n* `credit_message_js`: JavaScript for credit messages\n* `created_session`: Creation session details\n* `processor`: Processor details\n* `updated_session`: Update session details\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering gateways. Available fields:\n- id\n- code\n- created\n- division\n- processor\n- status\n- updated\n\nExamples:\n- `status=ACTIVE`\n- `processor=STRIPE`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- authenticate_js (JavaScript for express checkout)\n- checkout_js (JavaScript for normal checkout)\n- credit_message_js (JavaScript for credit messages)\n- created_session (session object)\n- processor (processor details)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of gateways",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"gateways": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1gateways/post/responses/200/content/application~1json/schema/properties/gateway"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					}
				}
			},
			"post": {
				"operationId": "createGateway",
				"summary": "Create a gateway",
				"description": "Create a new gateway connection",
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"gateway": {
										"type": "object",
										"required": [
											"processor"
										],
										"properties": {
											"processor": {
												"type": "string",
												"description": "Payment processor type (e.g., STRIPE)"
											},
											"name": {
												"type": "string",
												"description": "Display name for the gateway"
											},
											"code": {
												"type": "string",
												"description": "Your ID for the gateway (optional)"
											},
											"values": {
												"type": "object",
												"description": "Gateway-specific configuration values"
											},
											"tags": {
												"type": "array",
												"description": "Tags for searching and organizing",
												"items": {
													"type": "string"
												}
											},
											"metadata": {
												"type": "object",
												"description": "Custom metadata key-value pairs",
												"additionalProperties": true
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Created gateway",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"gateway": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "Shuttle's ID for the gateway"
												},
												"name": {
													"type": "string",
													"description": "Display name for the gateway"
												},
												"code": {
													"type": "string",
													"description": "Your ID for the gateway (or auto-generated)"
												},
												"division": {
													"type": "string",
													"description": "Division ID (enterprise)"
												},
												"status": {
													"type": "string",
													"description": "Gateway status",
													"enum": [
														"CREATED",
														"LINKED",
														"ACTIVE",
														"ARCHIVE",
														"SETUP",
														"INACTIVE",
														"RUNDOWN"
													]
												},
												"status_reason": {
													"type": "string",
													"description": "Reason for current status (e.g., access revoked)"
												},
												"processor": {
													"type": "string",
													"description": "Payment processor type (e.g., STRIPE)"
												},
												"processor_name": {
													"type": "string",
													"description": "Display name of the processor"
												},
												"processor_account_name": {
													"type": "string",
													"description": "Name of connected merchant account"
												},
												"gateway_group": {
													"type": "string",
													"description": "Group ID for sharing payment tokens"
												},
												"currencies": {
													"type": "array",
													"description": "Supported payment currencies",
													"items": {
														"type": "string"
													}
												},
												"payment_method_types": {
													"type": "object",
													"description": "Supported ecommerce payment methods",
													"additionalProperties": {
														"type": "object",
														"properties": {
															"features": {
																"type": "array",
																"items": {
																	"type": "string",
																	"enum": [
																		"AUTHORISE",
																		"AUTHORISE_AND_SAVE_TOKEN",
																		"AUTHORISE_ON_SAVED_TOKEN",
																		"PAYMENT",
																		"COMPLETE_AUTHORISATION",
																		"PAYMENT_AND_SAVE_TOKEN",
																		"PAYMENT_ON_SAVED_TOKEN",
																		"SAVE_CARD",
																		"FULL_REFUND",
																		"PARTIAL_REFUND",
																		"MULTI_REFUND",
																		"CAPTURE",
																		"VOID",
																		"RAW_PAN"
																	]
																}
															}
														}
													}
												},
												"payment_method_types_moto": {
													"type": "object",
													"description": "Supported MOTO payment methods",
													"additionalProperties": {
														"$ref": "#/components/schemas/Gateway/properties/payment_method_types/additionalProperties"
													}
												},
												"metadata": {
													"type": "object",
													"description": "Custom key-value pairs",
													"additionalProperties": true
												},
												"tags": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "Tags/references"
												},
												"features": {
													"type": "object",
													"description": "Feature flags for the gateway",
													"additionalProperties": true
												},
												"created": {
													"type": "string",
													"format": "date-time",
													"description": "Creation timestamp"
												},
												"created_session": {
													"type": "string",
													"description": "Session that created this gateway"
												},
												"updated": {
													"type": "string",
													"format": "date-time",
													"description": "Last update timestamp"
												},
												"updated_session": {
													"type": "string",
													"description": "Session that last updated this gateway"
												},
												"v": {
													"type": "integer",
													"description": "Record version"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"422": {
						"description": "Validation error - invalid gateway configuration"
					}
				}
			}
		},
		"/gateways/{gateway_id}": {
			"get": {
				"operationId": "getGateway",
				"summary": "Get a gateway",
				"description": "Get details of a specific gateway",
				"parameters": [
					{
						"name": "gateway_id",
						"in": "path",
						"required": true,
						"description": "The gateway's ID (`gw_...`), or its `code`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Gateway details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"gateway": {
											"$ref": "#/paths/~1gateways/post/responses/200/content/application~1json/schema/properties/gateway"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Gateway not found"
					}
				}
			},
			"put": {
				"operationId": "updateGateway",
				"summary": "Update a gateway",
				"description": "Updating a gateway is intended to be used in conjunction with Shuttle support.\n* `gateway_id` can be either ID or code\n\nRequest fields:\n* `status` (optional) - update the status to one of `ACTIVE`, `RUNDOWN`, `ARCHIVE`\n* `values` - A map of parameters, specific to the gateway, for valid options contact support\n* `tags` - An array of strings to store on this objects, you can search objects by tag\n* `metadata` - A list of key values pairs to store on a object\n\nGateway statuses:\n* `ACTIVE` - Supports new payments and new payment methods\n* `RUNDOWN` - Only support payments on existing payment_methods\n* `ARCHIVE` - Does not support new payments or payment_methods, nor will any API requests be made to the gateway in this status\n",
				"parameters": [
					{
						"name": "gateway_id",
						"in": "path",
						"required": true,
						"description": "The gateway's ID (`gw_...`), or its `code`.",
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"gateway": {
										"type": "object",
										"properties": {
											"status": {
												"type": "string",
												"enum": [
													"ACTIVE",
													"RUNDOWN",
													"ARCHIVE"
												],
												"description": "Gateway status"
											},
											"values": {
												"type": "object",
												"description": "Gateway-specific configuration values"
											},
											"tags": {
												"type": "array",
												"description": "Tags for searching and organizing",
												"items": {
													"type": "string"
												}
											},
											"metadata": {
												"type": "object",
												"description": "Custom metadata key-value pairs",
												"additionalProperties": true
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated gateway",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"gateway": {
											"$ref": "#/paths/~1gateways/post/responses/200/content/application~1json/schema/properties/gateway"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Gateway not found"
					},
					"422": {
						"description": "Validation error - invalid gateway configuration"
					}
				}
			}
		},
		"/gateways/{gateway_id}/connection": {
			"get": {
				"operationId": "getGatewayConnection",
				"summary": "Get gateway connection status",
				"description": "Get the current connection status of a gateway",
				"parameters": [
					{
						"name": "gateway_id",
						"in": "path",
						"required": true,
						"description": "The gateway's ID (`gw_...`), or its `code`.",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Gateway connection status",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"connection": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "Gateway ID"
												},
												"connection_status": {
													"type": "string",
													"description": "Current connection status (e.g., OK)"
												},
												"connection_status_date": {
													"type": "string",
													"format": "date-time",
													"description": "Timestamp of the last status check"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Gateway not found"
					}
				}
			}
		},
		"/gateways/{gateway_id}/settings": {
			"get": {
				"operationId": "getGatewaySettings",
				"summary": "Get gateway settings",
				"description": "Get the settings for a specific gateway",
				"parameters": [
					{
						"name": "gateway_id",
						"in": "path",
						"required": true,
						"description": "The gateway's ID (`gw_...`), or its `code`.",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Gateway settings",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"settings": {
											"type": "object",
											"description": "Gateway-specific settings"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Gateway not found"
					}
				}
			}
		},
		"/gateways/{gateway_id}/payment_method_count": {
			"get": {
				"operationId": "getGatewayPaymentMethodCount",
				"summary": "Get gateway's saved payment method count",
				"description": "Get the approximate number of saved payment methods on a gateway.\n\nNote: The number is accurate as of the \"updated\" date, however a cached value will be returned if more than 100 in total.\nThe duration of the cache scales with the number of saved payment methods, values over 10k will only be updated monthly.\n",
				"parameters": [
					{
						"name": "gateway_id",
						"in": "path",
						"required": true,
						"description": "The gateway's ID (`gw_...`), or its `code`.",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Payment method count details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"gateway": {
											"type": "string",
											"description": "Gateway ID"
										},
										"total": {
											"type": "integer",
											"description": "Total number of saved payment methods"
										},
										"by_status": {
											"type": "object",
											"description": "Breakdown by payment method status",
											"properties": {
												"ACTIVE": {
													"type": "integer",
													"description": "Count of payment methods that were successful on last use"
												},
												"FAILING": {
													"type": "integer",
													"description": "Count of payment methods that were declined on last use"
												}
											}
										},
										"updated": {
											"type": "string",
											"format": "date-time",
											"description": "Timestamp when the count was last updated"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					},
					"401": {
						"description": "Unauthorized - invalid credentials"
					},
					"404": {
						"description": "Gateway not found"
					}
				}
			}
		},
		"/instances": {
			"servers": [
				{
					"url": "https://app.shuttleglobal.com/c/api",
					"description": "Platform API (not scoped to an instance)"
				}
			],
			"get": {
				"operationId": "listInstances",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "List instances",
				"description": "Performs a search against instance objects with optional filtering, sorting, and pagination.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "The search criteria (URL encoded). Available fields: application, client, contact_email, contact_name, contact_phone, created, domain, id, last_contract, last_transaction, name, status, updated\n\nSupports the following operators:\n- `=`: Exact match, separate multiple values with `;` for IN operation\n- `!=`: Not equal\n- `>=`, `>`, `<`, `<=`: Greater than/equal, less than/equal\n- `~=`: Partial match (case insensitive)\n- `<>`: Between, separate values with `;` (e.g., `<>min;max`)\n- `!`: Is null\n- `!!`: Is not null\n\nSeparate multiple criteria with commas (`,`)\n\nNotes:\n- Strings are case insensitive (with some exceptions)\n- Booleans are Y/N (TIP: check for `=Y` or `!=Y` as some objects treat false as null)\n\nExamples:\n- `status=ACTIVE;FAILING` (status is either ACTIVE or FAILING)\n- `status=ACTIVE;FAILING,email=dave@gmail.com` (status is ACTIVE or FAILING AND email is dave@gmail.com)\n- `name~=Test` (name contains 'Test')\n- `created<>2023-01-01;2023-12-31` (created between Jan 1 and Dec 31, 2023)\n- `scheduler=Y` (scheduler is enabled)\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "The sort order to apply. Format: `field[:desc][,field2[:desc]]`\n- Supports any field that criteria supports\n- Defaults to created:desc if not specified\n- Will order ascending unless you specify desc\n- Separate multiple order fields with commas\n\nExamples:\n- order=updated (sort by updated ascending)\n- order=updated:desc (sort by updated descending)\n- order=status,updated:desc (sort by status ascending, then updated descending)\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"required": false,
						"schema": {
							"type": "integer",
							"default": 20
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"required": false,
						"schema": {
							"type": "integer",
							"default": 0
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"instances": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Instance"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer",
													"description": "The limit used for the query"
												},
												"offset": {
													"type": "integer",
													"description": "The offset used for the query"
												},
												"total": {
													"type": "integer",
													"description": "The total number of records matching the query"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request"
					},
					"401": {
						"description": "Unauthorized"
					}
				}
			},
			"post": {
				"operationId": "createInstance",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "Create an instance",
				"description": "Create a new merchant instance",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"instance": {
										"type": "object",
										"required": [
											"instance_key"
										],
										"properties": {
											"instance_key": {
												"type": "string",
												"description": "Your ID for the instance (unique to the application)"
											},
											"name": {
												"type": "string",
												"description": "The name of the instance, typically company name"
											},
											"checkout_urls": {
												"type": "array",
												"description": "Domains where you embed the Shuttle checkout widget. Required to enable Apple Pay and Google Pay on those domains.\n\nOnly list domains where you embed checkout yourself (e.g., your platform pages). Shuttle automatically registers its own hosted pages (payment links, hosted checkout at app.shuttleglobal.com). If you only use Shuttle-hosted payment pages, this field is not needed.\n",
												"items": {
													"type": "string"
												}
											},
											"contact_email": {
												"type": "string",
												"description": "The contact email for the instance"
											},
											"contact_name": {
												"type": "string",
												"description": "The contact name for the instance"
											},
											"contact_phone": {
												"type": "string",
												"description": "The contact phone for the instance"
											},
											"country": {
												"type": "string",
												"description": "The country for the instance"
											},
											"legal_entities": {
												"type": "array",
												"description": "Enterprise only - an array of legal entities that can receive payment",
												"items": {
													"type": "object",
													"required": [
														"code",
														"name"
													],
													"properties": {
														"code": {
															"type": "string",
															"description": "Your ID for the entity (alphanumeric _ -, no spaces)"
														},
														"name": {
															"type": "string",
															"description": "The name of the entity"
														},
														"country": {
															"type": "string",
															"description": "The 2 digit ISO code of the country in which it is incorporated"
														}
													}
												}
											},
											"merchant_name": {
												"type": "string",
												"description": "The merchant's display name, used for Apple Pay and Click to Pay registration. Falls back to `name` if not set."
											},
											"receipt_format": {
												"type": "string",
												"description": "Template for generating transaction references. Must contain at least one of:\n- `#TRANSACTIONKEY#` — a zero-left-padded 8-digit number, incrementing per instance from 10000 (e.g., `00010000`, `00010001`). Not globally unique.\n- `#TRANSACTIONID#` — the same sequence number (unpadded) prefixed with the instance's client ID (e.g., `1234_10000`). Globally unique.\n\nExample: `INV-#TRANSACTIONKEY#`\n\n**Note:** Some gateways require transaction references to be unique across all connections. If you are connecting multiple Shuttle instances to the same gateway account, use a unique prefix per instance (e.g., `MERCHANT1-#TRANSACTIONKEY#`) to avoid collisions. Alternatively, use `#TRANSACTIONID#` which is globally unique and requires no prefix.\n\nSome gateways also impose a maximum length on transaction references. If the formatted reference exceeds the gateway's limit, it will be front-trimmed -- only the trailing characters are kept. Keep this in mind when designing long prefixes.\n"
											},
											"secret_key": {
												"type": "string",
												"description": "Generates a per-instance API key that allows the merchant to authenticate directly against their instance without requiring the platform's application credentials. Set to `\"NEW\"` to auto-generate a key.\n\nOn update: pass `\"NEW\"` to rotate the key, `false` or `\"\"` to clear it, or `true` to leave the existing key unchanged.\n"
											},
											"tcs_accepted": {
												"type": "boolean",
												"description": "True if the user manually accepted the T&Cs - do not populate this unless you have collected proof of this"
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"instance": {
											"$ref": "#/components/schemas/Instance"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request"
					},
					"401": {
						"description": "Unauthorized"
					}
				}
			}
		},
		"/instances/{instance_id}": {
			"servers": [
				{
					"url": "https://app.shuttleglobal.com/c/api",
					"description": "Platform API (not scoped to an instance)"
				}
			],
			"get": {
				"operationId": "getInstance",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "Get instance",
				"description": "Retrieve a specific instance by ID or instance_key",
				"parameters": [
					{
						"name": "instance_id",
						"in": "path",
						"description": "The instance's ID (`cl_...`), or the `instance_key` you gave it.",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Available options: application, secret_key\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"instance": {
											"$ref": "#/components/schemas/Instance"
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "Unauthorized"
					},
					"404": {
						"description": "Instance not found"
					}
				}
			},
			"put": {
				"operationId": "updateInstance",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "Update an instance",
				"description": "Update an existing instance. Only the passed fields will be updated, fields not passed will not be updated. To blank a field, pass the field with an empty string.\n",
				"parameters": [
					{
						"name": "instance_id",
						"in": "path",
						"description": "The instance's ID (`cl_...`), or the `instance_key` you gave it.",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"instance": {
										"type": "object",
										"properties": {
											"instance_key": {
												"type": "string",
												"description": "If you want to update the instance key from that in the URL"
											},
											"name": {
												"type": "string",
												"description": "The name of the instance"
											},
											"application": {
												"type": "string",
												"description": "If you want to change the application this instance belongs to"
											},
											"checkout_urls": {
												"type": "array",
												"description": "Domains where you embed the Shuttle checkout widget. Required to enable Apple Pay and Google Pay on those domains.\n\nOnly list domains where you embed checkout yourself. Shuttle automatically registers its own hosted pages.\n",
												"items": {
													"type": "string"
												}
											},
											"contact_email": {
												"type": "string",
												"description": "The contact email for the instance"
											},
											"contact_name": {
												"type": "string",
												"description": "The contact name for the instance"
											},
											"contact_phone": {
												"type": "string",
												"description": "The contact phone for the instance"
											},
											"country": {
												"type": "string",
												"description": "The country for the instance"
											},
											"legal_entities": {
												"type": "array",
												"description": "Enterprise only - an array of legal entities that can receive payment",
												"items": {
													"$ref": "#/paths/~1instances/post/requestBody/content/application~1json/schema/properties/instance/properties/legal_entities/items"
												}
											},
											"merchant_name": {
												"type": "string",
												"description": "The merchant's display name, used for Apple Pay and Click to Pay registration. Falls back to `name` if not set."
											},
											"receipt_format": {
												"type": "string",
												"description": "Template for generating transaction references. Must contain at least one of:\n- `#TRANSACTIONKEY#` — zero-left-padded 8-digit number, incrementing per instance from 10000 (e.g., `00010000`). Not globally unique.\n- `#TRANSACTIONID#` — the same sequence number (unpadded) prefixed with the client ID (e.g., `1234_10000`). Globally unique.\n\nIf connecting multiple instances to the same gateway account, use a unique prefix per instance or use `#TRANSACTIONID#` to avoid reference collisions. If the formatted reference exceeds a gateway's length limit, it will be front-trimmed.\n"
											},
											"secret_key": {
												"type": "string",
												"description": "Rotate or clear the per-instance API key. Pass `\"NEW\"` to generate a new key, `false` or `\"\"` to clear it, or `true` to leave the existing key unchanged.\n"
											},
											"tcs_accepted": {
												"type": "boolean",
												"description": "True if the user manually accepted the T&Cs - you can only modify this to true and not back again"
											},
											"v": {
												"type": "integer",
												"description": "The version of the record for optimistic concurrency control"
											},
											"webhook_target": {
												"type": "string",
												"description": "The webhook target URL for this instance. Replaces the application-level webhook destination for this instance -- events are not sent to both. Supports retry, failover, and fan-out configuration. See [Webhook Destinations](/reference/webhooks-intro#webhook-destinations)."
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"instance": {
											"$ref": "#/components/schemas/Instance"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request"
					},
					"401": {
						"description": "Unauthorized"
					},
					"404": {
						"description": "Instance not found"
					}
				}
			},
			"delete": {
				"operationId": "deleteInstance",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "Delete instance",
				"description": "Mark an instance as INACTIVE. This action cannot be reversed and should be used with extreme caution.\n\nThis endpoint will, with immediate effect, mark an instance as INACTIVE. While the instance may exist in the instance list as INACTIVE for up to one year, it will be inaccessible. No further instructions will be issued by the instance (including any instructions to cancel previously issued instructions, or invalidate previously generated third party credentials). Any instructions mid-way through completion will lapse (e.g., an authorized payment not yet captured).\n",
				"parameters": [
					{
						"name": "instance_id",
						"in": "path",
						"description": "The instance's ID (`cl_...`), or the `instance_key` you gave it.",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"204": {
						"description": "Instance successfully deleted"
					},
					"401": {
						"description": "Unauthorized"
					},
					"404": {
						"description": "Instance not found"
					}
				}
			}
		},
		"/instances/{instance_id}/capabilities": {
			"servers": [
				{
					"url": "https://app.shuttleglobal.com/c/api",
					"description": "Platform API (not scoped to an instance)"
				}
			],
			"get": {
				"operationId": "getInstanceCapabilities",
				"security": [
					{
						"basicAuth": []
					}
				],
				"tags": [
					"Instances"
				],
				"summary": "Get instance capabilities",
				"description": "Retrieve the payment capabilities of an instance. This API allows you to determine if the instance is able to process specific types of payments.\n",
				"parameters": [
					{
						"name": "instance_id",
						"in": "path",
						"description": "The instance's ID (`cl_...`), or the `instance_key` you gave it.",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "currency",
						"in": "query",
						"description": "Filter capabilities by currency",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"capabilities": {
											"$ref": "#/paths/~1capabilities/get/responses/200/content/application~1json/schema/properties/capabilities"
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "Unauthorized"
					},
					"404": {
						"description": "Instance not found"
					}
				}
			}
		},
		"/capabilities": {
			"get": {
				"operationId": "getCapabilities",
				"tags": [
					"Instances"
				],
				"summary": "Get capabilities",
				"description": "Retrieve the payment capabilities of the current instance. This endpoint is available within the merchant instance context and does not require an instance ID in the path.\n",
				"parameters": [
					{
						"name": "currency",
						"in": "query",
						"description": "Filter capabilities by currency",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"capabilities": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The ID of the capabilities record"
												},
												"payments_ready": {
													"type": "boolean",
													"description": "Whether the instance is ready to process payments"
												},
												"currencies": {
													"type": "array",
													"description": "List of supported currencies",
													"items": {
														"type": "string"
													}
												},
												"token_gateways": {
													"type": "array",
													"description": "List of token gateways",
													"items": {
														"type": "string"
													}
												},
												"payment_method_types": {
													"type": "object",
													"description": "Map of payment method types to their supported features",
													"additionalProperties": {
														"type": "object",
														"properties": {
															"features": {
																"type": "array",
																"items": {
																	"type": "string"
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "Unauthorized"
					}
				}
			}
		},
		"/deep_links": {
			"post": {
				"summary": "Create a deep link",
				"operationId": "createDeepLink",
				"tags": [
					"deep-links"
				],
				"description": "Create a new deep link. All fields are nested under the `deep_link` field.\nSee the deep link types section for available deep links and their specific parameters.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"deep_link": {
										"$ref": "#/components/schemas/DeepLink/allOf/0"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Created deep link",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"deep_link": {
											"$ref": "#/components/schemas/DeepLink"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/deep_links/{deep_link_id}": {
			"parameters": [
				{
					"name": "deep_link_id",
					"in": "path",
					"required": true,
					"description": "The deep link's `id`, as returned when you created it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "Get a deep link",
				"operationId": "getDeepLink",
				"tags": [
					"deep-links"
				],
				"description": "Retrieve details of an existing deep link.\n",
				"responses": {
					"200": {
						"description": "Deep link details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"deep_link": {
											"$ref": "#/components/schemas/DeepLink"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Deep link not found"
					}
				}
			},
			"put": {
				"summary": "Update a deep link",
				"operationId": "updateDeepLink",
				"tags": [
					"deep-links"
				],
				"description": "Update an existing deep link",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"deep_link": {
										"$ref": "#/components/schemas/DeepLink"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated deep link",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"deep_link": {
											"$ref": "#/components/schemas/DeepLink"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			},
			"delete": {
				"summary": "Delete a deep link",
				"operationId": "deleteDeepLink",
				"tags": [
					"deep-links"
				],
				"description": "Delete an existing deep link",
				"responses": {
					"204": {
						"description": "Deep link deleted"
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/legal_entities": {
			"get": {
				"operationId": "listLegalEntities",
				"tags": [
					"legal-entities"
				],
				"summary": "List legal entities",
				"description": "Search and list legal entity objects with pagination support.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering legal entities. Available fields:\n- id\n- code\n- company_type\n- created\n- division\n- name\n- status\n- tags\n- updated\n\nExamples:\n- `status=ACTIVE`\n- `company_type=GB_LIMITED_COMPANY`\n- `code=ORG`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- created_session (session object)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of legal entities",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"legal_entities": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/LegalEntity"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request"
					}
				}
			}
		},
		"/legal_entities/{legal_entity_id}": {
			"parameters": [
				{
					"name": "legal_entity_id",
					"in": "path",
					"required": true,
					"description": "The legal entity's ID (`le_...`), or its `code`.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getLegalEntity",
				"tags": [
					"legal-entities"
				],
				"summary": "Get a legal entity",
				"description": "Retrieve details of a specific legal entity by ID or code.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects.\n\nAvailable fields:\n- created_session (session object)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Legal entity details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"legal_entity": {
											"$ref": "#/components/schemas/LegalEntity"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Legal entity not found"
					}
				}
			}
		},
		"/legal_entity_routes": {
			"get": {
				"operationId": "listLegalEntityRoutes",
				"tags": [
					"legal-entity-routes"
				],
				"summary": "List legal entity routes",
				"description": "Search and list legal entity route objects with pagination support.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering routes. Available fields:\n- id\n- created\n- gateway\n- legal_entity\n- legal_entity_code\n- status\n- updated\n\nExamples:\n- `status=ACTIVE`\n- `legal_entity=le_12345_10000`\n- `gateway=gw_12345_10000`\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- created_session (session object)\n- gateway (gateway object)\n- legal_entity (legal entity object)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of legal entity routes",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"legal_entity_routes": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/LegalEntityRoute"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request"
					}
				}
			}
		},
		"/legal_entity_routes/{legal_entity_route_id}": {
			"parameters": [
				{
					"name": "legal_entity_route_id",
					"in": "path",
					"required": true,
					"description": "The legal entity route's ID (`lr_...`).",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getLegalEntityRoute",
				"tags": [
					"legal-entity-routes"
				],
				"summary": "Get a legal entity route",
				"description": "Retrieve details of a specific legal entity route.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects.\n\nAvailable fields:\n- created_session (session object)\n- gateway (gateway object)\n- legal_entity (legal entity object)\n- updated_session (session object)\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Legal entity route details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"legal_entity_route": {
											"$ref": "#/components/schemas/LegalEntityRoute"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Legal entity route not found"
					}
				}
			}
		},
		"/workflows": {
			"get": {
				"operationId": "listWorkflows",
				"tags": [
					"workflows"
				],
				"summary": "List workflows",
				"description": "List workflows configured for the instance.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of workflows",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"workflows": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Workflow"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/workflows/{workflow_id}": {
			"parameters": [
				{
					"name": "workflow_id",
					"in": "path",
					"required": true,
					"description": "The workflow's ID (`wf_...`), or its `code`.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getWorkflow",
				"tags": [
					"workflows"
				],
				"summary": "Get a workflow",
				"description": "Retrieve details of a specific workflow.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Workflow details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"workflow": {
											"$ref": "#/components/schemas/Workflow"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Workflow not found"
					}
				}
			}
		},
		"/workflows/{workflow_id}/connection": {
			"parameters": [
				{
					"name": "workflow_id",
					"in": "path",
					"required": true,
					"description": "The workflow's ID (`wf_...`), or its `code`.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getWorkflowConnection",
				"tags": [
					"workflows"
				],
				"summary": "Get workflow connection status",
				"description": "Retrieve the connection status of a workflow.\n",
				"responses": {
					"200": {
						"description": "Workflow connection details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object"
								}
							}
						}
					},
					"404": {
						"description": "Workflow not found"
					}
				}
			}
		},
		"/workflows/{workflow_id}/settings": {
			"parameters": [
				{
					"name": "workflow_id",
					"in": "path",
					"required": true,
					"description": "The workflow's ID (`wf_...`), or its `code`.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getWorkflowSettings",
				"tags": [
					"workflows"
				],
				"summary": "Get workflow settings",
				"description": "Retrieve the settings/configuration of a workflow.\n",
				"responses": {
					"200": {
						"description": "Workflow settings",
						"content": {
							"application/json": {
								"schema": {
									"type": "object"
								}
							}
						}
					},
					"404": {
						"description": "Workflow not found"
					}
				}
			}
		},
		"/payment_methods": {
			"get": {
				"summary": "List payment methods",
				"operationId": "listPaymentMethods",
				"tags": [
					"payment-methods"
				],
				"description": "Search and list payment method objects with various filtering criteria.\n",
				"parameters": [
					{
						"name": "criteria",
						"in": "query",
						"description": "Search criteria for filtering payment methods. Available fields:\n- id\n- account\n- bin\n- code\n- created\n- expiry\n- failing_since\n- gateway\n- last4\n- last_used\n- mandate_reference\n- source\n- status\n- sub_status\n- token\n- type\n- updated\n\nExamples:\n- `account=acc_12345_67890`\n- `status=ACTIVE`\n- `type=VISA`\n- `expiry<>2024-01;2024-12`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "order",
						"in": "query",
						"description": "Sort order for results. Supports any field that criteria supports.\nDefaults to `created:desc` if not specified. Append `:desc` for descending order.\nSeparate multiple order fields with commas.\n\nExamples:\n- `order=last_used:desc`\n- `order=type,created:desc`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Separate multiple fields with commas.\n\nAvailable fields:\n- account (account object)\n- bin (card BIN object)\n- gateway (gateway object)\n- created_session (session object)\n- updated_session (session object)\n\nExample: `expand=account,gateway`\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Number of records to return: 20 if not set, at most 1000.",
						"required": false,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "offset",
						"in": "query",
						"description": "Number of records to skip before the first one returned. `offset` + `limit` can't exceed 5000; to read further, page by a field such as `created` instead. See [Paging through results](/reference/inst-paging).",
						"required": false,
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of payment methods",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_methods": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1payment_methods/post/responses/200/content/application~1json/schema/properties/payment_method"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"offset": {
													"type": "integer"
												},
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"description": "Resource not found",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"error": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string"
												},
												"message": {
													"type": "string"
												}
											}
										}
									}
								}
							}
						}
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"post": {
				"summary": "Create a payment method",
				"operationId": "createPaymentMethod",
				"tags": [
					"payment-methods"
				],
				"description": "Create a new payment method. This API supports two main use cases:\n1. Data import/copy (token import)\n2. Third-party UI integration (payment details capture and gateway tokenization)\n\nFor third-party UI integration or custom tokenization flows, please contact support\nas additional gateway-specific requirements may apply.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"payment_method"
								],
								"properties": {
									"payment_method": {
										"type": "object",
										"required": [
											"account"
										],
										"properties": {
											"account": {
												"oneOf": [
													{
														"type": "string",
														"description": "Account ID or CRM key"
													},
													{
														"$ref": "#/paths/~1accounts/post/requestBody/content/application~1json/schema/properties/account"
													}
												],
												"description": "Account this payment method belongs to"
											},
											"address": {
												"$ref": "#/components/schemas/Account/properties/address"
											},
											"code": {
												"type": "string",
												"description": "Your ID for this payment method"
											},
											"expiry": {
												"type": "string",
												"description": "Expiry date in MM/YYYY format"
											},
											"gateway": {
												"type": "string",
												"description": "Gateway this payment method is linked to"
											},
											"last4": {
												"type": "string",
												"description": "Last 4+ digits of the payment method identifier"
											},
											"manual": {
												"type": "boolean",
												"description": "Must be true for token import, false for third-party UI integration"
											},
											"name": {
												"type": "string",
												"description": "Display name of the payment method"
											},
											"requires_cvc": {
												"type": "boolean",
												"description": "Whether CVC is required for ecommerce/MOTO payments"
											},
											"status": {
												"type": "string",
												"enum": [
													"ACTIVE",
													"FAILING"
												],
												"description": "Initial status of the payment method"
											},
											"token": {
												"type": "string",
												"description": "Gateway token (format varies by gateway)"
											},
											"type": {
												"type": "string",
												"description": "Payment method type (e.g., VISA, MASTERCARD, SEPA, ACH)"
											},
											"source": {
												"type": "string",
												"enum": [
													"ECOMMERCE",
													"MOTO",
													"POS"
												],
												"description": "Source of the payment method"
											},
											"tags": {
												"type": "string",
												"description": "CSV of tags/references"
											},
											"metadata": {
												"type": "object",
												"description": "Custom key-value pairs",
												"additionalProperties": true
											},
											"bin": {
												"type": "string",
												"description": "Card BIN number"
											},
											"card_number": {
												"type": "string",
												"description": "Card number. Non-digits are stripped. Required unless a bank detail set, a wallet detail set or a `token` is sent."
											},
											"card_expiry": {
												"type": "string",
												"description": "Card expiry. Alias of `expiry`. Accepts MMYY, MM/YY, M/YY or MYY and is stored as a month."
											},
											"card_cvc": {
												"type": "string",
												"description": "Card security code. Passed to the gateway and never stored."
											},
											"iban": {
												"type": "string",
												"description": "IBAN. Alias `sepa_iban`. Makes the method SEPA."
											},
											"account_holder_name": {
												"type": "string",
												"description": "Name on the bank account. Aliases `cardholder_name`, `sepa_account_holder_name`, `ach_account_holder_name`."
											},
											"account_type": {
												"type": "string",
												"description": "Bank account type: `checking`, `savings` or `businessChecking`. Alias `ach_account_type`. Makes the method ACH."
											},
											"routing_number": {
												"type": "string",
												"description": "Bank routing number. Alias `ach_routing_number`."
											},
											"account_number": {
												"type": "string",
												"description": "Bank account number. Alias `ach_account_number`. Makes the method BACS when no other type applies."
											},
											"contracts": {
												"type": "array",
												"items": {
													"type": "string"
												},
												"description": "Ids of the contracts this payment method is attached to once it is active."
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Payment method created",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_method": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"pattern": "^pm_[0-9]+_[0-9a-z]+$",
													"description": "Unique identifier for the payment method"
												},
												"account": {
													"type": "string",
													"description": "Account ID this payment method belongs to"
												},
												"address": {
													"$ref": "#/components/schemas/Account/properties/address"
												},
												"advanced_notice_hours": {
													"type": "integer",
													"description": "Number of hours this payment method requires between a payment being instructed and\nthe funds settling at the bank. Returned by gateways for schemes that need lead time\n(e.g., BACS, SEPA, ACH, PAD, BECS). Absent / null for card and wallet methods.\n\nWhen set, Shuttle schedules each charge and its payment attempt this many hours before\nthe charge's due date — the due date itself is unchanged, but the charge is generated\nand sent to the gateway earlier so the customer is debited on time. See the\n[Scheduler](/docs/epfp-scheduler) guide for details.\n",
													"example": 180
												},
												"archived": {
													"type": "string",
													"format": "date-time",
													"description": "When the payment method was archived (deleted)"
												},
												"authorisation_url": {
													"type": "string",
													"description": "Link for 3DS or equivalent process during creation"
												},
												"code": {
													"type": "string",
													"description": "Your ID for this payment method"
												},
												"created": {
													"type": "string",
													"format": "date-time",
													"description": "When the payment method was created"
												},
												"created_session": {
													"type": "string",
													"description": "Session that created this payment method"
												},
												"expiry": {
													"type": "string",
													"description": "Expiry date in MM/YYYY format"
												},
												"failing_reason": {
													"type": "string",
													"description": "Reason this payment method is not working"
												},
												"failing_since": {
													"type": "string",
													"format": "date-time",
													"description": "When this payment method stopped working"
												},
												"gateway": {
													"type": "string",
													"description": "Gateway this payment method is linked to"
												},
												"gateway_group": {
													"type": "string",
													"description": "Group identifier for gateways that support payment method sharing. When present, this payment method\ncan be used across any gateway that shares the same gateway_group. This feature is only supported\non specific gateway implementations.\n"
												},
												"gateway_status": {
													"type": "string",
													"description": "Gateway's status of the payment method"
												},
												"last4": {
													"type": "string",
													"description": "Last 4+ digits of the payment method identifier"
												},
												"last_used": {
													"type": "string",
													"format": "date-time",
													"description": "When this payment method was last used"
												},
												"mandate_id": {
													"type": "string",
													"description": "ID of the legal mandate where applicable"
												},
												"mandate_link": {
													"type": "string",
													"description": "Link to the legal mandate where applicable"
												},
												"mandate_reference": {
													"type": "string",
													"description": "Customer-facing mandate reference number"
												},
												"mandate_text": {
													"type": "string",
													"description": "Legal text of the mandate"
												},
												"name": {
													"type": "string",
													"description": "Display name of the payment method"
												},
												"requires_cvc": {
													"type": "boolean",
													"description": "Whether CVC is required for ecommerce/MOTO payments"
												},
												"source": {
													"type": "string",
													"enum": [
														"MOTO",
														"ECOMMERCE",
														"POS"
													],
													"description": "Where the payment method was captured"
												},
												"status": {
													"type": "string",
													"enum": [
														"ACTIVE",
														"FAILING",
														"FAILED",
														"ARCHIVE",
														"EXPIRED",
														"INACTIVE",
														"SINGLEUSE",
														"REQAUTH"
													],
													"description": "Current status of the payment method"
												},
												"sub_status": {
													"type": "string",
													"description": "Free text substatus (e.g., mandate status for GOCARDLESS)"
												},
												"sub_status_reason": {
													"type": "string",
													"description": "Description of the substatus"
												},
												"tags": {
													"type": "string",
													"description": "CSV of tags/references"
												},
												"metadata": {
													"type": "object",
													"description": "Custom key-value pairs",
													"additionalProperties": true
												},
												"bin": {
													"type": "string",
													"description": "Card BIN number"
												},
												"card_holder_name": {
													"type": "string",
													"description": "Name on the card"
												},
												"eci": {
													"type": "string",
													"description": "Electronic Commerce Indicator value"
												},
												"network_token": {
													"type": "boolean",
													"description": "Whether this payment method uses a network token"
												},
												"source_type": {
													"type": "string",
													"description": "Source card type"
												},
												"token": {
													"type": "string",
													"description": "Gateway token (only for ACTIVE and FAILING methods)"
												},
												"type": {
													"type": "string",
													"description": "Payment method type (e.g., VISA, MASTERCARD, SEPA, ACH)"
												},
												"updated_session": {
													"type": "string",
													"description": "Session that last updated this payment method"
												},
												"v": {
													"type": "integer",
													"description": "Version of the record"
												}
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"description": "Instance not found (only checked after successful authentication)"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			}
		},
		"/payment_methods/{payment_method_id}": {
			"parameters": [
				{
					"name": "payment_method_id",
					"in": "path",
					"description": "The payment method's ID (`pm_...`), or its `code`.",
					"required": true,
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"summary": "Get a payment method",
				"operationId": "getPaymentMethod",
				"tags": [
					"payment-methods"
				],
				"description": "Retrieve a single payment method by ID or code.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Fields to expand into full objects. Available fields:\n- account\n- created_session\n- gateway\n- updated_session\n",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Payment method details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_method": {
											"$ref": "#/paths/~1payment_methods/post/responses/200/content/application~1json/schema/properties/payment_method"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"put": {
				"summary": "Update a payment method",
				"operationId": "updatePaymentMethod",
				"tags": [
					"payment-methods"
				],
				"description": "Update an existing payment method's details.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"payment_method"
								],
								"properties": {
									"payment_method": {
										"type": "object",
										"properties": {
											"address": {
												"$ref": "#/components/schemas/Account/properties/address"
											},
											"code": {
												"type": "string",
												"description": "Your ID for this payment method"
											},
											"expiry": {
												"type": "string",
												"description": "Expiry date in MM/YYYY format"
											},
											"last4": {
												"type": "string",
												"description": "Last 4+ digits of the payment method identifier"
											},
											"manual": {
												"type": "boolean",
												"description": "Must be true as only manual updates are currently supported"
											},
											"name": {
												"type": "string",
												"description": "Display name of the payment method"
											},
											"requires_cvc": {
												"type": "boolean",
												"description": "Whether CVC is required for ecommerce/MOTO payments"
											},
											"token": {
												"type": "string",
												"description": "Gateway token (format varies by gateway)"
											},
											"tags": {
												"type": "string",
												"description": "CSV of tags/references"
											},
											"metadata": {
												"type": "object",
												"description": "Custom key-value pairs",
												"additionalProperties": true
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Updated payment method",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"payment_method": {
											"$ref": "#/paths/~1payment_methods/post/responses/200/content/application~1json/schema/properties/payment_method"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			},
			"delete": {
				"summary": "Delete a payment method",
				"operationId": "deletePaymentMethod",
				"tags": [
					"payment-methods"
				],
				"description": "Archive (soft delete) a payment method.",
				"responses": {
					"204": {
						"description": "Payment method archived successfully"
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					},
					"404": {
						"$ref": "#/paths/~1payment_methods/get/responses/404"
					},
					"500": {
						"$ref": "#/paths/~1payment_links/post/responses/500"
					}
				}
			}
		},
		"/checkouts": {
			"post": {
				"operationId": "createCheckout",
				"tags": [
					"checkouts"
				],
				"summary": "Create a checkout",
				"description": "Create a hosted checkout session. The checkout accepts all parameters from the\nCreate Payment API (except `payment_method`), plus additional options that control\nthe checkout UX.\n\nThe response includes a checkout `id` (nonce) which you embed on your page via shuttle.js:\n\n```html\n<div data-shuttle-checkout=\"CHECKOUT_ID\" data-shuttle-style=\"INLINE\"></div>\n<script src=\"https://app.shuttleglobal.com/shuttle-1.4.X.js\"></script>\n```\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"checkout"
								],
								"properties": {
									"checkout": {
										"type": "object",
										"properties": {
											"options": {
												"$ref": "#/components/schemas/CheckoutOptions"
											}
										}
									}
								}
							},
							"examples": {
								"basic": {
									"summary": "Basic checkout",
									"value": {
										"checkout": {
											"options": {
												"currency": "EUR",
												"amount": "100",
												"alt_key": "1234",
												"description": "Invoice 1234",
												"account": {
													"crm_key": "A00001",
													"first_name": "Jane",
													"last_name": "Doe",
													"email": "jane.doe@email.com"
												}
											}
										}
									}
								},
								"inline_checkout": {
									"summary": "Inline checkout with branding",
									"value": {
										"checkout": {
											"options": {
												"currency": "USD",
												"amount": "49.99",
												"title": "Complete your purchase",
												"style": "INLINE",
												"logo_url": "https://example.com/logo.png",
												"account": {
													"email": "customer@example.com"
												}
											}
										}
									}
								},
								"with_line_items": {
									"summary": "Checkout with an order basket",
									"description": "Supply `line_items` to enable Buy Now Pay Later, wallet baskets and Level 2 / Level 3 interchange data. Include shipping as its own line so the basket adds up to `amount`.",
									"value": {
										"checkout": {
											"options": {
												"currency": "USD",
												"amount": "44.99",
												"alt_key": "ORDER-1234",
												"description": "Order 1234",
												"account": {
													"crm_key": "A00001",
													"first_name": "Jane",
													"last_name": "Doe",
													"email": "jane.doe@email.com"
												},
												"shipping": {
													"line1": "1 Lyric Square",
													"line4": "London",
													"line5": "W6 0NB",
													"country": "GB"
												},
												"line_items": [
													{
														"sku": "SHOE-10-BLK",
														"name": "Running shoes",
														"description": "Black running shoes, UK size 10",
														"quantity": 2,
														"unit_price": 20,
														"total_amount": 40,
														"total_tax": 4,
														"item_url": "https://example.com/products/shoe-10-blk",
														"image_url": "https://example.com/images/shoe-10-blk.jpg"
													},
													{
														"sku": "SHIPPING",
														"name": "Standard delivery",
														"quantity": 1,
														"unit_price": 4.99,
														"total_amount": 4.99,
														"total_tax": 0
													}
												]
											}
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Checkout session created",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"nonce": {
											"type": "string",
											"description": "The checkout session ID (same as checkout.id)"
										},
										"checkout": {
											"$ref": "#/components/schemas/CheckoutResponse"
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Bad request - invalid parameters"
					}
				}
			}
		},
		"/checkouts/{nonce}": {
			"parameters": [
				{
					"name": "nonce",
					"in": "path",
					"required": true,
					"description": "The checkout's `id` (its nonce), as returned when you created it.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getCheckout",
				"tags": [
					"checkouts"
				],
				"summary": "Get a checkout",
				"description": "Retrieve details of an existing checkout session by its nonce.\n",
				"parameters": [
					{
						"name": "expand",
						"in": "query",
						"description": "Set to `core` to include internal core data",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Checkout session details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"status": {
											"type": "string",
											"example": "OK"
										},
										"checkout": {
											"$ref": "#/components/schemas/CheckoutResponse"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Checkout not found",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"example": "NOT_FOUND"
										},
										"message": {
											"type": "string",
											"example": "checkout not found"
										}
									}
								}
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "deleteCheckout",
				"tags": [
					"checkouts"
				],
				"summary": "Delete a checkout",
				"description": "Delete (invalidate) a checkout session. The checkout will no longer be usable.\n",
				"responses": {
					"204": {
						"description": "Checkout session deleted"
					}
				}
			}
		},
		"/processors": {
			"get": {
				"operationId": "listProcessors",
				"tags": [
					"processors"
				],
				"summary": "List processors",
				"description": "Returns a list of payment processors available to the application.\nFilter for `visible: true` to get processors available for new connections.\n",
				"responses": {
					"200": {
						"description": "List of processors",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"processors": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Processor"
											}
										},
										"meta": {
											"type": "object",
											"properties": {
												"total": {
													"type": "integer"
												}
											}
										}
									}
								}
							}
						}
					},
					"401": {
						"description": "Unauthorized"
					}
				}
			}
		},
		"/processors/{processor_id}/settings": {
			"parameters": [
				{
					"name": "processor_id",
					"in": "path",
					"required": true,
					"description": "The processor's `id` from [List processors](/reference/inst-listprocessors), e.g. `STRIPE`. It must match exactly.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getProcessorSettings",
				"tags": [
					"processors"
				],
				"summary": "Get processor settings",
				"description": "Retrieve the field definitions and default values for connecting a processor.\nThis returns the form schema used when creating a gateway connection.\n\nNote: The `settings` and `values` response fields use a proprietary format\nprimarily consumed by the onboarding UX component.\n",
				"responses": {
					"200": {
						"description": "Processor settings",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"settings": {
											"type": "object",
											"description": "Field definitions for the processor connection form"
										},
										"values": {
											"type": "object",
											"description": "Default values for the processor connection form"
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "Processor not found"
					}
				}
			}
		},
		"/checkout_monitor": {
			"post": {
				"summary": "Create a checkout monitor session",
				"operationId": "createCheckoutMonitor",
				"tags": [
					"checkout-monitor"
				],
				"description": "Create a new checkout monitor session. The session ID returned can be used with\nthe Shuttle.checkout_monitor() JavaScript function to receive real-time updates\nabout the checkout process.\n\nThe nonce parameter must match the one passed in your checkout options.\nThis ensures that only authorized sessions can monitor the checkout progress.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"nonce": {
										"type": "string",
										"description": "The nonce passed in the checkout options",
										"example": "THE_NONCE_YOU_PASSED_TO_CHECKOUT"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Created checkout monitor session",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The checkout monitor session ID",
											"example": "eyJob3N0IjoiYXBwLnNodXR0bGVnbG9iYWwuY29tIiwic2Vzc2lvbiI6IjhiODU0YzY4MWQxNDBiYTEyNjNhMzU2NTQxMzkwYmFjIiwibm9uY2UiOiJUSEVfTk9OQ0VfWU9VX1BBU1NFRF9UT19DSEVDS09VVCJ9"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					}
				}
			}
		},
		"/strings": {
			"get": {
				"operationId": "listStrings",
				"tags": [
					"strings"
				],
				"summary": "List strings",
				"description": "Returns every string that can be changed, with the wording that currently applies for the\nlanguage requested.\n\nStrings that have not been translated into the language return the wording they inherit, so\nlisting a language you have not used yet returns the full set ready to translate. A string\nthat has its own wording in this language carries `overriding`, the wording it would\notherwise inherit.\n\nThis list does not take `criteria`, `order` or `expand`, and is not paginated: it always\nreturns the complete set.\n",
				"parameters": [
					{
						"name": "language",
						"in": "query",
						"required": false,
						"description": "Lowercase two-letter ISO 639-1 language code (e.g. `ar`), or `default` for the base wording.\nDefaults to `default`.\n",
						"schema": {
							"type": "string",
							"default": "default",
							"example": "ar"
						}
					},
					{
						"name": "branding",
						"in": "query",
						"required": false,
						"description": "Enterprise field, for accounts with more than one branding. Leave out to use your own branding.\n",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "All strings for the language",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"strings": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1strings~1%7Bstring_id%7D/get/responses/200/content/application~1json/schema/properties/string"
											}
										}
									}
								},
								"example": {
									"strings": [
										{
											"id": "web.payment_form.card_number",
											"text": "رقم البطاقة",
											"branding": "brd_123",
											"language": "ar",
											"overriding": "Card Number"
										},
										{
											"id": "web.payment_processing.error",
											"text": "There was a problem processing the payment.",
											"branding": "brd_123",
											"language": "ar"
										}
									]
								}
							}
						}
					},
					"401": {
						"description": "Authentication required",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"error": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string"
												},
												"message": {
													"type": "string"
												}
											}
										}
									}
								}
							}
						}
					}
				}
			},
			"post": {
				"operationId": "updateStrings",
				"tags": [
					"strings"
				],
				"summary": "Update several strings",
				"description": "Updates the wording of several strings in one request, for one language. Strings not\nincluded are left as they are.\n\n- Every item in one request must use the same `language` (and `branding`, if you send it).\n  Send one request per language.\n- Each item is applied as [Update a string](/reference/inst-updatestring) would apply it:\n  sending the wording the string already inherits removes your override.\n- An id whose set (the part before the first dot) is not recognised rejects the request\n  before anything is written. Only use ids returned by [List strings](/reference/inst-liststrings).\n- The update is not atomic. Sets are written one after another, so a failure part-way leaves\n  the earlier sets saved. Re-sending the same request is safe.\n- Send requests one at a time. Writes to a branding are queued, and a write still waiting\n  after 10 seconds is refused (`BOLT-7059`).\n- The request body must be under 10 MB.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"strings"
								],
								"properties": {
									"strings": {
										"type": "array",
										"items": {
											"allOf": [
												{
													"type": "object",
													"required": [
														"id"
													],
													"properties": {
														"id": {
															"type": "string",
															"description": "String id, `<set>.<key>`",
															"example": "web.payment_form.card_number"
														}
													}
												},
												{
													"$ref": "#/paths/~1strings~1%7Bstring_id%7D/put/requestBody/content/application~1json/schema/properties/string"
												}
											]
										}
									}
								}
							},
							"example": {
								"strings": [
									{
										"id": "web.payment_form.card_number",
										"text": "رقم البطاقة",
										"language": "ar"
									},
									{
										"id": "web.payment_processing.error",
										"text": "حدثت مشكلة أثناء معالجة الدفع.",
										"language": "ar"
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The updated strings as they now read",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"strings": {
											"type": "array",
											"items": {
												"$ref": "#/paths/~1strings~1%7Bstring_id%7D/get/responses/200/content/application~1json/schema/properties/string"
											}
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			}
		},
		"/strings/{string_id}": {
			"parameters": [
				{
					"name": "string_id",
					"in": "path",
					"required": true,
					"description": "The string's `id`, e.g. `web.payment_form.card_number`.",
					"schema": {
						"type": "string"
					}
				}
			],
			"get": {
				"operationId": "getString",
				"tags": [
					"strings"
				],
				"summary": "Get a string",
				"description": "Returns one string with the wording that currently applies for the language requested.\nAn id that does not exist returns 200 with no `string` field.\n",
				"parameters": [
					{
						"$ref": "#/paths/~1strings/get/parameters/0"
					},
					{
						"$ref": "#/paths/~1strings/get/parameters/1"
					}
				],
				"responses": {
					"200": {
						"description": "The string",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"string": {
											"type": "object",
											"description": "A customer-facing string and the wording that applies for one language",
											"properties": {
												"id": {
													"type": "string",
													"description": "String id, `<set>.<key>`",
													"example": "web.payment_form.card_number"
												},
												"text": {
													"type": "string",
													"description": "The wording that currently applies",
													"example": "رقم البطاقة"
												},
												"language": {
													"type": "string",
													"description": "Language the wording applies to",
													"example": "ar"
												},
												"branding": {
													"type": "string",
													"description": "Enterprise field. The branding the wording applies to"
												},
												"overriding": {
													"type": "string",
													"description": "Present only when the string has its own wording for this language. Holds the wording it\nwould otherwise inherit, which is what it goes back to if reset\n",
													"example": "Card Number"
												}
											}
										}
									}
								}
							}
						}
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			},
			"put": {
				"operationId": "updateString",
				"tags": [
					"strings"
				],
				"summary": "Update a string",
				"description": "Replaces the wording of one string for one language.\n\n- The fields go inside a `string` object. The string is identified by the id in the URL.\n- `language` and `branding` are read from the body, not the query string. Leaving out\n  `language` writes the `default` (base) wording, not a translation.\n- Sending the wording the string already inherits removes your override instead of storing\n  it, so the string goes back to the inherited wording.\n- Saving the first string in a language adds that language. There is no separate step to\n  add a language.\n\nThe change applies to checkouts opened after it is saved. A checkout session that was already\ncreated keeps the wording it was created with until it expires.\n",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"string"
								],
								"properties": {
									"string": {
										"type": "object",
										"required": [
											"text"
										],
										"properties": {
											"text": {
												"type": "string",
												"description": "The new wording",
												"example": "رقم البطاقة"
											},
											"language": {
												"type": "string",
												"description": "Lowercase two-letter ISO 639-1 language code, or `default`. Defaults to `default`, so send\nit when writing a translation\n",
												"example": "ar"
											},
											"branding": {
												"type": "string",
												"description": "Enterprise field, for accounts with more than one branding. Leave out to use your own branding"
											}
										}
									}
								}
							},
							"example": {
								"string": {
									"text": "رقم البطاقة",
									"language": "ar"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The string as it now reads",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"string": {
											"$ref": "#/paths/~1strings~1%7Bstring_id%7D/get/responses/200/content/application~1json/schema/properties/string"
										}
									}
								}
							}
						}
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			},
			"delete": {
				"operationId": "resetString",
				"tags": [
					"strings"
				],
				"summary": "Reset a string",
				"description": "Removes your wording for one string in one language, so it goes back to the wording it\ninherits.\n\n`language` and `branding` must be sent as query parameters. A request body is ignored, so\nleaving `language` out of the query string resets the `default` (base) wording instead.\n\nResetting a string that has no wording of its own is accepted and changes nothing. Resetting\nevery string in a language does not remove the language.\n\nReturns 204 with no body. Read the string back to see the wording that now applies.\n",
				"parameters": [
					{
						"$ref": "#/paths/~1strings/get/parameters/0"
					},
					{
						"$ref": "#/paths/~1strings/get/parameters/1"
					}
				],
				"responses": {
					"204": {
						"description": "String reset"
					},
					"400": {
						"$ref": "#/paths/~1charges/get/responses/400"
					},
					"401": {
						"$ref": "#/paths/~1strings/get/responses/401"
					}
				}
			}
		}
	},
	"components": {
		"securitySchemes": {
			"basicAuth": {
				"type": "http",
				"scheme": "basic",
				"description": "Basic Authentication using secret key"
			},
			"bearerAuth": {
				"type": "http",
				"scheme": "bearer",
				"description": "OAuth 2.0 Bearer Token Authentication"
			}
		},
		"schemas": {
			"PaymentLink": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^pl_[a-zA-Z0-9]+_[a-zA-Z0-9-]+$",
						"description": "Unique identifier for the payment link (also used as payment nonce)"
					},
					"account": {
						"type": "string",
						"description": "Associated account ID (populated on PAYMENT_PENDING or PAYMENT_SUCCESS)"
					},
					"charge": {
						"type": "string",
						"description": "Associated charge ID (populated on PAYMENT_PENDING or PAYMENT_SUCCESS)"
					},
					"client": {
						"type": "string",
						"pattern": "^cl_[a-zA-Z0-9]+$",
						"description": "Client ID (read-only, derived from credentials)"
					},
					"contract": {
						"type": "string",
						"description": "Associated contract ID (populated on PAYMENT_PENDING or PAYMENT_SUCCESS)"
					},
					"expires": {
						"type": "string",
						"format": "date-time",
						"description": "Expiry date for the payment link.\nMust be a future date - cannot set expiry to a past date.\n"
					},
					"nonce": {
						"type": "string",
						"description": "Payment nonce for tokenization actions (same as id)"
					},
					"options": {
						"type": "object",
						"description": "Configuration options for the payment link experience",
						"properties": {
							"account": {
								"oneOf": [
									{
										"type": "string",
										"pattern": "^acc_[0-9]+_[0-9a-z]+$",
										"description": "Account ID to skip authentication section"
									},
									{
										"type": "object",
										"description": "Customer account details",
										"properties": {
											"address": {
												"type": "object",
												"description": "Customer's address",
												"properties": {
													"country": {
														"type": "string",
														"description": "Country code"
													},
													"line1": {
														"type": "string",
														"description": "Address line 1"
													},
													"line2": {
														"type": "string",
														"description": "Address line 2"
													},
													"line3": {
														"type": "string",
														"description": "Address line 3"
													},
													"line4": {
														"type": "string",
														"description": "City/Town"
													},
													"line5": {
														"type": "string",
														"description": "Post code/ZIP code"
													},
													"line6": {
														"type": "string",
														"description": "State/Province (using ISO 3166-2 subdivision codes, e.g., 'CA' for California)"
													}
												}
											},
											"crm_key": {
												"type": "string",
												"description": "External CRM identifier for the customer"
											},
											"email": {
												"type": "string",
												"format": "email",
												"description": "Customer's email address"
											},
											"first_name": {
												"type": "string",
												"description": "Customer's first name"
											},
											"last_name": {
												"type": "string",
												"description": "Customer's last name"
											},
											"phone": {
												"type": "string",
												"description": "Customer's phone number"
											}
										}
									}
								]
							},
							"action": {
								"type": "string",
								"enum": [
									"PAYMENT",
									"AUTH",
									"TOKENISE"
								],
								"default": "PAYMENT",
								"description": "Action type for the payment link.\n\n* `PAYMENT` — take the payment immediately.\n* `AUTH` — authorise only, reserving the funds without capturing. Capture later\n  via the Activity view or the Capture API.\n* `TOKENISE` — capture the customer's payment details without taking a payment,\n  producing a reusable token you can charge later.\n\nNote the spelling: the value is `TOKENISE`, not `TOKENIZE`.\n\nWhen using `TOKENISE`, omit `amount` and `default_amount` — the link takes no\npayment. `save_card` is redundant, as storing the card is the whole operation.\nKeep `currency`: it determines which payment methods are offered. Retrieve the\nstored token from the `payment_method` field when you fetch the payment link, or\nfrom the `PAYMENT_METHOD.ACTIVE` webhook.\n\nOnly payment methods capable of the requested action are displayed. For example\nApple Pay does not support `TOKENISE`, and ACH does not support `AUTH`.\n"
							},
							"allow_comment": {
								"type": "boolean",
								"description": "Whether to enable the note/comment field"
							},
							"amount": {
								"type": "string",
								"description": "Fixed amount for the payment in major currency units, as a decimal string\nwithout commas, using '.' as the decimal separator (e.g. \"18.18\" for £18.18).\nIf specified, the payer cannot modify it.\n",
								"example": "18.18"
							},
							"comment": {
								"type": "string",
								"description": "Fixed note/comment for the payment (if specified, user cannot modify)"
							},
							"currency": {
								"type": "string",
								"description": "Fixed currency for the payment (e.g. USD)",
								"default": "USD"
							},
							"default_amount": {
								"type": "string",
								"description": "Default amount in major currency units, as a decimal string without commas,\nusing '.' as the decimal separator (e.g. \"100.00\"). The payer can modify it.\n",
								"example": "100.00"
							},
							"default_comment": {
								"type": "string",
								"description": "Default note/comment to show (user can modify)"
							},
							"default_reference": {
								"type": "string",
								"description": "Default reference to show (user can modify)"
							},
							"name": {
								"type": "string",
								"description": "Custom name for the payment link (defaults to instance name)"
							},
							"page_intro": {
								"type": "string",
								"description": "Custom introduction message for the payment page"
							},
							"page_pending_message": {
								"type": "string",
								"description": "Message to display to the user when their payment is pending authorization."
							},
							"page_success_message": {
								"type": "string",
								"description": "Message to display to the user when their payment is successful."
							},
							"pending_url": {
								"type": "string",
								"format": "uri",
								"description": "URL to redirect users when payment requires authorization.\nQuery parameters included in redirect:\n* payment_link - Payment link ID\n* status - Will be 'PENDING'\n* contract - Contract ID if created\n* charge - Charge ID if created\n* transaction - Transaction ID if created\n* payment_method - Payment method ID if created\n* account - Account ID if created\nIf skip_receipt is true, redirect happens immediately after authorization is required.\nIf skip_receipt is false, URL is presented after showing the pending message.\n"
							},
							"reference": {
								"type": "string",
								"description": "Fixed reference for the payment (if specified, user cannot modify)"
							},
							"source": {
								"type": "string",
								"enum": [
									"ECOMMERCE"
								],
								"default": "ECOMMERCE",
								"description": "Source of the payment link"
							},
							"channel": {
								"type": "string",
								"description": "Channel identifier to process the payment through"
							},
							"force_add": {
								"type": "boolean",
								"description": "Only allow new payment methods, do not show saved payment methods"
							},
							"timezone": {
								"type": "string",
								"description": "IANA timezone name for date/time display (e.g., America/New_York)"
							},
							"success_url": {
								"type": "string",
								"format": "uri",
								"description": "URL to redirect users after successful payment completion.\nQuery parameters included in redirect:\n* payment_link - Payment link ID\n* status - Will be 'COMPLETED'\n* contract - Contract ID if created\n* charge - Charge ID if created\n* transaction - Transaction ID if created\n* payment_method - Payment method ID if created\n* account - Account ID if created\nIf skip_receipt is true, redirect happens immediately after successful authorization.\nIf skip_receipt is false, URL is presented as a button on the receipt page.\nQuery parameters will be appended to this URL - see RedirectUrlParameters schema.\nParameters include: payment_link, status, contract, charge, transaction, payment_method, account.\nExample: https://shop.example.com/success?payment_link=pl_1234_abcdef&status=COMPLETED...\nUse these parameters to verify payment status and retrieve additional details via API.\n"
							}
						}
					},
					"payment_method": {
						"type": "string",
						"description": "Associated payment method ID (populated on various payment events)"
					},
					"payment": {
						"type": "string",
						"description": "Associated payment ID (populated on PAYMENT_PENDING or PAYMENT_SUCCESS)"
					},
					"state": {
						"oneOf": [
							{
								"type": "object"
							},
							{
								"type": "string"
							},
							{
								"type": "array"
							}
						],
						"description": "Custom state data for link creator. Can be an object, string, or array.\nMaximum size when stringified is 10KB.\n"
					},
					"status": {
						"type": "string",
						"enum": [
							"ACTIVE",
							"PENDING",
							"COMPLETED",
							"EXPIRED",
							"ARCHIVE"
						],
						"description": "Current status of the payment link:\n* ACTIVE - Payment link is available and can be used for payment\n* PENDING - Payment is in process (either actively processing or in an unresolved state)\n* COMPLETED - Payment link has been successfully paid\n* EXPIRED - Payment link has passed its expiration date without being paid or reaching pending state\n* ARCHIVE - Payment link has been deleted (soft-delete)\n\nStatus transitions:\n* ACTIVE → PENDING: When payment/tokenization starts\n* PENDING → COMPLETED: On successful payment\n* PENDING → ACTIVE: On failed payment attempt\n* Any → EXPIRED: When expiration time is reached\n* Any → ARCHIVE: When explicitly archived via DELETE\n"
					},
					"transaction": {
						"type": "string",
						"description": "Associated transaction ID (populated on PAYMENT_PENDING or PAYMENT_SUCCESS)"
					},
					"url": {
						"type": "string",
						"format": "uri",
						"description": "Payment link URL (read-only)",
						"example": "https://app.shuttleglobal.com/cp/link/{id}"
					},
					"v": {
						"type": "integer",
						"description": "Object version for optimistic concurrency control",
						"example": 1
					}
				}
			},
			"Charge": {
				"type": "object",
				"description": "A charge object representing an invoice on a contract. Contains all information about\nthe charge including its status, amounts, and payment history.\n",
				"properties": {
					"id": {
						"type": "string",
						"description": "The ID of the charge"
					},
					"amount": {
						"type": "string",
						"description": "The amount of the charge"
					},
					"alt_key": {
						"type": "string",
						"description": "Your supplied key for the charge (eg invoice id)"
					},
					"charge_number": {
						"type": "integer",
						"description": "Which charge this is in a recurring contract (eg 1 for first, 2 for second)"
					},
					"extra_charge": {
						"type": "boolean",
						"description": "If this charge was manually created"
					},
					"completed": {
						"type": "string",
						"format": "date-time",
						"description": "When the charge was completed"
					},
					"contract": {
						"type": "string",
						"description": "The contract this charge belongs to"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the charge was created"
					},
					"created_session": {
						"type": "string",
						"description": "The session the object was created by"
					},
					"due": {
						"type": "string",
						"format": "date-time",
						"description": "When the charge is due to be paid"
					},
					"initiated": {
						"type": "string",
						"format": "date-time",
						"description": "When the charge was instructed"
					},
					"outstanding_amount": {
						"type": "string",
						"description": "The amount that remains to be paid"
					},
					"overdue_amount": {
						"type": "string",
						"description": "DEPRECATED - do not use"
					},
					"recurring": {
						"type": "boolean",
						"description": "If this charge is part of a recurring contract"
					},
					"paid_amount": {
						"type": "string",
						"description": "The amount that has been paid"
					},
					"status": {
						"type": "string",
						"enum": [
							"ACTIVE",
							"PENDING",
							"COMPLETED",
							"WRITTENOFF"
						],
						"description": "The status of the charge"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the charge was last modified"
					},
					"updated_session": {
						"type": "string",
						"description": "The session the object was updated by"
					},
					"writtenoff_amount": {
						"type": "string",
						"description": "The amount that has been written off"
					},
					"v": {
						"type": "integer",
						"description": "The version of the record"
					}
				}
			},
			"Contract": {
				"$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/get/responses/200/content/application~1json/schema/properties/contract",
				"deprecated": true,
				"description": "This schema is deprecated and will be removed in a future version"
			},
			"DeepLink": {
				"type": "object",
				"allOf": [
					{
						"type": "object",
						"required": [
							"type"
						],
						"properties": {
							"type": {
								"type": "string",
								"enum": [
									"gateway-setup",
									"dashboard"
								],
								"description": "Type of deep link to create:\n* `gateway-setup`: Merchant Setup (onboarding)\n* `dashboard`: Merchant View\n"
							},
							"context": {
								"type": "object",
								"description": "Type-specific parameters that vary based on the deep link type:\n\nFor type: `gateway-setup` (Onboarding)\n* `processor`: Limit onboarding to a single processor (e.g., \"STRIPE\")\n* `processor_filter`: Array of allowed processors (e.g., [\"STRIPE\", \"SQUARE\"])\n* `theme`: UI customization options including:\n  - Font settings (baseFontSize, baseFontFamily)\n  - Colors (backgroundColor, headerBackground)\n  - Layout (baseBorderRadius, rowHeight)\n  - Full theme options documented in UI Components guide\n\nFor type: `dashboard` (Merchant View)\n* `mode`: Section to display — \"enquiry\" or \"setup\"\n* `action`: View to display:\n  - \"view_account\": Show account details\n  - \"view_contract\": Show contract details\n  - \"view_transaction\": Show transaction details\n  - \"view_payment_method\": Show payment method details\n  - \"localisation\": Show localisation settings (requires mode \"setup\")\n* `id`: ID of object to view (use this OR alt_key)\n* `alt_key`: Alternative key of object (use this OR id)\n* `menu`: Menu display type:\n  - \"normal\": Standard menu\n  - \"banner\": Banner style menu with logo\n  - \"hidden\": No menu\n* `favicon`: URL to PNG favicon when opened in window\n* `menu_logo`: URL to PNG logo for banner menu (max 120x20px)\n* `return_url`: URL to return to when logo clicked (banner menu)\n* `features`: Turn individual Merchant View actions (refunds,\n  captures, account editing, contract amendments) on or off for this\n  session, overriding the defaults set on the application. See\n  [Merchant View Options](/docs/activity-view-options)\n",
								"properties": {
									"processor": {
										"type": "string",
										"description": "For gateway-setup, use onboarding for a single processor only (e.g., \"STRIPE\")"
									},
									"processor_filter": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"description": "For gateway-setup, filter available processors (e.g., [\"STRIPE\", \"SQUARE\"])"
									},
									"theme": {
										"type": "object",
										"description": "UI theme customization options including font settings, colors, and layout.\nSee UI Components guide for full list of theme properties.\n"
									},
									"mode": {
										"type": "string",
										"enum": [
											"enquiry",
											"setup"
										],
										"description": "Section of the merchant view to display"
									},
									"action": {
										"type": "string",
										"enum": [
											"view_account",
											"view_contract",
											"view_transaction",
											"view_payment_method",
											"localisation"
										],
										"description": "Specific view to display in merchant view"
									},
									"id": {
										"type": "string",
										"description": "ID of object to view in merchant view (use this OR alt_key)"
									},
									"alt_key": {
										"type": "string",
										"description": "Alternative key of object to view (use this OR id)"
									},
									"menu": {
										"type": "string",
										"enum": [
											"normal",
											"banner",
											"hidden"
										],
										"description": "Type of menu to display in merchant view"
									},
									"favicon": {
										"type": "string",
										"description": "URL to PNG favicon when merchant view opened in window"
									},
									"menu_logo": {
										"type": "string",
										"description": "URL to PNG logo for banner menu (max 120x20px recommended)"
									},
									"return_url": {
										"type": "string",
										"description": "URL to return to when logo clicked in banner menu"
									},
									"features": {
										"type": "object",
										"description": "For merchant view, overrides the Merchant View options set on the\napplication (Developer Portal, Developer tab, Merchant View), for\nthis deep link only.\n\nEach key is an option -- `account_edit`, `comments`,\n`manual_capture`, `moto_payment`, `moto_tokenise`,\n`payment_method_edit`, `recurring`, `recurring_edit`,\n`recurring_edit_in_place`, `refund`, `refund_offline` -- and each\nvalue is `\"TRUE\"` or `\"FALSE\"`.\nAn option you omit keeps the application default; an option never\nset anywhere is enabled. Disabling an option removes the control\nfrom the UI entirely.\n\nFor what each option does, see\n[Merchant View Options](/docs/activity-view-options)\n",
										"additionalProperties": {
											"type": "string",
											"enum": [
												"TRUE",
												"FALSE"
											]
										},
										"example": {
											"refund": "FALSE",
											"manual_capture": "FALSE",
											"account_edit": "FALSE"
										}
									}
								}
							},
							"user": {
								"type": "object",
								"required": [
									"alt_key"
								],
								"properties": {
									"alt_key": {
										"type": "string",
										"description": "Your primary key for the logged in user"
									},
									"name": {
										"type": "string",
										"description": "Name of the logged in user"
									}
								}
							},
							"session": {
								"type": "object",
								"properties": {
									"teams": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"description": "Teams the user belongs to"
									}
								}
							},
							"ip_address": {
								"type": "string",
								"description": "IP address of the merchant"
							},
							"expiry_seconds": {
								"type": "integer",
								"default": 900,
								"description": "Time in seconds this deep link is active"
							}
						}
					},
					{
						"type": "object",
						"required": [
							"id"
						],
						"properties": {
							"id": {
								"type": "string",
								"description": "Deep link ID"
							}
						}
					}
				]
			},
			"Transaction": {
				"$ref": "#/paths/~1transactions~1%7Btransaction_id%7D/get/responses/200/content/application~1json/schema/properties/transaction",
				"deprecated": true,
				"description": "This schema is deprecated and will be removed in a future version"
			},
			"Account": {
				"type": "object",
				"description": "A customer account object. Contains all information about a customer including their contact details,\nstatus, and metadata.\n\nIMPORTANT: The `bolton_values` field is managed internally by the system and should not be modified or\nreferenced directly in tests or integrations. Always use the standard top-level fields (company, email,\nphone, etc.) when creating, updating, or querying accounts.\n",
				"properties": {
					"address": {
						"type": "object",
						"description": "Address fields. All fields are optional and any values are accepted to prevent interrupting payments due to address validation issues.\nField behavior:\n1. When updating an address, the entire address object is replaced with the new values\n2. To clear/null out all address fields, set each field to an empty string\nClient applications can implement their own validation if needed.\n",
						"properties": {
							"country": {
								"type": "string",
								"description": "Country code (any format accepted). Set to empty string to clear."
							},
							"line1": {
								"type": "string",
								"description": "First line of the address. Set to empty string to clear."
							},
							"line2": {
								"type": "string",
								"description": "Second line of the address. Set to empty string to clear."
							},
							"line3": {
								"type": "string",
								"description": "Third line of the address. Set to empty string to clear."
							},
							"line4": {
								"type": "string",
								"description": "City/Town. Set to empty string to clear."
							},
							"line5": {
								"type": "string",
								"description": "Postcode/ZIP. Set to empty string to clear."
							},
							"line6": {
								"type": "string",
								"description": "State/Region. Set to empty string to clear."
							}
						}
					},
					"bolton_values": {
						"type": "object",
						"description": "Enterprise Feature: Internal system values.\nThis field is only relevant for enterprise customers and should be ignored by other users.\n",
						"x-enterprise-only": true,
						"additionalProperties": true
					},
					"channels": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "List of channels that have permission to see this account. When an account makes a payment against a channel, they are automatically added to that channel."
					},
					"code": {
						"type": "string",
						"description": "Account code"
					},
					"company": {
						"type": "string",
						"description": "Company name"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "Account creation timestamp"
					},
					"created_session": {
						"type": "string",
						"pattern": "^ses_[0-9]+_[0-9]+$",
						"description": "Session ID when the account was created"
					},
					"crm": {
						"type": "string",
						"description": "Enterprise Feature: The CRM system identifier.\nThis field is only relevant for enterprise customers and should be ignored by other users.\n",
						"x-enterprise-only": true
					},
					"crm_key": {
						"type": "string",
						"description": "Your identifier for the account"
					},
					"disconnected_account": {
						"type": "boolean",
						"description": "Enterprise Feature: Indicates if this account is disconnected from the enterprise CRM system.\nThis field is only relevant for enterprise customers and should be ignored by other users.\n",
						"x-enterprise-only": true
					},
					"divisions": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "List of divisions that have permission to see this account. A division can be added to this list directly via the API, or is automatically added when an account makes a payment against either (1) a channel that belongs to the division or (2) an initiative that belongs to the division."
					},
					"email": {
						"type": "string",
						"description": "Email address. Invalid addresses are accepted to prevent interrupting payments due to email validation issues. Client applications can implement their own validation if needed."
					},
					"first_name": {
						"type": "string",
						"description": "First name of the account holder"
					},
					"full_address": {
						"type": "string",
						"description": "Formatted full address"
					},
					"giftaid_ineligible": {
						"type": "boolean",
						"description": "Indicates the account is excluded from Gift Aid eligibility (GB donations)"
					},
					"id": {
						"type": "string",
						"pattern": "^acc_[0-9]+_[0-9]+$",
						"description": "Unique identifier for the account"
					},
					"initiatives": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "List of initiatives that this account has performed payments against. When an account makes a payment against an initiative, it is automatically added to this list."
					},
					"last_name": {
						"type": "string",
						"description": "Last name of the account holder"
					},
					"last_transacted": {
						"type": "string",
						"format": "date-time",
						"description": "Timestamp of last transaction"
					},
					"last_transaction": {
						"type": "string",
						"description": "ID of last transaction"
					},
					"locale": {
						"type": "string",
						"description": "Locale of the user"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs stored on the account",
						"additionalProperties": {
							"type": "string"
						}
					},
					"name": {
						"type": "string",
						"description": "Full name of the account holder"
					},
					"phone": {
						"type": "string",
						"description": "Phone number. Any format is accepted to prevent interrupting payments due to phone validation issues. Client applications can implement their own validation if needed."
					},
					"status": {
						"type": "string",
						"enum": [
							"ACTIVE",
							"TEMP"
						],
						"description": "Account status"
					},
					"tags": {
						"type": "string",
						"description": "CSV of tags/references"
					},
					"timezone": {
						"type": "string",
						"description": "Timezone in IANA format"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "Last update timestamp"
					},
					"updated_session": {
						"type": "string",
						"pattern": "^ses_[0-9]+_[0-9]+$",
						"description": "Session ID when the account was last updated"
					},
					"v": {
						"type": "integer",
						"description": "Object version for optimistic concurrency control"
					}
				}
			},
			"PaymentMethod": {
				"$ref": "#/paths/~1payment_methods/post/responses/200/content/application~1json/schema/properties/payment_method",
				"deprecated": true,
				"description": "This schema is deprecated and will be removed in a future version"
			},
			"Gateway": {
				"$ref": "#/paths/~1gateways/post/responses/200/content/application~1json/schema/properties/gateway",
				"deprecated": true,
				"description": "This schema is deprecated and will be removed in a future version"
			},
			"WebhookCreate": {
				"type": "object",
				"required": [
					"url"
				],
				"properties": {
					"url": {
						"type": "string",
						"format": "uri",
						"description": "The HTTPS URL that will receive webhooks",
						"example": "https://your-app.com/webhooks/shuttle"
					},
					"retries": {
						"type": "integer",
						"description": "The total number of delivery attempts for each webhook, including the first. For example, `3` means the first attempt plus up to two retries.\nLeave it out (or send `0` or `1`) for a single attempt with no retries.\n",
						"minimum": 0,
						"example": 3
					}
				}
			},
			"WebhookAttachResponse": {
				"type": "object",
				"properties": {
					"webhook": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"description": "Identifier for the attached URL. Use it to [detach the webhook](/reference/detachwebhook).",
								"pattern": "^[a-f0-9]{32}$",
								"example": "5d41402abc4b2a76b9719d911017c592"
							},
							"url": {
								"type": "string",
								"format": "uri",
								"description": "The URL you attached",
								"example": "https://your-app.com/webhooks/shuttle"
							},
							"retries": {
								"type": "integer",
								"description": "The `retries` value you sent, if any",
								"example": 3
							}
						}
					}
				}
			},
			"PaymentRequest": {
				"type": "object",
				"required": [
					"payment"
				],
				"properties": {
					"payment": {
						"type": "object",
						"description": "Payment details object",
						"required": [
							"currency"
						],
						"properties": {
							"currency": {
								"type": "string",
								"description": "The currency in ISO format (e.g., USD)",
								"example": "GBP"
							},
							"amount": {
								"type": "string",
								"description": "The payment amount as a string without commas, using '.' as decimal separator.\nRequired in the standard case. Optional when `charges` is provided — if omitted,\nit is derived from the sum of `charges[].amount`; if supplied, it must equal that sum.\n",
								"example": "100.00"
							},
							"alt_key": {
								"type": "string",
								"description": "Your unique reference for the payment (e.g., order id). URL friendly string, max 64 chars (a-z0-9_-)",
								"example": "order_123"
							},
							"description": {
								"type": "string",
								"description": "Descriptive text for the payment",
								"example": "Invoice 1234"
							},
							"nonce": {
								"type": "string",
								"description": "Unique string to prevent duplicate submissions within 24 hours"
							},
							"action": {
								"type": "string",
								"enum": [
									"PAYMENT",
									"AUTH"
								],
								"default": "PAYMENT",
								"description": "Payment action type"
							},
							"source": {
								"type": "string",
								"enum": [
									"MOTO",
									"ECOMMERCE",
									"RECURRING"
								],
								"default": "ECOMMERCE",
								"description": "Source of the payment"
							},
							"success_url": {
								"type": "string",
								"format": "uri",
								"description": "URL to redirect on successful 3D secure completion",
								"example": "https://www.myhost.com/success"
							},
							"cancel_url": {
								"type": "string",
								"format": "uri",
								"description": "URL to redirect on 3D secure cancellation",
								"example": "https://www.myhost.com/cancel"
							},
							"payment_method": {
								"oneOf": [
									{
										"type": "string",
										"description": "ID of existing payment method"
									},
									{
										"$ref": "#/components/schemas/PaymentMethodRequest"
									}
								]
							},
							"account": {
								"oneOf": [
									{
										"type": "string",
										"description": "ID of existing account"
									},
									{
										"$ref": "#/components/schemas/AccountRequest"
									}
								]
							},
							"frequency": {
								"type": "string",
								"enum": [
									"ONEOFF",
									"WEEKLY",
									"FORTNIGHTLY",
									"BIMONTHLY",
									"MONTHLY",
									"QUARTERLY",
									"BIANNUALLY",
									"ANNUALLY"
								],
								"default": "ONEOFF",
								"description": "Payment frequency for recurring payments. Cannot be used together with `charges`;\nto use scheduled charges, omit `frequency` or set it to `ONEOFF`.\n",
								"example": "MONTHLY"
							},
							"occurrences": {
								"type": "integer",
								"description": "Number of payments for recurring payments (blank = forever)",
								"example": 12
							},
							"start_date": {
								"type": "string",
								"format": "date-time",
								"description": "When to take first payment for recurring payments (up to 365 days future)"
							},
							"start_days": {
								"type": "integer",
								"minimum": 0,
								"maximum": 31,
								"description": "Days from now for first recurring payment (up to 31 days)"
							},
							"scheduled_date": {
								"type": "string",
								"format": "date-time",
								"description": "When to process one-time payment (up to 365 days future)"
							},
							"scheduled_days": {
								"type": "integer",
								"minimum": 0,
								"maximum": 31,
								"description": "Days from now for one-time payment (up to 31 days)"
							},
							"charges": {
								"type": "array",
								"description": "Explicit schedule of charges for the contract. Use this when charge amounts or due\ndates vary between charges (e.g., instalment plans with irregular amounts or dates).\nAll charges are created upfront at contract creation.\n\n**When each charge is taken:**\n* `due: \"now\"` or a past timestamp (within the last 24 hours) — taken **synchronously**\n  as part of contract creation. If the charge declines, contract creation fails and no\n  contract is created.\n* `due` set to a future timestamp — taken **asynchronously** by the scheduler on the\n  due date. The contract is created regardless of the outcome of that later payment.\n\nTo have the first charge run asynchronously, set its `due` to a future timestamp\n(even a few minutes ahead).\n\n**Constraints:**\n* Cannot be combined with `frequency` (must be omitted or `ONEOFF`).\n* Not supported with `action: AUTH`.\n* Each charge's `due` cannot be more than 24 hours in the past.\n* The top-level `amount` is optional when `charges` is provided. If you do provide\n  `amount`, it must equal the sum of `charges[].amount`.\n",
								"items": {
									"$ref": "#/components/schemas/CheckoutOptions/properties/charges/items"
								},
								"example": [
									{
										"alt_key": "INSTALMENT_1",
										"amount": "100.00",
										"due": "now"
									},
									{
										"alt_key": "INSTALMENT_2",
										"amount": "50.00",
										"due": "2026-06-01T09:00:00Z"
									},
									{
										"alt_key": "INSTALMENT_3",
										"amount": "50.00",
										"due": "2026-07-01T09:00:00Z"
									}
								]
							},
							"gateway": {
								"type": "string",
								"description": "Gateway ID to process the payment through. If not specified, the default gateway will be used"
							},
							"save_card": {
								"type": "boolean",
								"description": "Whether to save the card for future use"
							},
							"force_payment_method": {
								"type": "boolean",
								"description": "Force creation of a new payment method even if a matching one already exists"
							},
							"contract": {
								"type": "string",
								"description": "Contract ID for one-time payment on existing contract"
							},
							"legal_entity": {
								"type": "string",
								"description": "Legal entity ID or code processing the payment"
							},
							"event_date": {
								"type": "string",
								"format": "date-time",
								"description": "Event date associated with the payment"
							},
							"metadata": {
								"type": "object",
								"description": "Custom key-value pairs that will be stored on the contract",
								"additionalProperties": {
									"type": "string"
								},
								"example": {
									"order_id": "12345",
									"customer_reference": "CUS-001"
								}
							},
							"shipping": {
								"$ref": "#/components/schemas/AccountRequest/properties/address",
								"description": "Shipping address for the order"
							},
							"line_items": {
								"type": "array",
								"description": "The order basket. Optional, but required by BNPL providers and by some acquirers to\nqualify for Level 2 / Level 3 interchange rates on commercial cards. Include every\nline that makes up the payment `amount`, including shipping and tax lines.\n",
								"items": {
									"$ref": "#/components/schemas/CheckoutOptions/properties/line_items/items"
								},
								"example": [
									{
										"sku": "SHOE-10-BLK",
										"name": "Running shoes",
										"quantity": 2,
										"unit_price": 20,
										"total_amount": 40,
										"total_tax": 4
									},
									{
										"sku": "SHIPPING",
										"name": "Standard delivery",
										"quantity": 1,
										"unit_price": 4.99,
										"total_amount": 4.99,
										"total_tax": 0
									}
								]
							},
							"hotel_data": {
								"type": "object",
								"description": "Hotel-specific data passed through to the payment gateway",
								"additionalProperties": true
							}
						}
					}
				}
			},
			"PaymentResponse": {
				"type": "object",
				"properties": {
					"payment": {
						"type": "object",
						"description": "Payment details",
						"properties": {
							"id": {
								"type": "string",
								"description": "Payment identifier",
								"example": "pay_11842_10000"
							},
							"alt_key": {
								"type": "string",
								"description": "Your supplied payment reference",
								"example": "1234"
							},
							"description": {
								"type": "string",
								"description": "Payment description",
								"example": "Invoice 1234"
							},
							"source": {
								"type": "string",
								"enum": [
									"MOTO",
									"ECOMMERCE",
									"RECURRING"
								],
								"description": "Payment source",
								"example": "MOTO"
							},
							"action": {
								"type": "string",
								"enum": [
									"PAYMENT",
									"REFUND",
									"AUTH",
									"CAPTURE",
									"VOID"
								],
								"description": "Payment action type",
								"example": "PAYMENT"
							},
							"status": {
								"type": "string",
								"enum": [
									"SUCCESS",
									"PENDING",
									"DECLINED",
									"REQAUTH",
									"INVALID_PAYMENT_METHOD",
									"UNRESOLVED",
									"UNATTRIBUTED"
								],
								"description": "The status of the payment:\n* SUCCESS - The payment was approved\n* PENDING - The payment is still in progress\n* DECLINED - The payment was declined\n* REQAUTH - The payment requires authorization step (e.g. 3D secure)\n* INVALID_PAYMENT_METHOD - Invalid payment method used\n* UNRESOLVED - No conclusive approval/decline received\n* UNATTRIBUTED - Success but internal recording issue\n",
								"example": "SUCCESS"
							},
							"gateway_status": {
								"type": "string",
								"description": "Category or error message from the gateway",
								"example": "APPROVED"
							},
							"gateway_reference": {
								"type": "string",
								"description": "Gateway's identifier for the transaction",
								"example": "ch_1GVaEEFi2CnH4uN3ouw69fw3"
							},
							"authorisation_code": {
								"type": "string",
								"description": "Authorization code from the gateway",
								"example": "pi_1GVaEEFi2CnH4uN355ZdZvk5 (TEST)"
							},
							"reference": {
								"type": "string",
								"description": "Customer-facing reference (e.g., BOLT-123445)",
								"example": "REF-00010000"
							},
							"amount": {
								"type": "string",
								"description": "Payment amount",
								"example": "100"
							},
							"balance": {
								"type": "string",
								"description": "Payment amount less any refunds",
								"example": "100"
							},
							"currency": {
								"type": "string",
								"description": "Payment currency in ISO format",
								"example": "GBP"
							},
							"resolved": {
								"type": "string",
								"format": "date-time",
								"description": "When the payment was resolved"
							},
							"sub_status": {
								"type": "string",
								"enum": [
									"NO_ACTION_REQUIRED",
									"CUSTOMER_ACTION_REQUIRED",
									"MERCHANT_ACTION_REQUIRED"
								],
								"description": "Sub-status of the payment, present when the gateway is waiting for someone to act. `CUSTOMER_ACTION_REQUIRED` means the customer still has something to do - e.g. a bank transfer or Multibanco payment stays PENDING until they make the transfer or pay the voucher. `MERCHANT_ACTION_REQUIRED` is reserved for future use. Omitted and `NO_ACTION_REQUIRED` mean the same thing.",
								"example": "CUSTOMER_ACTION_REQUIRED"
							},
							"sub_status_reason": {
								"type": "string",
								"description": "Free-text description of the sub-status, e.g. `follow_bank_transfer_instructions`, `follow_voucher_instructions` or `partially_funded`. Descriptive only - not searchable.",
								"example": "follow_bank_transfer_instructions"
							},
							"target_date": {
								"type": "string",
								"format": "date-time",
								"description": "Intended payment date. Present only when the payment was created ahead of its target date because the payment method requires gateway advance notice (e.g. SEPA/BACS/GoCardless/Stripe ACH). This is the target date, not the settlement date, and is omitted for payment methods that charge on the due date.",
								"example": "2020-04-13T00:00:00.000Z"
							},
							"settle_currency": {
								"type": "string",
								"description": "Settlement currency if different from transaction currency",
								"example": "GBP"
							},
							"settle_gross_amount": {
								"type": "string",
								"description": "Gross amount in settlement currency",
								"example": "100"
							},
							"settle_net_amount": {
								"type": "string",
								"description": "Net amount in settlement currency after fees",
								"example": "96.9"
							},
							"settle_fee_amount": {
								"type": "string",
								"description": "Processing fees in settlement currency",
								"example": "3.1"
							},
							"gateway": {
								"type": "string",
								"description": "Gateway used for processing",
								"example": "gw_11842_10000"
							},
							"account": {
								"type": "string",
								"description": "Associated account ID",
								"example": "acc_11842_10000"
							},
							"payment_method": {
								"type": "string",
								"description": "Payment method ID used",
								"example": "pm_11842_10000"
							},
							"contract": {
								"type": "string",
								"description": "Associated contract ID",
								"example": "co_11842_10000"
							},
							"channel": {
								"type": "string",
								"description": "Processing channel",
								"example": "ch_11842_10001"
							},
							"initiative": {
								"type": "string",
								"description": "Initiative ID",
								"example": "in_11842_10000"
							},
							"designation": {
								"type": "string",
								"description": "Designation ID",
								"example": "des_11842_10000"
							},
							"legal_entity": {
								"type": "string",
								"description": "Legal entity ID",
								"example": "le_11842_10000"
							},
							"created": {
								"type": "string",
								"format": "date-time",
								"description": "Creation timestamp",
								"example": "2020-04-08T09:29:48.000Z"
							},
							"updated": {
								"type": "string",
								"format": "date-time",
								"description": "Last update timestamp",
								"example": "2020-04-08T09:29:52.000Z"
							},
							"processed": {
								"type": "string",
								"format": "date-time",
								"description": "Processing timestamp",
								"example": "2020-04-08T09:29:51.000Z"
							},
							"gateway_metadata": {
								"type": "object",
								"description": "Gateway-specific data (varies by gateway)"
							},
							"payment_method_used_token": {
								"type": "boolean",
								"description": "Whether a tokenized payment method was used",
								"example": false
							},
							"recurring": {
								"type": "boolean",
								"description": "Whether this is a recurring payment",
								"example": false
							},
							"frequency": {
								"type": "string",
								"enum": [
									"ONEOFF",
									"WEEKLY",
									"FORTNIGHTLY",
									"BIMONTHLY",
									"MONTHLY",
									"QUARTERLY",
									"BIANNUALLY",
									"ANNUALLY"
								],
								"description": "Frequency for recurring payments",
								"example": "MONTHLY"
							},
							"occurrences": {
								"type": "integer",
								"description": "Number of planned occurrences for recurring payments",
								"example": 12
							},
							"browser_ip_address": {
								"type": "string",
								"description": "IP address of the browser that initiated the payment",
								"example": "212.161.80.4"
							}
						}
					},
					"contract": {
						"type": "object",
						"description": "Associated contract details",
						"properties": {
							"id": {
								"type": "string",
								"description": "Contract identifier",
								"example": "co_11842_10000"
							},
							"account": {
								"type": "string",
								"description": "Associated account ID",
								"example": "acc_11842_10000"
							},
							"alt_key": {
								"type": "string",
								"description": "Your reference for this contract",
								"example": "1234"
							},
							"amount": {
								"type": "string",
								"description": "Contract amount",
								"example": "100"
							},
							"currency": {
								"type": "string",
								"description": "Contract currency",
								"example": "GBP"
							},
							"description": {
								"type": "string",
								"description": "Contract description",
								"example": "Invoice 1234"
							},
							"status": {
								"type": "string",
								"enum": [
									"COMPLETED",
									"ACTIVE",
									"PENDING"
								],
								"description": "Status of the contract",
								"example": "COMPLETED"
							},
							"recurring": {
								"type": "boolean",
								"description": "Whether this is a recurring contract",
								"example": false
							},
							"payment_method": {
								"type": "string",
								"description": "Payment method ID used",
								"example": "pm_11842_10000"
							},
							"created": {
								"type": "string",
								"format": "date-time",
								"description": "Creation timestamp",
								"example": "2020-04-08T09:29:48.000Z"
							},
							"updated": {
								"type": "string",
								"format": "date-time",
								"description": "Last update timestamp",
								"example": "2020-04-08T09:29:52.000Z"
							},
							"initiated": {
								"type": "string",
								"format": "date-time",
								"description": "Initiation timestamp",
								"example": "2020-04-08T09:29:48.000Z"
							},
							"completed": {
								"type": "string",
								"format": "date-time",
								"description": "Completion timestamp",
								"example": "2020-04-08T09:29:52.000Z"
							},
							"last_transaction": {
								"type": "string",
								"description": "The last transaction ID for this contract",
								"example": "tr_11842_10000"
							},
							"frequency": {
								"type": "string",
								"enum": [
									"ONEOFF",
									"WEEKLY",
									"FORTNIGHTLY",
									"BIMONTHLY",
									"MONTHLY",
									"QUARTERLY",
									"BIANNUALLY",
									"ANNUALLY"
								],
								"description": "Frequency for recurring contracts"
							},
							"occurrences": {
								"type": "integer",
								"description": "Number of planned occurrences for recurring contracts"
							},
							"next_charge": {
								"type": "string",
								"format": "date-time",
								"description": "Next scheduled charge date for recurring contracts"
							},
							"charge_count": {
								"type": "integer",
								"description": "Number of charges processed for this contract"
							}
						}
					},
					"transaction": {
						"type": "object",
						"description": "Transaction details",
						"properties": {
							"id": {
								"type": "string",
								"description": "Transaction identifier",
								"example": "tr_11842_10000"
							},
							"action": {
								"type": "string",
								"enum": [
									"PAYMENT",
									"REFUND",
									"AUTH",
									"CAPTURE",
									"VOID"
								],
								"description": "Transaction action type",
								"example": "PAYMENT"
							},
							"source": {
								"type": "string",
								"enum": [
									"MOTO",
									"ECOMMERCE",
									"RECURRING"
								],
								"description": "Transaction source",
								"example": "MOTO"
							},
							"status": {
								"type": "string",
								"enum": [
									"SUCCESS",
									"PENDING",
									"DECLINED"
								],
								"description": "Transaction status",
								"example": "SUCCESS"
							},
							"gateway_status": {
								"type": "string",
								"description": "Status reported by the gateway",
								"example": "APPROVED"
							},
							"sub_status": {
								"type": "string",
								"enum": [
									"NO_ACTION_REQUIRED",
									"CUSTOMER_ACTION_REQUIRED",
									"MERCHANT_ACTION_REQUIRED"
								],
								"description": "Sub-status of the transaction, present when the gateway is waiting for someone to act. `CUSTOMER_ACTION_REQUIRED` means the customer still has something to do - e.g. a bank transfer or Multibanco payment stays PENDING until they make the transfer or pay the voucher. `MERCHANT_ACTION_REQUIRED` is reserved for future use. Omitted and `NO_ACTION_REQUIRED` mean the same thing.",
								"example": "CUSTOMER_ACTION_REQUIRED"
							},
							"sub_status_reason": {
								"type": "string",
								"description": "Free-text description of the sub-status, e.g. `follow_bank_transfer_instructions`, `follow_voucher_instructions` or `partially_funded`. Descriptive only - not searchable.",
								"example": "follow_bank_transfer_instructions"
							},
							"gateway_reference": {
								"type": "string",
								"description": "Gateway's transaction identifier",
								"example": "ch_1GVaEEFi2CnH4uN3ouw69fw3"
							},
							"authorisation_code": {
								"type": "string",
								"description": "Authorization code from the gateway",
								"example": "pi_1GVaEEFi2CnH4uN355ZdZvk5 (TEST)"
							},
							"reference": {
								"type": "string",
								"description": "Customer-facing reference",
								"example": "REF-00010000"
							},
							"amount": {
								"type": "string",
								"description": "Transaction amount",
								"example": "100"
							},
							"currency": {
								"type": "string",
								"description": "Transaction currency",
								"example": "GBP"
							},
							"created": {
								"type": "string",
								"format": "date-time",
								"description": "Creation timestamp",
								"example": "2020-04-08T09:29:48.000Z"
							},
							"updated": {
								"type": "string",
								"format": "date-time",
								"description": "Last update timestamp",
								"example": "2020-04-08T09:29:52.000Z"
							},
							"processed": {
								"type": "string",
								"format": "date-time",
								"description": "Processing timestamp",
								"example": "2020-04-08T09:29:51.000Z"
							},
							"resolved": {
								"type": "string",
								"format": "date-time",
								"description": "When the transaction was resolved",
								"example": "2020-04-08T09:29:51.000Z"
							},
							"target_date": {
								"type": "string",
								"format": "date-time",
								"description": "Intended payment date. Present only when the transaction was created ahead of its target date because the payment method requires gateway advance notice (e.g. SEPA/BACS/GoCardless/Stripe ACH). This is the target date, not the settlement date, and is omitted for payment methods that charge on the due date.",
								"example": "2020-04-13T00:00:00.000Z"
							}
						}
					},
					"id": {
						"type": "string",
						"description": "Payment identifier (legacy format - use payment.id instead)",
						"deprecated": true
					},
					"alt_key": {
						"type": "string",
						"description": "Your supplied payment reference (legacy format - use payment.alt_key instead)",
						"deprecated": true
					},
					"description": {
						"type": "string",
						"description": "Payment description (legacy format - use payment.description instead)",
						"deprecated": true
					},
					"source": {
						"type": "string",
						"enum": [
							"MOTO",
							"ECOMMERCE",
							"RECURRING"
						],
						"description": "Payment source (legacy format - use payment.source instead)",
						"deprecated": true
					},
					"action": {
						"type": "string",
						"enum": [
							"PAYMENT",
							"REFUND",
							"AUTH",
							"CAPTURE",
							"VOID"
						],
						"description": "Payment action type (legacy format - use payment.action instead)",
						"deprecated": true
					},
					"status": {
						"type": "string",
						"enum": [
							"SUCCESS",
							"PENDING",
							"DECLINED",
							"REQAUTH",
							"INVALID_PAYMENT_METHOD",
							"UNRESOLVED",
							"UNATTRIBUTED"
						],
						"description": "Payment status (legacy format - use payment.status instead)",
						"deprecated": true
					}
				}
			},
			"PaymentMethodRequest": {
				"type": "object",
				"description": "Payment method details. Submit the fields relevant to the payment type being used.\nFor cards, provide card_number, card_cvc, and card_expiry at minimum.\nFor SEPA, provide sepa_iban and sepa_account_holder_name.\nFor ACH, provide ach_account_number, ach_routing_number, ach_account_holder_name, and ach_account_type.\n",
				"properties": {
					"gateway": {
						"type": "string",
						"description": "Gateway ID to tokenise the payment method with"
					},
					"token": {
						"type": "string",
						"description": "Pre-existing gateway token for a saved payment method"
					},
					"card_number": {
						"type": "string",
						"description": "Full card PAN without formatting",
						"pattern": "^[0-9]{13,19}$"
					},
					"card_cvc": {
						"type": "string",
						"description": "Card security code (3-4 digits)",
						"pattern": "^[0-9]{3,4}$"
					},
					"card_expiry": {
						"type": "string",
						"description": "Card expiry in YYYY-MM format",
						"pattern": "^[0-9]{4}-[0-9]{2}$"
					},
					"card_type": {
						"type": "string",
						"description": "Card type (e.g., VISA, MASTERCARD)"
					},
					"last4": {
						"type": "string",
						"description": "Last 4 digits of the card number"
					},
					"cardholder_name": {
						"type": "string",
						"description": "Name on the card"
					},
					"cryptogram": {
						"type": "string",
						"description": "CAVV cryptogram for network token or 3DS authentication"
					},
					"eci": {
						"type": "string",
						"description": "Electronic Commerce Indicator value"
					},
					"token_requestor_id": {
						"type": "string",
						"description": "Token requestor ID for network tokens"
					},
					"sepa_iban": {
						"type": "string",
						"description": "Customer's IBAN with formatting removed"
					},
					"sepa_account_holder_name": {
						"type": "string",
						"description": "Customer's account holder name for SEPA"
					},
					"ach_account_holder_name": {
						"type": "string",
						"description": "Customer's account holder name for ACH"
					},
					"ach_account_type": {
						"type": "string",
						"description": "ACH account type: `checking`, `savings` or `businessChecking`."
					},
					"ach_routing_number": {
						"type": "string",
						"description": "ACH routing number"
					},
					"ach_account_number": {
						"type": "string",
						"description": "ACH account number"
					},
					"billing": {
						"$ref": "#/components/schemas/AccountRequest/properties/address",
						"description": "Billing address associated with the payment method"
					}
				}
			},
			"AccountRequest": {
				"type": "object",
				"description": "Account/customer details. You can provide an existing account ID or CRM key,\nor create a new account by providing customer details. If an account with the\nsame CRM key already exists, it will be used.\n",
				"properties": {
					"id": {
						"type": "string",
						"description": "Existing account ID"
					},
					"crm_key": {
						"type": "string",
						"description": "Your identifier for the customer (CRM key). If an account with this key exists, it will be used"
					},
					"alt_key": {
						"type": "string",
						"description": "Alias for crm_key"
					},
					"first_name": {
						"type": "string",
						"description": "Customer's first name"
					},
					"last_name": {
						"type": "string",
						"description": "Customer's last name"
					},
					"name": {
						"type": "string",
						"description": "Customer's full name (alternative to first_name/last_name)"
					},
					"company": {
						"type": "string",
						"description": "Company name"
					},
					"email": {
						"type": "string",
						"description": "Customer's email address"
					},
					"phone": {
						"type": "string",
						"description": "Customer's phone number"
					},
					"tags": {
						"type": "string",
						"description": "CSV of tags/references for the account"
					},
					"address": {
						"description": "Customer's address",
						"type": "object",
						"properties": {
							"country": {
								"type": "string",
								"description": "Country code"
							},
							"line1": {
								"type": "string",
								"description": "Address line 1"
							},
							"line2": {
								"type": "string",
								"description": "Address line 2"
							},
							"line3": {
								"type": "string",
								"description": "Address line 3"
							},
							"line4": {
								"type": "string",
								"description": "City / Town"
							},
							"line5": {
								"type": "string",
								"description": "Postcode / ZIP"
							},
							"line6": {
								"type": "string",
								"description": "State / Region"
							}
						}
					}
				}
			},
			"CaptureRequest": {
				"type": "object",
				"properties": {
					"amount": {
						"type": "string",
						"description": "Amount to capture. If not specified, the full authorization amount will be captured.",
						"example": "50.00"
					},
					"description": {
						"type": "string",
						"description": "Optional description for the capture",
						"example": "Partial capture for shipped items"
					}
				}
			},
			"CaptureResponse": {
				"type": "object",
				"properties": {
					"capture": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"description": "Capture identifier",
								"example": "ca_11842_10006"
							},
							"payment": {
								"type": "string",
								"description": "Payment ID this capture is associated with",
								"example": "pay_11842_10005"
							},
							"amount": {
								"type": "string",
								"description": "Amount that was captured",
								"example": "20"
							},
							"status": {
								"type": "string",
								"enum": [
									"SUCCESS",
									"PENDING",
									"DECLINED"
								],
								"description": "Status of the capture operation",
								"example": "SUCCESS"
							},
							"reference": {
								"type": "string",
								"description": "Reference for the capture",
								"example": "REF-00010006"
							},
							"gateway_reference": {
								"type": "string",
								"description": "Reference from the payment gateway",
								"example": "ch_1GVaKJFi2CnH4uN3AmXTKHwB"
							},
							"gateway_status": {
								"type": "string",
								"description": "Status reported by the gateway",
								"example": "APPROVED"
							},
							"source_transaction": {
								"type": "string",
								"description": "The original transaction that was captured",
								"example": "tr_11842_10005"
							},
							"created": {
								"type": "string",
								"format": "date-time",
								"description": "When the capture was created",
								"example": "2020-04-08T09:36:19.000Z"
							},
							"processed": {
								"type": "string",
								"format": "date-time",
								"description": "When the capture was processed",
								"example": "2020-04-08T09:36:20.000Z"
							}
						}
					}
				}
			},
			"VoidResponse": {
				"type": "object",
				"properties": {
					"void": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"description": "Void operation identifier",
								"example": "vo_5139_10151"
							},
							"payment": {
								"type": "string",
								"description": "Payment ID that was voided",
								"example": "pay_5139_10150"
							},
							"amount": {
								"type": "string",
								"description": "Amount that was voided",
								"example": "100"
							},
							"status": {
								"type": "string",
								"enum": [
									"SUCCESS",
									"PENDING",
									"DECLINED"
								],
								"description": "Status of the void operation",
								"example": "SUCCESS"
							},
							"reference": {
								"type": "string",
								"description": "Reference for the void",
								"example": "REF-00010151"
							},
							"created": {
								"type": "string",
								"format": "date-time",
								"description": "When the void was requested",
								"example": "2019-10-01T16:25:24.000Z"
							},
							"processed": {
								"type": "string",
								"format": "date-time",
								"description": "When the void was processed",
								"example": "2019-10-01T16:25:27.000Z"
							}
						}
					}
				}
			},
			"RefundStatus": {
				"type": "string",
				"description": "The status of the refund transaction\n",
				"enum": [
					"SUCCESS",
					"PENDING",
					"DECLINED",
					"INVALID_PAYMENT_METHOD",
					"UNRESOLVED",
					"UNATTRIBUTED"
				]
			},
			"GatewayStatus": {
				"type": "string",
				"description": "The gateway status of the refund transaction\n",
				"enum": [
					"APPROVED",
					"PENDING",
					"DECLINED",
					"DECLINED_ERROR",
					"UNRESOLVED",
					"MANUAL"
				]
			},
			"SimpleRefundRequest": {
				"type": "object",
				"properties": {
					"refund": {
						"type": "object",
						"required": [
							"reason"
						],
						"properties": {
							"amount": {
								"type": "string",
								"description": "(Optional) The amount of the refund as a string e.g., \"10\". \nThe amount should not have commas and use a `.` as a decimal separator. \nIf omitted, the entire unrefunded amount of the transaction will be refunded.\n",
								"example": "10.00"
							},
							"reason": {
								"type": "string",
								"description": "The reason for the refund (free text)",
								"example": "Customer returned item"
							},
							"manual": {
								"type": "boolean",
								"description": "(Optional) Set to true if you do not want to process the refund via the gateway, \nbut simply record that a refund was performed offline.\n",
								"default": false
							}
						}
					}
				}
			},
			"LegalEntityRefund": {
				"type": "object",
				"required": [
					"code"
				],
				"properties": {
					"code": {
						"type": "string",
						"description": "The code of the legal entity."
					},
					"amount": {
						"type": "string",
						"description": "(Optional) The amount to refund. If omitted, all transactions for this entity will be refunded.\n"
					}
				}
			},
			"ContractRefundRequest": {
				"type": "object",
				"properties": {
					"refund": {
						"type": "object",
						"properties": {
							"amount": {
								"type": "string",
								"description": "(Optional) The amount of the refund as a string e.g., \"10\". \nThe amount should not have commas and use a `.` as a decimal separator. \nIf omitted, the entire unrefunded amount of the contract will be refunded.\n",
								"example": "15.00"
							},
							"legal_entities": {
								"type": "array",
								"description": "(Optional - enterprise) This field is an ALTERNATIVE to `amount`. \nFor contracts splitting payments into multiple entities, this allows you to specify which \nlegal_entities are refunded.\n",
								"items": {
									"$ref": "#/components/schemas/LegalEntityRefund"
								}
							},
							"reason": {
								"type": "string",
								"description": "(Optional) The reason for the refund (free text)",
								"example": "Subscription cancelled"
							},
							"manual": {
								"type": "boolean",
								"description": "(Optional) Set to true if you do not want to process the refund via the gateway, \nbut simply record that a refund was performed offline.\n",
								"default": false
							},
							"validate_only": {
								"type": "boolean",
								"description": "(Optional) Set to true if you do not want to perform the refund, \njust check to see what would be refunded.\n",
								"default": false
							}
						}
					}
				}
			},
			"RefundCandidate": {
				"type": "object",
				"properties": {
					"source_transaction": {
						"type": "string",
						"description": "The transaction to be refunded.",
						"example": "tr_11842_11072"
					},
					"amount": {
						"type": "number",
						"description": "The amount to be refunded from this transaction.",
						"example": 10
					}
				}
			},
			"ContractRefundValidateResponse": {
				"type": "object",
				"properties": {
					"refund_candidates": {
						"type": "array",
						"description": "A list of candidate refunds to be taken if instructed.",
						"items": {
							"$ref": "#/components/schemas/RefundCandidate"
						}
					}
				}
			},
			"Refund": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "The unique ID of the refund",
						"example": "ref_11842_11073"
					},
					"payment": {
						"type": "string",
						"description": "The original payment this refund relates to",
						"example": "pay_11842_11072"
					},
					"amount": {
						"type": "string",
						"description": "The amount refunded",
						"example": "10"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the refund was created/instructed",
						"example": "2020-11-27T15:17:15.000Z"
					},
					"processed": {
						"type": "string",
						"format": "date-time",
						"description": "When the refund completed processing",
						"example": "2020-11-27T15:17:18.000Z"
					},
					"reason": {
						"type": "string",
						"description": "The reason for the refund",
						"example": "Customer requested cancellation"
					},
					"reference": {
						"type": "string",
						"description": "A unique customer facing reference for the refund",
						"example": "BOLT-00011073"
					},
					"source_transaction": {
						"type": "string",
						"description": "The original transaction that is being refunded - may be a payment or a capture",
						"example": "tr_11842_11072"
					},
					"status": {
						"$ref": "#/components/schemas/RefundStatus"
					},
					"gateway_status": {
						"$ref": "#/components/schemas/GatewayStatus"
					},
					"gateway_message": {
						"type": "string",
						"description": "The message from the gateway (if pending or declined)"
					},
					"manual": {
						"type": "boolean",
						"description": "false if the refund was instructed, or true if it was only recorded (in which case \nthe onus is on the user to perform the refund via an offline method)\n",
						"default": false
					},
					"currency": {
						"type": "string",
						"description": "The currency of the refund (always the same as source transaction)",
						"example": "USD"
					},
					"account": {
						"type": "string",
						"description": "The ID of the person this refund is for"
					},
					"parts": {
						"type": "array",
						"description": "An array of parts objects for which charge(s) the refund was applied to",
						"items": {
							"type": "object"
						}
					},
					"offline": {
						"type": "boolean",
						"description": "true if this is just a record to indicate a refund was performed offline",
						"default": false
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "The date the record was last updated"
					},
					"v": {
						"type": "integer",
						"description": "The version of the record"
					}
				}
			},
			"RefundResponse": {
				"type": "object",
				"properties": {
					"refund": {
						"$ref": "#/components/schemas/Refund"
					}
				}
			},
			"ContractRefundExecuteResponse": {
				"type": "object",
				"properties": {
					"status": {
						"type": "string",
						"description": "SUCCESS if all refunds completed successfully, \nPENDING if any of the refunds is in progress, \nDECLINED if any of the refunds failed\n",
						"enum": [
							"SUCCESS",
							"PENDING",
							"DECLINED"
						]
					},
					"refunds": {
						"type": "array",
						"description": "A list of refunds taken.",
						"items": {
							"$ref": "#/components/schemas/Refund"
						}
					}
				}
			},
			"ContractRefundErrorResponse": {
				"type": "object",
				"properties": {
					"code": {
						"type": "string",
						"description": "Error code:\n* INVALID_AMOUNT - There are not enough transactions that can be refunded to meet the instruction requested.\n* NO_TRANSACTIONS_FOUND - No transactions will be refunded for this instruction (e.g., refund an entire contract, but it's already been refunded).\n",
						"enum": [
							"INVALID_AMOUNT",
							"NO_TRANSACTIONS_FOUND"
						]
					},
					"message": {
						"type": "string",
						"description": "Error message",
						"example": "No transactions found."
					}
				}
			},
			"Capture": {
				"type": "object",
				"description": "A capture transaction representing the settlement of a previously authorised payment",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^ca_[0-9]+_[0-9a-z]+$",
						"description": "The ID of the capture"
					},
					"account": {
						"type": "string",
						"description": "The account the capture was for"
					},
					"amount": {
						"type": "string",
						"description": "The amount captured"
					},
					"balance": {
						"type": "string",
						"description": "The capture amount less any refunds"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the capture was created"
					},
					"created_session": {
						"type": "string",
						"description": "The session that created the capture"
					},
					"currency": {
						"type": "string",
						"description": "The currency in ISO format"
					},
					"gateway_message": {
						"type": "string",
						"description": "The status message returned by the gateway"
					},
					"gateway_reference": {
						"type": "string",
						"description": "The gateway identifier for the capture"
					},
					"gateway_status": {
						"type": "string",
						"description": "The category or error message received from the gateway"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs stored on the capture",
						"additionalProperties": true
					},
					"offline": {
						"type": "boolean",
						"description": "Whether this capture was recorded as an offline transaction"
					},
					"parts": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Array of parts objects for which charge(s) the capture was applied to"
					},
					"payment": {
						"type": "string",
						"description": "The original payment (AUTH) this capture relates to"
					},
					"processed": {
						"type": "string",
						"format": "date-time",
						"description": "When the capture was processed by the gateway"
					},
					"reference": {
						"type": "string",
						"description": "The customer-facing reference (format BOLT-*)"
					},
					"refunded": {
						"type": "string",
						"description": "The amount of the capture that has been refunded"
					},
					"settle_currency": {
						"type": "string",
						"description": "The currency the capture was settled in if different"
					},
					"settle_fee_amount": {
						"type": "string",
						"description": "The amount of fees deducted for processing"
					},
					"settle_gross_amount": {
						"type": "string",
						"description": "The amount paid in the settlement currency"
					},
					"settle_net_amount": {
						"type": "string",
						"description": "The amount settled less fees"
					},
					"source_transaction": {
						"type": "string",
						"description": "The original AUTH transaction that was captured"
					},
					"status": {
						"type": "string",
						"enum": [
							"SUCCESS",
							"PENDING",
							"DECLINED",
							"INVALID_PAYMENT_METHOD",
							"UNRESOLVED",
							"UNATTRIBUTED"
						],
						"description": "The status of the capture"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the capture was last updated"
					},
					"updated_session": {
						"type": "string",
						"description": "The session that last updated the capture"
					},
					"v": {
						"type": "integer",
						"description": "The version of the record"
					}
				}
			},
			"Void": {
				"type": "object",
				"description": "A void transaction representing the cancellation of a previously authorised payment",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^vo_[0-9]+_[0-9a-z]+$",
						"description": "The ID of the void"
					},
					"account": {
						"type": "string",
						"description": "The account the void was for"
					},
					"amount": {
						"type": "string",
						"description": "The amount voided"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the void was created"
					},
					"created_session": {
						"type": "string",
						"description": "The session that created the void"
					},
					"currency": {
						"type": "string",
						"description": "The currency in ISO format"
					},
					"gateway_message": {
						"type": "string",
						"description": "The status message returned by the gateway"
					},
					"gateway_reference": {
						"type": "string",
						"description": "The gateway identifier for the void"
					},
					"gateway_status": {
						"type": "string",
						"description": "The category or error message received from the gateway"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs stored on the void",
						"additionalProperties": true
					},
					"offline": {
						"type": "boolean",
						"description": "Whether this void was recorded as an offline transaction"
					},
					"parts": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Array of parts objects for which charge(s) the void was applied to"
					},
					"payment": {
						"type": "string",
						"description": "The original payment (AUTH) this void relates to"
					},
					"processed": {
						"type": "string",
						"format": "date-time",
						"description": "When the void was processed by the gateway"
					},
					"reference": {
						"type": "string",
						"description": "The customer-facing reference (format BOLT-*)"
					},
					"source_transaction": {
						"type": "string",
						"description": "The original AUTH transaction that was voided"
					},
					"status": {
						"type": "string",
						"enum": [
							"SUCCESS",
							"PENDING",
							"DECLINED",
							"INVALID_PAYMENT_METHOD",
							"UNRESOLVED",
							"UNATTRIBUTED"
						],
						"description": "The status of the void"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the void was last updated"
					},
					"updated_session": {
						"type": "string",
						"description": "The session that last updated the void"
					},
					"v": {
						"type": "integer",
						"description": "The version of the record"
					}
				}
			},
			"CheckoutOptions": {
				"type": "object",
				"description": "Checkout options. Includes all fields from the Create Payment API (except `payment_method`)\nplus UX-specific options for the hosted checkout experience.\n",
				"required": [
					"currency"
				],
				"properties": {
					"currency": {
						"type": "string",
						"description": "The currency in ISO format (e.g., USD, EUR, GBP)",
						"example": "EUR"
					},
					"amount": {
						"type": "string",
						"description": "The payment amount as a string without commas, using '.' as decimal separator.\nRequired in the standard case. Optional when `charges` is provided — if omitted,\nit is derived from the sum of `charges[].amount`; if supplied, it must equal that sum.\n",
						"example": "100.00"
					},
					"alt_key": {
						"type": "string",
						"description": "Your unique reference for the payment (e.g., order ID)",
						"example": "order_123"
					},
					"description": {
						"type": "string",
						"description": "Descriptive text for the payment",
						"example": "Invoice 1234"
					},
					"nonce": {
						"type": "string",
						"description": "Unique string to prevent duplicate submissions within 24 hours"
					},
					"action": {
						"type": "string",
						"enum": [
							"PAYMENT",
							"AUTH",
							"TOKENISE"
						],
						"default": "PAYMENT",
						"description": "Payment action type.\n\n* `PAYMENT` — take the payment immediately.\n* `AUTH` — reserve the funds without capturing. Capture later via the Activity view\n  or the Capture API.\n* `TOKENISE` — store the customer's payment details without taking a payment. No\n  transaction and no contract are created; the result is a payment method you can\n  charge later via the Create Payment API.\n\nNote the spelling: the value is `TOKENISE`, not `TOKENIZE`.\n\nWhen using `TOKENISE`, omit `amount` and all scheduling fields (`frequency`,\n`occurrences`, `start_date`, `start_days`, `scheduled_date`, `scheduled_days`,\n`charges`) — the checkout takes no payment, so there is nothing to schedule.\n`save_card` is redundant, as storing the card is the whole operation. Keep\n`currency`: it determines which payment methods are offered. The stored payment\nmethod is delivered on the `PAYMENT_METHOD.ACTIVE` webhook.\n\nOnly payment methods capable of the requested action are displayed. For example\nApple Pay does not support `TOKENISE`, and ACH does not support `AUTH`.\n"
					},
					"source": {
						"type": "string",
						"enum": [
							"MOTO",
							"ECOMMERCE"
						],
						"default": "ECOMMERCE",
						"description": "Source of the payment. Use MOTO if staff is entering details on behalf of customer"
					},
					"account": {
						"oneOf": [
							{
								"type": "string",
								"description": "Existing account ID or CRM key"
							},
							{
								"$ref": "#/components/schemas/AccountRequest"
							}
						]
					},
					"gateway": {
						"type": "string",
						"description": "Gateway ID to process the payment through"
					},
					"frequency": {
						"type": "string",
						"enum": [
							"ONEOFF",
							"WEEKLY",
							"FORTNIGHTLY",
							"BIMONTHLY",
							"MONTHLY",
							"QUARTERLY",
							"BIANNUALLY",
							"ANNUALLY"
						],
						"default": "ONEOFF",
						"description": "Payment frequency for recurring payments. Cannot be used together with `charges`;\nto use scheduled charges, omit `frequency` or set it to `ONEOFF`.\n"
					},
					"occurrences": {
						"type": "integer",
						"description": "Number of payments for recurring payments (blank = forever)"
					},
					"start_date": {
						"type": "string",
						"format": "date-time",
						"description": "When to take first payment for recurring payments"
					},
					"start_days": {
						"type": "integer",
						"minimum": 0,
						"maximum": 31,
						"description": "Days from now for first recurring payment"
					},
					"scheduled_date": {
						"type": "string",
						"format": "date-time",
						"description": "When to process one-time payment"
					},
					"scheduled_days": {
						"type": "integer",
						"minimum": 0,
						"maximum": 31,
						"description": "Days from now for one-time payment"
					},
					"charges": {
						"type": "array",
						"description": "Explicit schedule of charges for the contract. Use this when charge amounts or due\ndates vary between charges. All charges are created upfront at contract creation and\nthe customer sees the full schedule in the hosted checkout.\n\n**When each charge is taken:**\n* `due: \"now\"` or a past timestamp (within the last 24 hours) — taken **synchronously**\n  as part of contract creation. A decline blocks the whole contract creation.\n* `due` set to a future timestamp — taken **asynchronously** by the scheduler on the\n  due date. The contract is created regardless of that later payment's outcome.\n\nTo have the first charge run asynchronously, set its `due` to a future timestamp\n(even a few minutes ahead).\n\n**Constraints:**\n* Cannot be combined with `frequency` (must be omitted or `ONEOFF`).\n* Not supported with `action: AUTH`.\n* Each charge's `due` cannot be more than 24 hours in the past.\n* The top-level `amount` is optional when `charges` is provided. If you do provide\n  `amount`, it must equal the sum of `charges[].amount`.\n",
						"items": {
							"type": "object",
							"description": "A single charge on an explicitly scheduled contract. Each charge carries its own\namount and due date, allowing schedules with varying amounts and irregular dates.\n",
							"required": [
								"amount",
								"due"
							],
							"properties": {
								"alt_key": {
									"type": "string",
									"description": "Optional — your unique reference for this charge (e.g., instalment number or invoice line id). URL friendly string, max 64 chars (a-z0-9_-)",
									"example": "INSTALMENT_1"
								},
								"amount": {
									"type": "string",
									"description": "The charge amount as a string without commas, using '.' as decimal separator. Must be greater than zero.",
									"example": "100.00"
								},
								"due": {
									"type": "string",
									"description": "When this charge is due. Accepts either the literal string `\"now\"`, or an ISO 8601 timestamp.\n\n* `\"now\"` or a past timestamp (within the last 24 hours) — taken **synchronously** during\n  contract creation. A decline blocks the whole contract creation.\n* Future timestamp — taken **asynchronously** by the scheduler on the due date. The\n  contract is created regardless of that later payment's outcome.\n\nA timestamp more than 24 hours in the past is rejected.\n",
									"example": "2026-06-01T09:00:00Z"
								}
							}
						},
						"example": [
							{
								"alt_key": "INSTALMENT_1",
								"amount": "100.00",
								"due": "now"
							},
							{
								"alt_key": "INSTALMENT_2",
								"amount": "50.00",
								"due": "2026-06-01T09:00:00Z"
							},
							{
								"alt_key": "INSTALMENT_3",
								"amount": "50.00",
								"due": "2026-07-01T09:00:00Z"
							}
						]
					},
					"keep_active_until": {
						"type": "string",
						"format": "date-time",
						"description": "Optional. Only relevant when the checkout creates a contract (a recurring `frequency` or a `charges` schedule). When set to a future date, the contract stays active until this date even after its final scheduled payment is collected, so mid-term amendments can still be applied. Once the date has passed and no balance is outstanding, the contract completes normally."
					},
					"contract": {
						"type": "string",
						"description": "Contract ID for one-time payment on existing contract"
					},
					"legal_entity": {
						"type": "string",
						"description": "Legal entity ID or code processing the payment"
					},
					"event_date": {
						"type": "string",
						"format": "date-time",
						"description": "Event date associated with the payment"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs stored on the contract",
						"additionalProperties": {
							"type": "string"
						}
					},
					"shipping": {
						"$ref": "#/components/schemas/AccountRequest/properties/address",
						"description": "Shipping address for the order"
					},
					"line_items": {
						"type": "array",
						"description": "The order basket. Optional, but required by BNPL providers and by some acquirers to\nqualify for Level 2 / Level 3 interchange rates on commercial cards. Include every line\nthat makes up the payment `amount`, including shipping and tax lines.\n",
						"items": {
							"type": "object",
							"description": "A single line in the order basket.\n\nLine items are optional, but supplying them unlocks several things depending on the\ngateway and payment method in use:\n\n* **Level 2 / Level 3 interchange data** for commercial and purchasing cards — required by\n  some acquirers to qualify for lower interchange rates.\n* **Buy Now Pay Later** — BNPL providers require a basket before they will underwrite the\n  order.\n* **Express checkout / wallets** — the basket is shown in the wallet sheet.\n* **Fraud screening** — basket contents are passed to the fraud provider.\n\n**Amounts and units**\n\nAll monetary values are in major currency units (e.g. `29.99`, not `2999`) and should be\nsent as JSON numbers, not strings. `unit_price` and `total_amount` are **gross** — they\ninclude the tax reported in `total_tax`.\n\n**How the line total is derived**\n\nMost gateways treat the difference between the extended price and the line total as a\ndiscount:\n\n```\ndiscount = (quantity x unit_price) - total_amount\n```\n\nSo for a line with no discount, set `total_amount` to `quantity x unit_price`. Where a\ngateway accepts an explicit discount, `total_discount` is used instead.\n\n**Consistency with the payment amount**\n\nShuttle does not reject a basket that fails to add up to the payment `amount`, but gateways\nmay. Where the basket totals less than the payment amount, some gateways (PayPal, for\nexample) add a balancing \"Miscellaneous\" line automatically. Send a complete basket\nwherever possible, including shipping and tax lines.\n\nWhere line items are used for **Level 2 / Level 3 interchange data**, the card networks\nrequire the breakdown to reconcile exactly — `sum(total_amount)` must equal the payment\n`amount`. Where it does not (a part payment, an instalment, an amount override, a discount\nthat is not itemised), the interchange data is simply not sent and the payment goes through\nunchanged. Line items never cause a payment to fail.\n\n**Not every field reaches every gateway.** Fields are mapped to whatever the target gateway\nsupports and silently dropped otherwise. `name`, `quantity`, `unit_price` and\n`total_amount` are the fields understood everywhere, so populate at least those.\n",
							"properties": {
								"name": {
									"type": "string",
									"description": "Display name of the item. Shown to the customer in wallet sheets and BNPL baskets, and\nused as the item description for Level 2/3 data. Some gateways truncate this\naggressively (Authorize.Net to 31 characters, Fat Zebra to 40), so keep it short.\n",
									"example": "Running shoes"
								},
								"sku": {
									"type": "string",
									"description": "Your product code / SKU for the item.\n\n**PayPal only:** a line item whose `sku` is `shipping`, `handling` or `insurance`\n(case-insensitive) is removed from the basket and its `total_amount` is reported in the\ncorresponding PayPal order breakdown field instead of as a basket line.\n",
									"example": "SHOE-10-BLK"
								},
								"description": {
									"type": "string",
									"description": "Longer description of the item, where `name` is not enough. Only used by gateways that\naccept a separate description field; those gateways fall back to `name` when this is\nomitted.\n",
									"example": "Black running shoes, UK size 10"
								},
								"quantity": {
									"type": "number",
									"description": "Number of units of this item.",
									"example": 2
								},
								"unit_of_measure": {
									"type": "string",
									"description": "Unit that `quantity` is expressed in — for example `each`, `hours`, `metres`. Used in\nLevel 3 interchange data, where the card networks require it. Alphanumeric, maximum 12\ncharacters; a longer or malformed value is replaced with `each`, as is an absent one.\n",
									"example": "each"
								},
								"unit_price": {
									"type": "number",
									"description": "Gross price of a single unit, in major currency units, including tax.\n",
									"example": 20
								},
								"total_amount": {
									"type": "number",
									"description": "Gross total for the line, in major currency units, including tax and after any\ndiscount. See the discount formula above.\n",
									"example": 40
								},
								"total_tax": {
									"type": "number",
									"description": "Tax included in `total_amount` for this line, in major currency units. Send `0` for a\ntax-free line rather than omitting the field — several gateways sum this across the\nbasket to report an order-level tax total.\n",
									"example": 4
								},
								"total_discount": {
									"type": "number",
									"description": "Explicit discount applied to this line, in major currency units. Only used by gateways\nthat accept a discount amount per line (CyberSource, Worldpay). Other gateways derive\nthe discount from `(quantity x unit_price) - total_amount`.\n\nExpress the discount this way rather than as a negative line item. A negative line is not\nforwarded as Level 2/3 data.\n",
									"example": 0
								},
								"tax_rate": {
									"type": "number",
									"description": "Tax rate applied to this line, passed through unchanged. Only used by gateways that\naccept an explicit rate (currently CyberSource, which expects a decimal fraction —\n`0.2` for 20%). Where it is omitted, gateways that need a rate derive one from\n`total_tax` and `total_amount`.\n",
									"example": 0.2
								},
								"discount_rate": {
									"type": "number",
									"description": "Discount rate applied to this line, passed through unchanged. Only used by gateways\nthat accept an explicit rate (currently CyberSource).\n"
								},
								"item_url": {
									"type": "string",
									"format": "uri",
									"description": "HTTPS URL of the product page for this item. Displayed by BNPL providers (Klarna,\nAffirm) in the basket they present to the customer.\n",
									"example": "https://example.com/products/shoe-10-blk"
								},
								"image_url": {
									"type": "string",
									"format": "uri",
									"description": "HTTPS URL of a product image for this item. Displayed by BNPL providers (Klarna,\nAffirm) in the basket they present to the customer.\n",
									"example": "https://example.com/images/shoe-10-blk.jpg"
								}
							}
						},
						"example": [
							{
								"sku": "SHOE-10-BLK",
								"name": "Running shoes",
								"quantity": 2,
								"unit_price": 20,
								"total_amount": 40,
								"total_tax": 4
							},
							{
								"sku": "SHIPPING",
								"name": "Standard delivery",
								"quantity": 1,
								"unit_price": 4.99,
								"total_amount": 4.99,
								"total_tax": 0
							}
						]
					},
					"hotel_data": {
						"type": "object",
						"description": "Hotel-specific data passed through to the payment gateway",
						"additionalProperties": true
					},
					"title": {
						"type": "string",
						"description": "Label displayed in the header of the checkout dialogue",
						"example": "Complete your purchase"
					},
					"checkout_text": {
						"type": "string",
						"description": "Additional text displayed below the amount to describe the payment"
					},
					"default_currency": {
						"type": "string",
						"description": "Default currency when currency is selectable (omit `currency` to allow selection)"
					},
					"default_amount": {
						"type": "string",
						"description": "Default amount when amount is enterable (omit `amount` to allow entry)"
					},
					"default_save_card": {
						"type": "boolean",
						"description": "Default state of the \"save card\" checkbox"
					},
					"save_card": {
						"type": "boolean",
						"description": "Force saving (true) or not saving (false) the card. Overrides user choice"
					},
					"disable_confirm": {
						"type": "boolean",
						"description": "Remove the confirmation step during checkout"
					},
					"disable_receipt": {
						"type": "boolean",
						"default": false,
						"description": "Dismiss dialogue on successful payment instead of showing a receipt"
					},
					"force_add": {
						"type": "boolean",
						"description": "Only allow new payment methods, do not show saved payment methods"
					},
					"force_payment_method": {
						"type": "boolean",
						"description": "Force creation of a new payment method even if a matching one exists"
					},
					"hide_save_card_toggle": {
						"type": "boolean",
						"description": "Hide the \"save card\" checkbox from the user"
					},
					"locale": {
						"type": "string",
						"description": "2-letter language code or full locale (e.g., `en` or `en_US`). Defaults to browser locale"
					},
					"timezone": {
						"type": "string",
						"description": "IANA timezone name to use for date/time display (e.g., `America/New_York`)"
					},
					"logo_url": {
						"type": "string",
						"description": "HTTPS URL of a custom logo. Set to `false` to disable the logo"
					},
					"logo_offset": {
						"type": "boolean",
						"description": "Display the logo larger, vertically centered around the top of the popup"
					},
					"payment_method_type": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Restrict available payment types (e.g., `[\"CARDS\"]` or `[\"ACH\", \"SEPA\"]`)"
					},
					"style": {
						"type": "string",
						"enum": [
							"DEFAULT",
							"INLINE"
						],
						"default": "DEFAULT",
						"description": "`DEFAULT` presents a modal popup, `INLINE` renders within a specified div"
					},
					"success_url": {
						"type": "string",
						"format": "uri",
						"description": "URL to redirect the user to after successful payment. Query parameters will be appended with payment details"
					},
					"cancel_url": {
						"type": "string",
						"format": "uri",
						"description": "URL to redirect the user to if payment is abandoned"
					},
					"contracts": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Ids of the contracts the payment method captured by this checkout is attached to once it is active."
					}
				}
			},
			"CheckoutResponse": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Checkout session ID (same as the nonce)"
					},
					"nonce": {
						"type": "string",
						"description": "The nonce for this checkout session"
					},
					"options": {
						"type": "object",
						"description": "The payment options passed when creating the checkout"
					},
					"status": {
						"type": "string",
						"enum": [
							"BUILDING",
							"READY",
							"COMPLETE"
						],
						"description": "Current status of the checkout session"
					}
				}
			},
			"LegalEntity": {
				"type": "object",
				"description": "A legal entity representing a business or organisation that receives payments",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^le_[0-9]+_[0-9]+$",
						"description": "Unique identifier for the legal entity"
					},
					"name": {
						"type": "string",
						"description": "Name of the legal entity"
					},
					"code": {
						"type": "string",
						"description": "Your identifier for the legal entity (displayed on merchant portal)"
					},
					"division": {
						"type": "string",
						"description": "Division ID"
					},
					"country": {
						"type": "string",
						"description": "Country code"
					},
					"company_type": {
						"type": "string",
						"description": "Type of company (e.g., GB_LIMITED_COMPANY)"
					},
					"company_type_name": {
						"type": "string",
						"description": "Human-readable company type name"
					},
					"company_number": {
						"type": "string",
						"description": "Company registration number"
					},
					"charity_number": {
						"type": "string",
						"description": "Charity registration number"
					},
					"vat_number": {
						"type": "string",
						"description": "VAT registration number"
					},
					"address": {
						"type": "object",
						"description": "Registered address",
						"properties": {
							"country": {
								"type": "string"
							},
							"line1": {
								"type": "string"
							},
							"line2": {
								"type": "string"
							},
							"line3": {
								"type": "string"
							},
							"line4": {
								"type": "string"
							},
							"line5": {
								"type": "string"
							},
							"line6": {
								"type": "string"
							}
						}
					},
					"phone": {
						"type": "string",
						"description": "Contact phone number"
					},
					"email": {
						"type": "string",
						"description": "Contact email address"
					},
					"website": {
						"type": "string",
						"description": "Website URL"
					},
					"support_url": {
						"type": "string",
						"description": "Support page URL"
					},
					"privacy_policy": {
						"type": "string",
						"description": "Privacy policy URL"
					},
					"tcs": {
						"type": "string",
						"description": "Terms and conditions URL"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs",
						"additionalProperties": true
					},
					"tags": {
						"type": "string",
						"description": "CSV of tags/references"
					},
					"status": {
						"type": "string",
						"enum": [
							"LINKED",
							"ACTIVE",
							"ARCHIVE",
							"SETUP",
							"CREATED",
							"INACTIVE",
							"RUNDOWN"
						],
						"description": "Status of the legal entity:\n* LINKED - active but not yet had any payments taken\n* ACTIVE - active and in use\n* ARCHIVE - disconnected and archived\n* SETUP, CREATED, INACTIVE, RUNDOWN - enterprise statuses\n"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the legal entity was created"
					},
					"created_session": {
						"type": "string",
						"description": "Session that created this legal entity"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the legal entity was last updated"
					},
					"updated_session": {
						"type": "string",
						"description": "Session that last updated this legal entity"
					},
					"v": {
						"type": "integer",
						"description": "Version of the record"
					}
				}
			},
			"LegalEntityRoute": {
				"type": "object",
				"description": "A mapping between a legal entity and a payment gateway",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^lr_[0-9]+_[0-9]+$",
						"description": "Unique identifier for the route"
					},
					"legal_entity": {
						"type": "string",
						"description": "Legal entity ID"
					},
					"gateway": {
						"type": "string",
						"description": "Gateway ID"
					},
					"currencies": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Array of ISO currency codes this route supports"
					},
					"payment_method_types": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Array of payment method types this route supports (e.g., VISA, MASTERCARD)"
					},
					"metadata": {
						"type": "object",
						"description": "Custom key-value pairs",
						"additionalProperties": true
					},
					"rules": {
						"type": "object",
						"description": "Payment routing rules per source type",
						"properties": {
							"ECOMMERCE": {
								"type": "object",
								"description": "Rules for ecommerce payments"
							},
							"MOTO": {
								"type": "object",
								"description": "Rules for MOTO payments"
							},
							"POS": {
								"type": "object",
								"description": "Rules for POS payments"
							},
							"RECURRING": {
								"type": "object",
								"description": "Rules for recurring payments"
							}
						}
					},
					"workflows": {
						"type": "array",
						"items": {
							"type": "object"
						},
						"description": "Workflow configurations attached to this route"
					},
					"status": {
						"type": "string",
						"enum": [
							"LINKED",
							"ACTIVE",
							"INACTIVE",
							"RUNDOWN"
						],
						"description": "Status of the route:\n* LINKED - active but not yet used\n* ACTIVE - in use\n* INACTIVE - no longer in use, no payments may utilise this connection\n* RUNDOWN - no longer in use for new card details, saved cards may continue to be used\n"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the route was created"
					},
					"created_session": {
						"type": "string",
						"description": "Session that created this route"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the route was last updated"
					},
					"updated_session": {
						"type": "string",
						"description": "Session that last updated this route"
					},
					"v": {
						"type": "integer",
						"description": "Version of the record"
					}
				}
			},
			"Workflow": {
				"type": "object",
				"description": "A workflow configuration",
				"properties": {
					"id": {
						"type": "string",
						"pattern": "^wf_[0-9]+_[0-9]+$",
						"description": "Unique identifier for the workflow"
					},
					"name": {
						"type": "string",
						"description": "Name of the workflow"
					},
					"status": {
						"type": "string",
						"enum": [
							"ACTIVE",
							"LINKED",
							"INACTIVE",
							"RUNDOWN",
							"SETUP",
							"CREATED"
						],
						"description": "Current status of the workflow"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the workflow was created"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the workflow was last updated"
					},
					"v": {
						"type": "integer",
						"description": "Version of the record"
					}
				}
			},
			"Processor": {
				"type": "object",
				"description": "A payment processor available for gateway connections",
				"properties": {
					"id": {
						"type": "string",
						"description": "Processor identifier (e.g., STRIPE, ADYEN, SANDBOX)",
						"example": "STRIPE"
					},
					"name": {
						"type": "string",
						"description": "Display name of the processor",
						"example": "Stripe"
					},
					"category": {
						"type": "string",
						"enum": [
							"RECOMMENDED",
							"STD",
							"BETA"
						],
						"description": "Processor category. Categories can change as processors are promoted or demoted",
						"example": "RECOMMENDED"
					},
					"visible": {
						"type": "boolean",
						"description": "Whether the processor is available for new connections",
						"example": true
					},
					"oauth": {
						"type": "boolean",
						"description": "Whether the connection requires an OAuth flow",
						"example": true
					},
					"oauth_url": {
						"type": "string",
						"description": "URL to forward the user to complete the OAuth connection process. It points at Shuttle,\nwhich handles the processor's own redirect and then sends the user on to your URLs.\nReplace its placeholders before use:\n`#SUCCESSURL#` and `#CANCELURL#` with your URL-encoded success and cancel URLs, and\n`#NONCE#` with a value unique to this attempt.\nOn success, `oauth_data` is appended to your success URL (`?oauth_data=...`, or `&oauth_data=...`\nif it already has a query string). Pass it as `oauth_data` to [Create a gateway](/reference/inst-creategateway)\nwithin an hour to create the connection.\n"
					},
					"help": {
						"type": "string",
						"description": "URL to help documentation for this processor"
					},
					"website": {
						"type": "string",
						"description": "Processor company website"
					},
					"logo_url": {
						"type": "string",
						"description": "URL to the processor logo (transparent background, for light backgrounds)"
					},
					"instructions": {
						"type": "string",
						"description": "Markdown snippet explaining how to configure the processor"
					},
					"onboarding_js": {
						"type": "string",
						"description": "Base64-encoded onboarding JavaScript"
					},
					"countries": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "ISO country codes where this processor can acquire merchants",
						"example": [
							"US",
							"GB",
							"AU"
						]
					},
					"payment_method_types": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Payment method types supported by this processor",
						"example": [
							"VISA",
							"MASTERCARD",
							"AMEX"
						]
					},
					"priority": {
						"type": "integer",
						"description": "Display priority order"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "When the processor was added"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "When the processor was last updated"
					}
				}
			},
			"Instance": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Shuttle's ID for the instance (globally unique)"
					},
					"name": {
						"type": "string",
						"description": "The name of the instance, typically company name"
					},
					"instance_key": {
						"type": "string",
						"description": "Your ID for the instance (unique to the application)"
					},
					"status": {
						"type": "string",
						"description": "The status of the instance, typically ACTIVE or INACTIVE",
						"enum": [
							"ACTIVATING",
							"ACTIVE",
							"INACTIVE"
						]
					},
					"application": {
						"type": "string",
						"description": "The application the instance was created in"
					},
					"checkout_urls": {
						"type": "array",
						"description": "Domains where you embed the Shuttle checkout widget, used for Apple Pay and Google Pay domain registration.",
						"items": {
							"type": "string"
						}
					},
					"client": {
						"type": "string",
						"description": "The internal Shuttle ID for this instance"
					},
					"contact_email": {
						"type": "string",
						"description": "The contact email provided for the instance, used when providing support"
					},
					"contact_name": {
						"type": "string",
						"description": "The contact name provided for the instance, used when providing support"
					},
					"contact_phone": {
						"type": "string",
						"description": "The contact phone provided for the instance, used when providing support"
					},
					"country": {
						"type": "string",
						"description": "The country provided for the instance"
					},
					"created": {
						"type": "string",
						"format": "date-time",
						"description": "The date the instance was created"
					},
					"domain": {
						"type": "string",
						"description": "The custom domain for this instance"
					},
					"domains": {
						"type": "array",
						"description": "A list of domains this instance is available under",
						"items": {
							"type": "string"
						}
					},
					"environment": {
						"type": "string",
						"description": "Either SANDBOX or LIVE",
						"enum": [
							"SANDBOX",
							"LIVE"
						]
					},
					"features": {
						"type": "array",
						"description": "Enterprise only features",
						"items": {
							"type": "string"
						}
					},
					"last_contract": {
						"type": "string",
						"format": "date-time",
						"description": "The date of last contract creation"
					},
					"last_transaction": {
						"type": "string",
						"format": "date-time",
						"description": "The date of last transaction creation"
					},
					"merchant_name": {
						"type": "string",
						"description": "The merchant's display name"
					},
					"metadata": {
						"type": "object",
						"description": "A map of user defined key value pairs"
					},
					"parent": {
						"type": "string",
						"description": "The parent instance ID"
					},
					"private_integrations": {
						"type": "array",
						"description": "Any private processors that have been made available to this instance",
						"items": {
							"type": "string"
						}
					},
					"processors": {
						"type": "array",
						"description": "A list of connected processors",
						"items": {
							"type": "string"
						}
					},
					"receipt_format": {
						"type": "string",
						"description": "Template for generating transaction references. Contains `#TRANSACTIONKEY#` or `#TRANSACTIONID#`."
					},
					"receipt_users": {
						"type": "array",
						"description": "Enterprise only",
						"items": {
							"type": "string"
						}
					},
					"report_users": {
						"type": "array",
						"description": "Enterprise only",
						"items": {
							"type": "string"
						}
					},
					"retry_error_schedule": {
						"type": "array",
						"items": {
							"type": "integer"
						},
						"description": "Custom retry schedule for errored payments (array of delays in milliseconds)"
					},
					"retry_schedule": {
						"type": "array",
						"items": {
							"type": "integer"
						},
						"description": "Custom retry schedule for declined payments (array of delays in milliseconds)"
					},
					"secret_key": {
						"type": "string",
						"description": "Per-instance API key for direct merchant authentication. Only returned when `expand=secret_key` is requested."
					},
					"tcs_accepted": {
						"type": "string",
						"format": "date-time",
						"description": "If the user manually accepted the T&Cs, the date they were accepted"
					},
					"tcs_accepted_user": {
						"type": "string",
						"description": "The user_id of the user that accepted the terms and conditions"
					},
					"tcs_outstanding": {
						"type": "boolean",
						"description": "True if the user is required to accept the terms and conditions"
					},
					"terminated": {
						"type": "string",
						"format": "date-time",
						"description": "The date the instance was terminated (status INACTIVE only)"
					},
					"updated": {
						"type": "string",
						"format": "date-time",
						"description": "The date the instance was last updated"
					},
					"v": {
						"type": "integer",
						"description": "The version of the record"
					},
					"webhook_target": {
						"type": "string",
						"description": "The webhook target URL for this instance. Replaces the application-level webhook destination for this instance -- events are not sent to both. Supports retry, failover, and fan-out configuration. See [Webhook Destinations](/reference/webhooks-intro#webhook-destinations)."
					}
				}
			}
		}
	}
}