{
	"swagger": "2.0",
	"info": {
		"description": "Ledyer public APIs. Defaults to the sandbox environment. For live requests, use api.live.ledyer.com and obtain tokens from https://auth.live.ledyer.com/oauth/token.",
		"title": "Ledyer API",
		"contact": {
			"name": "API Support",
			"url": "https://developers.ledyer.com/",
			"email": "support@ledyer.com"
		},
		"version": "1.0"
	},
	"host": "api.sandbox.ledyer.com",
	"basePath": "/",
	"schemes": [
		"https"
	],
	"paths": {
		"/v1/authorization-tokens/{token}": {
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Cancel an authorization",
				"parameters": [
					{
						"type": "string",
						"description": "Authorization token",
						"name": "token",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"204": {
						"description": "No Content"
					}
				}
			}
		},
		"/v1/authorization-tokens/{token}/customer-token": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Create customer token from authorization",
				"parameters": [
					{
						"type": "string",
						"description": "Authorization token",
						"name": "token",
						"in": "path",
						"required": true
					},
					{
						"description": "Create Customer Token",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.CreateCustomerTokenRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CreateCustomerTokenResponse"
						}
					}
				}
			}
		},
		"/v1/authorization-tokens/{token}/order": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Create order with authorization token",
				"parameters": [
					{
						"type": "string",
						"description": "Authorization token",
						"name": "token",
						"in": "path",
						"required": true
					},
					{
						"description": "Create order",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.CreateOrderRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CreateOrderResponse"
						}
					}
				}
			}
		},
		"/v1/customer-tokens/{token}": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Get customer token",
				"parameters": [
					{
						"type": "string",
						"description": "Customer token",
						"name": "token",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CustomerToken"
						}
					}
				}
			},
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Revoke customer token",
				"parameters": [
					{
						"type": "string",
						"description": "Customer token",
						"name": "token",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CustomerToken"
						}
					}
				}
			}
		},
		"/v1/customer-tokens/{token}/order": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Create order with customer token",
				"parameters": [
					{
						"type": "string",
						"description": "Customer token",
						"name": "token",
						"in": "path",
						"required": true
					},
					{
						"description": "Create order",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.CustomerTokenOrderRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CustomerTokenOrderResponse"
						}
					}
				}
			}
		},
		"/v1/headless/search/companies": {
			"get": {
				"produces": [
					"application/json"
				],
				"tags": [
					"Headless API"
				],
				"summary": "Company search",
				"parameters": [
					{
						"type": "string",
						"description": "search query",
						"name": "q",
						"in": "query",
						"required": true
					},
					{
						"type": "string",
						"description": "country code",
						"name": "country",
						"in": "query",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.CompanySearchResponse"
						}
					}
				}
			}
		},
		"/v1/orders": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Get orders",
				"parameters": [
					{
						"type": "string",
						"description": "search query",
						"name": "q",
						"in": "query"
					},
					{
						"type": "string",
						"description": "fromId (deprecated)",
						"name": "fromId",
						"in": "query"
					},
					{
						"type": "string",
						"description": "cursor",
						"name": "cursor",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "id",
						"name": "id",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "storeId",
						"name": "storeId",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "ordertReference",
						"name": "orderReference",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "merchantReference",
						"name": "merchantReference",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "status",
						"name": "status",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "statusNot",
						"name": "statusNot",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "statusAnd",
						"name": "statusAnd",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "paymentMethodCategory",
						"name": "paymentMethodCategory",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdFrom",
						"name": "createdFrom",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdTo",
						"name": "createdTo",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "expiresFrom",
						"name": "expiresFrom",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "expiresTo",
						"name": "expiresTo",
						"in": "query"
					},
					{
						"type": "integer",
						"description": "size",
						"name": "size",
						"in": "query"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.GetOrdersResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Get order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			},
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Edit order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Edit order",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.EditLedgerOrderRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			},
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Cancel order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/acknowledge": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Acknowledge order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/capture": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Capture order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Optional full capture details; omit the body to capture all remaining uncaptured order lines",
						"name": "capture",
						"in": "body",
						"schema": {
							"$ref": "#/definitions/model.FullCaptureRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/customer": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Edit customer",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Customer",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.EditCustomerRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/document/{ledgerId}/resend": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Resend order document (invoice or card receipt etc)",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "Ledger Id",
						"name": "ledgerId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/extendexpiry": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Extend order expiry",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/partialcapture": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Partial capture order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Partial capture order",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.PartialCaptureRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/partialrefund/{ledgerId}": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Partial refund order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "Ledger Id",
						"name": "ledgerId",
						"in": "path",
						"required": true
					},
					{
						"description": "Partial refund order",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.PartialRefundRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/paymentmethod": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Edit payment method",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Payment Method",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.EditPaymentMethodRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/paymentstatus": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Get payment status",
				"deprecated": true,
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.PaymentStatusResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/recourse/{ledgerId}": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Recourse an order invoice",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "Ledger Id",
						"name": "ledgerId",
						"in": "path",
						"required": true
					},
					{
						"description": "Invoice recourse",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.RecourseOrderInvoiceRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/reference": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Set or edit the order reference",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"description": "Order reference",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.OrderReferenceRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/refund/{ledgerId}": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Refund order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "Ledger Id",
						"name": "ledgerId",
						"in": "path",
						"required": true
					},
					{
						"description": "Refund order",
						"name": "order",
						"in": "body",
						"schema": {
							"$ref": "#/definitions/model.RefundRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/orders/{orderId}/{ledgerId}": {
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Cancel order",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id",
						"name": "orderId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "Sub-order ledger Id",
						"name": "ledgerId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.LedgerOrderResponse"
						}
					}
				}
			}
		},
		"/v1/payment-sessions": {
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Create a new session",
				"parameters": [
					{
						"description": "Create session",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.CreatePaymentSessionRequest"
						}
					}
				],
				"responses": {
					"201": {
						"description": "Created",
						"schema": {
							"$ref": "#/definitions/model.PaymentSessionCreatedResponse"
						},
						"headers": {
							"Location": {
								"type": "string",
								"description": "/v1/payment-sessions/ps_22jHrMzW..."
							}
						}
					}
				}
			}
		},
		"/v1/payment-sessions/{sessionId}": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Get session",
				"parameters": [
					{
						"type": "string",
						"description": "Session Id or External Session Id prefixed with 'external:'",
						"name": "sessionId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.PaymentSessionResponse"
						}
					}
				}
			},
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Update session",
				"parameters": [
					{
						"type": "string",
						"description": "Session Id",
						"name": "sessionId",
						"in": "path",
						"required": true
					},
					{
						"description": "Update session",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.UpdatePaymentSessionRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.PaymentSessionResponse"
						}
					}
				}
			},
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Payments API"
				],
				"summary": "Cancel session",
				"parameters": [
					{
						"type": "string",
						"description": "Session Id",
						"name": "sessionId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.PaymentSessionResponse"
						}
					}
				}
			}
		},
		"/v1/paymentstatus": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Order Management API"
				],
				"summary": "Query payment status",
				"parameters": [
					{
						"type": "string",
						"description": "sessionId",
						"name": "sessionId",
						"in": "query"
					},
					{
						"type": "string",
						"description": "orderId",
						"name": "orderId",
						"in": "query"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.PaymentStatusResponse"
						}
					}
				}
			}
		},
		"/v1/sessions": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Checkout API"
				],
				"summary": "Get sessions",
				"parameters": [
					{
						"type": "string",
						"description": "search query",
						"name": "q",
						"in": "query"
					},
					{
						"type": "string",
						"description": "fromId",
						"name": "fromId",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "storeId",
						"name": "storeId",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "orderId",
						"name": "orderId",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "merchantReference",
						"name": "merchantReference",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "state",
						"name": "state",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "source",
						"name": "source",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdFrom",
						"name": "createdFrom",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdTo",
						"name": "createdTo",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "updatedFrom",
						"name": "updatedFrom",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "updatedTo",
						"name": "updatedFrom",
						"in": "query"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.GetSessionsResponse"
						}
					}
				}
			},
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Checkout API"
				],
				"summary": "Create a new session",
				"parameters": [
					{
						"description": "Create order session",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.SessionRequest"
						}
					}
				],
				"responses": {
					"201": {
						"description": "Created",
						"schema": {
							"$ref": "#/definitions/model.SessionCreatedResponse"
						},
						"headers": {
							"Location": {
								"type": "string",
								"description": "/v1/sessions/se_22jHrMzW..."
							}
						}
					}
				}
			}
		},
		"/v1/sessions/{id}": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Checkout API"
				],
				"summary": "Get session",
				"parameters": [
					{
						"type": "string",
						"description": "Order Id, Session Id or External Session Id prefixed with 'external:'",
						"name": "id",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.SessionResponse"
						}
					}
				}
			},
			"post": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Checkout API"
				],
				"summary": "Update session",
				"parameters": [
					{
						"type": "string",
						"description": "Session Id or Order Id",
						"name": "id",
						"in": "path",
						"required": true
					},
					{
						"description": "Update order session",
						"name": "order",
						"in": "body",
						"required": true,
						"schema": {
							"$ref": "#/definitions/model.UpdateSessionRequest"
						}
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.SessionCreatedResponse"
						}
					}
				}
			},
			"delete": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Checkout API"
				],
				"summary": "Cancel session",
				"parameters": [
					{
						"type": "string",
						"description": "Session Id",
						"name": "id",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.SessionResponse"
						}
					}
				}
			}
		},
		"/v1/settlements": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Settlement API"
				],
				"summary": "Get settlements",
				"parameters": [
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "storeId",
						"name": "storeId",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "id",
						"name": "id",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "reference",
						"name": "reference",
						"in": "query"
					},
					{
						"type": "array",
						"items": {
							"type": "string"
						},
						"collectionFormat": "csv",
						"description": "currency",
						"name": "currency",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdFrom",
						"name": "createdFrom",
						"in": "query"
					},
					{
						"type": "string",
						"format": "date-time",
						"description": "createdTo",
						"name": "createdTo",
						"in": "query"
					},
					{
						"type": "string",
						"description": "fromId",
						"name": "fromId",
						"in": "query"
					},
					{
						"type": "integer",
						"description": "size",
						"name": "size",
						"in": "query"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.ReportSettlementsResponse"
						}
					}
				}
			}
		},
		"/v1/settlements/{settlementId}": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Settlement API"
				],
				"summary": "Get settlement",
				"parameters": [
					{
						"type": "string",
						"description": "Settlement Id",
						"name": "settlementId",
						"in": "path",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.ReportSettlement"
						}
					}
				}
			}
		},
		"/v1/settlements/{settlementId}/tx": {
			"get": {
				"security": [
					{
						"OAuth2": []
					}
				],
				"consumes": [
					"application/json"
				],
				"produces": [
					"application/json"
				],
				"tags": [
					"Settlement API"
				],
				"summary": "Get settlement tx",
				"parameters": [
					{
						"type": "string",
						"description": "Settlement Id",
						"name": "settlementId",
						"in": "path",
						"required": true
					},
					{
						"type": "string",
						"description": "fromId",
						"name": "fromId",
						"in": "query"
					},
					{
						"type": "integer",
						"description": "size",
						"name": "size",
						"in": "query"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"schema": {
							"$ref": "#/definitions/model.ReportSettlementTxResponse"
						}
					}
				}
			}
		}
	},
	"definitions": {
		"model.CreateCustomerTokenRequest": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"customer",
				"locale"
			],
			"properties": {
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.CustomerTokenCustomerData"
				},
				"locale": {
					"type": "string"
				},
				"storeId": {
					"type": "string"
				}
			}
		},
		"model.CustomerTokenCustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				}
			}
		},
		"model.CompanyAddress": {
			"type": "object",
			"properties": {
				"attentionName": {
					"type": "string",
					"maxLength": 100
				},
				"careOf": {
					"type": "string",
					"maxLength": 100
				},
				"city": {
					"type": "string",
					"maxLength": 50
				},
				"companyName": {
					"type": "string",
					"maxLength": 100
				},
				"contact": {
					"$ref": "#/definitions/model.CompanyContact"
				},
				"country": {
					"type": "string",
					"maxLength": 50
				},
				"postalCode": {
					"type": "string",
					"maxLength": 10
				},
				"streetAddress": {
					"type": "string",
					"maxLength": 100
				}
			}
		},
		"model.CompanyContact": {
			"type": "object",
			"properties": {
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"phone": {
					"type": "string"
				}
			}
		},
		"model.CreateCustomerTokenResponse": {
			"type": "object",
			"properties": {
				"customerToken": {
					"type": "string"
				}
			}
		},
		"model.CreateOrderRequest": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"locale"
			],
			"properties": {
				"autoCapture": {
					"$ref": "#/definitions/model.AutoCapture"
				},
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.OrderCustomerData"
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"storeId": {
					"type": "string"
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.AutoCapture": {
			"type": "object",
			"properties": {
				"delayMinutes": {
					"type": "integer",
					"maximum": 10080,
					"minimum": 0
				},
				"enabled": {
					"type": "boolean"
				}
			}
		},
		"model.OrderCustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				}
			}
		},
		"model.OrderLine": {
			"type": "object",
			"required": [
				"description",
				"quantity"
			],
			"properties": {
				"description": {
					"type": "string",
					"maxLength": 200
				},
				"quantity": {
					"type": "integer",
					"maximum": 99999999,
					"minimum": 1
				},
				"reference": {
					"type": "string",
					"maxLength": 200
				},
				"totalAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"totalVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"type": {
					"enum": [
						"physical",
						"service",
						"digital",
						"discount",
						"shippingFee",
						"giftCard",
						"storeCredit",
						"surcharge",
						"autoAdjustment"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.OrderLineType"
						}
					]
				},
				"unitDiscountAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"unitPrice": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"vat": {
					"type": "integer"
				}
			}
		},
		"model.OrderLineType": {
			"type": "string",
			"enum": [
				"physical",
				"service",
				"digital",
				"discount",
				"shippingFee",
				"giftCard",
				"storeCredit",
				"surcharge",
				"autoAdjustment"
			],
			"x-enum-varnames": [
				"OrderLineTypePhysical",
				"OrderLineTypeService",
				"OrderLineTypeDigital",
				"OrderLineTypeDiscount",
				"OrderLineTypeShippingFee",
				"OrderLineTypeGiftCard",
				"OrderLineTypeStoreCredit",
				"OrderLineTypeSurcharge",
				"OrderLineTypeAutoAdjustment"
			]
		},
		"model.CreateOrderResponse": {
			"type": "object",
			"properties": {
				"orderId": {
					"type": "string"
				}
			}
		},
		"model.CustomerToken": {
			"type": "object",
			"properties": {
				"account": {
					"$ref": "#/definitions/model.PublicProviderAccount"
				},
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string"
				},
				"lastName": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.SelectedPaymentMethod"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string"
				},
				"reference2": {
					"type": "string"
				},
				"state": {
					"$ref": "#/definitions/model.CustomerTokenState"
				},
				"storeId": {
					"type": "string"
				},
				"tokenId": {
					"type": "string"
				}
			}
		},
		"model.PublicProviderAccount": {
			"type": "object",
			"properties": {
				"expiryMonth": {
					"type": "string"
				},
				"expiryYear": {
					"type": "string"
				},
				"maskedAccount": {
					"type": "string"
				}
			}
		},
		"model.SelectedPaymentMethod": {
			"type": "object",
			"properties": {
				"provider": {
					"type": "string",
					"enum": [
						"ledyer",
						"external"
					]
				},
				"type": {
					"enum": [
						"invoice",
						"advanceInvoice",
						"partPayment",
						"card",
						"bankTransfer",
						"paypal"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.PaymentType"
						}
					]
				}
			}
		},
		"model.PaymentType": {
			"type": "string",
			"enum": [
				"invoice",
				"advanceInvoice",
				"card",
				"bankTransfer",
				"paypal",
				"partPayment"
			],
			"x-enum-varnames": [
				"PaymentTypeInvoice",
				"PaymentTypeAdvanceInvoice",
				"PaymentTypeCard",
				"PaymentTypeBankTransfer",
				"PaymentTypePayPal",
				"PaymentTypePartPayment"
			]
		},
		"model.CustomerTokenState": {
			"type": "string",
			"enum": [
				"active",
				"revoked"
			],
			"x-enum-varnames": [
				"CustomerTokenStateActive",
				"CustomerTokenStateRevoked"
			]
		},
		"model.CustomerTokenOrderRequest": {
			"type": "object",
			"required": [
				"country",
				"currency"
			],
			"properties": {
				"autoCapture": {
					"$ref": "#/definitions/model.AutoCapture"
				},
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"storeId": {
					"type": "string"
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.CustomerTokenOrderResponse": {
			"type": "object",
			"properties": {
				"orderId": {
					"type": "string"
				}
			}
		},
		"model.CompanySearchResponse": {
			"type": "object",
			"properties": {
				"companies": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.CompanyData"
					}
				},
				"country": {
					"type": "string"
				}
			}
		},
		"model.CompanyData": {
			"type": "object",
			"properties": {
				"companyId": {
					"type": "string"
				},
				"companyName": {
					"type": "string"
				},
				"exactMatch": {
					"type": "boolean"
				}
			}
		},
		"model.GetOrdersResponse": {
			"type": "object",
			"properties": {
				"lastId": {
					"type": "string"
				},
				"nextCursor": {
					"type": "string"
				},
				"noOfOrders": {
					"type": "integer"
				},
				"orders": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderDetails"
					}
				}
			}
		},
		"model.OrderDetails": {
			"type": "object",
			"properties": {
				"createdAt": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.CustomerDetails"
				},
				"expiresAt": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"merchantReference": {
					"type": "string"
				},
				"orderReference": {
					"type": "string"
				},
				"paymentMethodCategory": {
					"$ref": "#/definitions/model.PaymentMethodCategory"
				},
				"riskProfile": {
					"$ref": "#/definitions/model.RiskProfile"
				},
				"status": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderStatus"
					}
				},
				"storeId": {
					"type": "string"
				},
				"totalOrderAmount": {
					"$ref": "#/definitions/model.Money"
				}
			}
		},
		"model.CustomerDetails": {
			"type": "object",
			"properties": {
				"companyId": {
					"type": "string"
				},
				"companyName": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string"
				},
				"lastName": {
					"type": "string"
				},
				"phone": {
					"type": "string"
				},
				"vatId": {
					"type": "string"
				}
			}
		},
		"model.PaymentMethodCategory": {
			"type": "string",
			"enum": [
				"invoice",
				"serviceInvoice",
				"advanceInvoice",
				"card",
				"directBank"
			],
			"x-enum-varnames": [
				"PaymentMethodCategoryInvoice",
				"PaymentMethodCategoryServiceInvoice",
				"PaymentMethodCategoryAdvanceInvoice",
				"PaymentMethodCategoryCard",
				"PaymentMethodCategoryDirectBank"
			]
		},
		"model.RiskProfile": {
			"type": "object",
			"properties": {
				"tags": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.RiskTag"
					}
				}
			}
		},
		"model.RiskTag": {
			"type": "string",
			"enum": [
				"unknown",
				"creditDeclined",
				"blacklisted",
				"possibleFraud"
			],
			"x-enum-varnames": [
				"RiskTagUnknown",
				"RiskTagCreditDeclined",
				"RiskTagBlackListed",
				"RiskTagPossibleFraud"
			]
		},
		"model.OrderStatus": {
			"type": "string",
			"enum": [
				"partiallyCaptured",
				"fullyCaptured",
				"partiallyRefunded",
				"fullyRefunded",
				"uncaptured",
				"onHold",
				"readyForCapture",
				"fraudDeny",
				"cancelled",
				"unacknowledged",
				"expired",
				"partiallyPaid",
				"fullyPaid",
				"invoiceDeliveryFailure"
			],
			"x-enum-varnames": [
				"PartiallyCaptured",
				"FullyCaptured",
				"PartiallyRefunded",
				"FullyRefunded",
				"Uncaptured",
				"OnHold",
				"ReadyForCapture",
				"FraudDeny",
				"Cancelled",
				"Unacknowledged",
				"Expired",
				"PartiallyPaid",
				"FullyPaid",
				"InvoiceDeliveryFailure"
			]
		},
		"model.Money": {
			"type": "object",
			"properties": {
				"amount": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"formatted": {
					"type": "string"
				},
				"formattedWithCurrency": {
					"type": "string"
				},
				"minorUnits": {
					"type": "integer"
				}
			}
		},
		"model.LedgerOrderResponse": {
			"type": "object",
			"properties": {
				"authorizeStatus": {
					"type": "string"
				},
				"captured": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.SubOrder"
					}
				},
				"capturedAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"createdAt": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.LedgerCustomerData"
				},
				"events": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderEvent"
					}
				},
				"expiresAt": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"merchantReference": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"orderReference": {
					"type": "string"
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.SelectedPaymentMethod"
				},
				"refunded": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.SubOrder"
					}
				},
				"refundedAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"riskProfile": {
					"$ref": "#/definitions/model.RiskProfile"
				},
				"status": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderStatus"
					}
				},
				"storeId": {
					"type": "string"
				},
				"token": {
					"$ref": "#/definitions/model.TokenData"
				},
				"uncaptured": {
					"$ref": "#/definitions/model.SubOrder"
				},
				"uncapturedAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"updatedAt": {
					"type": "string"
				},
				"vatMode": {
					"$ref": "#/definitions/model.VatMode"
				}
			}
		},
		"model.SubOrder": {
			"type": "object",
			"properties": {
				"availableActions": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderManagementAction"
					}
				},
				"createdAt": {
					"type": "string"
				},
				"documentMessage": {
					"type": "string"
				},
				"documentReference": {
					"type": "string"
				},
				"documentUrl": {
					"type": "string"
				},
				"factoringStatus": {
					"description": "REMOVE",
					"type": "string"
				},
				"ledgerId": {
					"type": "string"
				},
				"note": {
					"type": "string"
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OutputOrderLine"
					}
				},
				"status": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.SubOrderStatus"
					}
				},
				"totalOrderAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"totalOrderAmountExclVat": {
					"$ref": "#/definitions/model.Money"
				},
				"totalOrderVatAmount": {
					"$ref": "#/definitions/model.Money"
				}
			}
		},
		"model.OrderManagementAction": {
			"type": "object",
			"properties": {
				"type": {
					"$ref": "#/definitions/model.OrderManagementActionType"
				}
			}
		},
		"model.OrderManagementActionType": {
			"type": "string",
			"enum": [
				"capture",
				"partialCapture",
				"refund",
				"partialRefund",
				"cancel",
				"editOrder",
				"editCustomer",
				"editPaymentMethod",
				"extendOrderExpiry",
				"resendOrderInvoice",
				"void",
				"recourseOrderInvoice"
			],
			"x-enum-varnames": [
				"OrderManagementActionCapture",
				"OrderManagementActionPartialCapture",
				"OrderManagementActionRefund",
				"OrderManagementActionPartialRefund",
				"OrderManagementActionCancel",
				"OrderManagementActionEditOrder",
				"OrderManagementActionEditCustomer",
				"OrderManagementActionEditPaymentMethod",
				"OrderManagementActionExtendOrderExpiry",
				"OrderManagementActionResendOrderInvoice",
				"OrderManagementActionVoid",
				"OrderManagementActionRecourseOrderInvoice"
			]
		},
		"model.OutputOrderLine": {
			"type": "object",
			"required": [
				"description",
				"quantity"
			],
			"properties": {
				"description": {
					"type": "string",
					"maxLength": 200
				},
				"id": {
					"type": "string"
				},
				"quantity": {
					"type": "integer",
					"maximum": 99999999,
					"minimum": 1
				},
				"reference": {
					"type": "string",
					"maxLength": 200
				},
				"totalAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"totalVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"type": {
					"enum": [
						"physical",
						"service",
						"digital",
						"discount",
						"shippingFee",
						"giftCard",
						"storeCredit",
						"surcharge",
						"autoAdjustment"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.OrderLineType"
						}
					]
				},
				"unitDiscountAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"unitPrice": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"unitPriceNetDecimal": {
					"type": "string"
				},
				"vat": {
					"type": "integer"
				}
			}
		},
		"model.SubOrderStatus": {
			"type": "string",
			"enum": [
				"partiallyPaid",
				"fullyPaid",
				"reminder1",
				"reminder2",
				"debtCollection",
				"invoiceDeliveryFailure",
				"void",
				"recourse"
			],
			"x-enum-varnames": [
				"SubOrderStatusPartiallyPaid",
				"SubOrderStatusFullyPaid",
				"SubOrderStatusReminder1",
				"SubOrderStatusReminder2",
				"SubOrderStatusDebtCollection",
				"SubOrderStatusInvoiceDeliveryFailure",
				"SubOrderStatusVoid",
				"SubOrderStatusRecourse"
			]
		},
		"model.LedgerCustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"companyName": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string"
				},
				"invoiceChannel": {
					"$ref": "#/definitions/model.InvoiceChannel"
				},
				"lastName": {
					"type": "string"
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.SelectedPaymentMethod"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string"
				},
				"reference2": {
					"type": "string"
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"vatId": {
					"type": "string"
				}
			}
		},
		"model.InvoiceChannel": {
			"type": "object",
			"properties": {
				"configurations": {
					"$ref": "#/definitions/model.InvoiceChannelConfigurations"
				},
				"destination": {
					"$ref": "#/definitions/model.InvoiceChannelDestination"
				},
				"details": {
					"type": "string"
				},
				"state": {
					"$ref": "#/definitions/model.InvoiceChannelState"
				},
				"type": {
					"$ref": "#/definitions/model.InvoiceChannelType"
				}
			}
		},
		"model.InvoiceChannelConfigurations": {
			"type": "object",
			"properties": {
				"promoteGln": {
					"type": "boolean"
				}
			}
		},
		"model.InvoiceChannelDestination": {
			"type": "string",
			"enum": [
				"default",
				"channelOnly"
			],
			"x-enum-varnames": [
				"InvoiceChannelDestinationDefault",
				"InvoiceChannelDestinationChannelOnly"
			]
		},
		"model.InvoiceChannelState": {
			"type": "string",
			"enum": [
				"disabled",
				"enabled"
			],
			"x-enum-varnames": [
				"InvoiceChannelStateDisabled",
				"InvoiceChannelStateEnabled"
			]
		},
		"model.InvoiceChannelType": {
			"type": "string",
			"enum": [
				"email",
				"edi",
				"snailmail",
				"kivra"
			],
			"x-enum-varnames": [
				"InvoiceChannelTypeEmail",
				"InvoiceChannelTypeEdi",
				"InvoiceChannelTypeSnailMail",
				"InvoiceChannelTypeKivra"
			]
		},
		"model.OrderEvent": {
			"type": "object",
			"properties": {
				"amount": {
					"$ref": "#/definitions/model.Money"
				},
				"createdAt": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"ledgerId": {
					"type": "string"
				},
				"orderId": {
					"type": "string"
				},
				"type": {
					"type": "string"
				}
			}
		},
		"model.TokenData": {
			"type": "object",
			"properties": {
				"tokenId": {
					"type": "string"
				}
			}
		},
		"model.VatMode": {
			"type": "string",
			"enum": [
				"inclVat",
				"exclVat"
			],
			"x-enum-varnames": [
				"VatModeIncl",
				"VatModeExcl"
			]
		},
		"model.EditLedgerOrderRequest": {
			"type": "object",
			"required": [
				"orderLines",
				"totalOrderAmount",
				"totalOrderAmountExclVat",
				"totalOrderVatAmount"
			],
			"properties": {
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.FullCaptureRequest": {
			"type": "object",
			"properties": {
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLineWithId"
					}
				},
				"totalCaptureAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.OrderLineWithId": {
			"type": "object",
			"required": [
				"description",
				"quantity"
			],
			"properties": {
				"description": {
					"type": "string",
					"maxLength": 200
				},
				"id": {
					"type": "string"
				},
				"quantity": {
					"type": "integer",
					"maximum": 99999999,
					"minimum": 1
				},
				"reference": {
					"type": "string",
					"maxLength": 200
				},
				"totalAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"totalVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"type": {
					"enum": [
						"physical",
						"service",
						"digital",
						"discount",
						"shippingFee",
						"giftCard",
						"storeCredit",
						"surcharge",
						"autoAdjustment"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.OrderLineType"
						}
					]
				},
				"unitDiscountAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"unitPrice": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": -1000000000
				},
				"vat": {
					"type": "integer"
				}
			}
		},
		"model.EditCustomerRequest": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"email": {
					"type": "string"
				},
				"invoiceChannel": {
					"$ref": "#/definitions/model.SelectedInvoiceChannel"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				}
			}
		},
		"model.SelectedInvoiceChannel": {
			"type": "object",
			"properties": {
				"destination": {
					"enum": [
						"default",
						"channelOnly"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.InvoiceChannelDestination"
						}
					]
				},
				"details": {
					"type": "string"
				},
				"type": {
					"enum": [
						"email",
						"edi",
						"snailmail",
						"kivra"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.InvoiceChannelType"
						}
					]
				}
			}
		},
		"model.PartialCaptureRequest": {
			"type": "object",
			"required": [
				"orderLines",
				"totalCaptureAmount"
			],
			"properties": {
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLineWithId"
					}
				},
				"totalCaptureAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.PartialRefundRequest": {
			"type": "object",
			"required": [
				"orderLines",
				"totalRefundAmount"
			],
			"properties": {
				"note": {
					"type": "string",
					"maxLength": 200
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"totalRefundAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.EditPaymentMethodRequest": {
			"type": "object",
			"properties": {
				"paymentMethod": {
					"$ref": "#/definitions/model.EditablePaymentMethod"
				}
			}
		},
		"model.EditablePaymentMethod": {
			"type": "object",
			"properties": {
				"provider": {
					"type": "string",
					"enum": [
						"ledyer"
					]
				},
				"type": {
					"enum": [
						"advanceInvoice"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.PaymentType"
						}
					]
				}
			}
		},
		"model.PaymentStatusResponse": {
			"type": "object",
			"properties": {
				"note": {
					"type": "string"
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.SelectedPaymentMethod"
				},
				"status": {
					"$ref": "#/definitions/model.PaymentStatus"
				}
			}
		},
		"model.PaymentStatus": {
			"type": "string",
			"enum": [
				"orderInitiated",
				"orderPending",
				"paymentPending",
				"paymentConfirmed",
				"orderCaptured",
				"orderRefunded",
				"orderCancelled",
				"unknown"
			],
			"x-enum-varnames": [
				"PaymentStatusOrderInitiated",
				"PaymentStatusOrderPending",
				"PaymentStatusPaymentPending",
				"PaymentStatusPaymentConfirmed",
				"PaymentStatusOrderCaptured",
				"PaymentStatusOrderRefunded",
				"PaymentStatusOrderCancelled",
				"PaymentStatusUnknown"
			]
		},
		"model.RecourseOrderInvoiceRequest": {
			"type": "object",
			"required": [
				"recourseType"
			],
			"properties": {
				"recourseType": {
					"enum": [
						"paidDirectlyToMerchant"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.InvoiceRecourseType"
						}
					]
				}
			}
		},
		"model.InvoiceRecourseType": {
			"type": "string",
			"enum": [
				"paidDirectlyToMerchant"
			],
			"x-enum-varnames": [
				"InvoiceRecourseTypePaidDirectlyToMerchant"
			]
		},
		"model.OrderReferenceRequest": {
			"type": "object",
			"required": [
				"reference"
			],
			"properties": {
				"reference": {
					"type": "string",
					"maxLength": 50
				}
			}
		},
		"model.RefundRequest": {
			"type": "object",
			"properties": {
				"note": {
					"type": "string",
					"maxLength": 200
				}
			}
		},
		"model.CreatePaymentSessionRequest": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"locale"
			],
			"properties": {
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"customerData": {
					"$ref": "#/definitions/model.PatchablePaymentCustomerData"
				},
				"externalSessionId": {
					"type": "string",
					"maxLength": 50
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.PaymentOrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"storeId": {
					"type": "string"
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.PatchablePaymentCustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"invoiceChannel": {
					"$ref": "#/definitions/model.SelectedInvoiceChannel"
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.PaymentSelectedPaymentMethod"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"ssn": {
					"type": "string"
				}
			}
		},
		"model.PaymentSelectedPaymentMethod": {
			"type": "object",
			"properties": {
				"type": {
					"enum": [
						"invoice",
						"advanceInvoice",
						"partPayment"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.PaymentPaymentType"
						}
					]
				}
			}
		},
		"model.PaymentPaymentType": {
			"type": "string",
			"enum": [
				"invoice",
				"advanceInvoice",
				"partPayment"
			],
			"x-enum-varnames": [
				"PaymentPaymentTypeInvoice",
				"PaymentPaymentTypeAdvanceInvoice",
				"PaymentPaymentTypePartPayment"
			]
		},
		"model.PaymentOrderSettings": {
			"type": "object",
			"properties": {
				"security": {
					"$ref": "#/definitions/model.PaymentOrderSecurity"
				},
				"urls": {
					"$ref": "#/definitions/model.PaymentMerchantUrls"
				}
			}
		},
		"model.PaymentOrderSecurity": {
			"type": "object",
			"properties": {
				"level": {
					"type": "integer",
					"enum": [
						100,
						110,
						120,
						200,
						210,
						220,
						300,
						400
					]
				}
			}
		},
		"model.PaymentMerchantUrls": {
			"type": "object",
			"properties": {
				"cancel": {
					"type": "string",
					"maxLength": 2000
				},
				"confirmation": {
					"type": "string",
					"maxLength": 2000
				},
				"notification": {
					"type": "string",
					"maxLength": 2000
				},
				"privacy": {
					"type": "string",
					"maxLength": 2000
				},
				"terms": {
					"type": "string",
					"maxLength": 2000
				}
			}
		},
		"model.PaymentSessionCreatedResponse": {
			"type": "object",
			"properties": {
				"configuration": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.PaymentMethodConfiguration"
					}
				},
				"expiresAt": {
					"type": "string"
				},
				"sessionId": {
					"type": "string"
				}
			}
		},
		"model.PaymentMethodConfiguration": {
			"type": "object",
			"properties": {
				"assets": {
					"$ref": "#/definitions/model.PaymentMethodAssets"
				},
				"description": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"type": {
					"$ref": "#/definitions/model.PaymentMethodType"
				}
			}
		},
		"model.PaymentMethodAssets": {
			"type": "object",
			"properties": {
				"urls": {
					"$ref": "#/definitions/model.PaymentMethodAssetUrls"
				}
			}
		},
		"model.PaymentMethodAssetUrls": {
			"type": "object",
			"properties": {
				"logo": {
					"type": "string"
				}
			}
		},
		"model.PaymentMethodType": {
			"type": "string",
			"enum": [
				"invoice",
				"partPayment"
			],
			"x-enum-varnames": [
				"PaymentMethodTypeInvoice",
				"PaymentMethodTypePartPayment"
			]
		},
		"model.PaymentSessionResponse": {
			"type": "object",
			"properties": {
				"authorizationToken": {
					"type": "string"
				},
				"createdAt": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.PaymentCustomerData"
				},
				"expiresAt": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"order": {
					"$ref": "#/definitions/model.PaymentOrderData"
				},
				"orderId": {
					"type": "string"
				},
				"signState": {
					"$ref": "#/definitions/model.PaymentSessionSignState"
				},
				"state": {
					"$ref": "#/definitions/model.PaymentSessionState"
				},
				"storeId": {
					"type": "string"
				},
				"updatedAt": {
					"type": "string"
				}
			}
		},
		"model.PaymentCustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"invoiceChannel": {
					"$ref": "#/definitions/model.SelectedInvoiceChannel"
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.PaymentSelectedPaymentMethod"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				}
			}
		},
		"model.PaymentOrderData": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"locale"
			],
			"properties": {
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"externalSessionId": {
					"type": "string",
					"maxLength": 50
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.PaymentOrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.PaymentSessionSignState": {
			"type": "string",
			"enum": [
				"partSign",
				"fullSign",
				"unauthSign"
			],
			"x-enum-varnames": [
				"PaymentSessionSignStatePartSigned",
				"PaymentSessionSignStateFullSigned",
				"PaymentSessionSignStateUnauthSigned"
			]
		},
		"model.PaymentSessionState": {
			"type": "string",
			"enum": [
				"open",
				"locked",
				"pendingSca",
				"authorized",
				"expired",
				"awaitingSignatory",
				"cancelled"
			],
			"x-enum-varnames": [
				"PaymentSessionStateOpen",
				"PaymentSessionStateLocked",
				"PaymentSessionStatePendingSca",
				"PaymentSessionStateAuthorized",
				"PaymentSessionStateExpired",
				"PaymentSessionStateAwaitingSignatory",
				"PaymentSessionStateCancelled"
			]
		},
		"model.UpdatePaymentSessionRequest": {
			"type": "object",
			"properties": {
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"externalSessionId": {
					"type": "string",
					"maxLength": 50
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.UpdatablePaymentOrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.UpdatablePaymentOrderSettings": {
			"type": "object",
			"properties": {
				"security": {
					"$ref": "#/definitions/model.PaymentOrderSecurity"
				}
			}
		},
		"model.GetSessionsResponse": {
			"type": "object",
			"properties": {
				"lastId": {
					"type": "string"
				},
				"orderSessions": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.SessionSimple"
					}
				}
			}
		},
		"model.SessionSimple": {
			"type": "object",
			"properties": {
				"checkoutUrl": {
					"type": "string"
				},
				"createdAt": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.CustomerDetails"
				},
				"expiresAt": {
					"type": "string"
				},
				"externalSessionId": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"merchantReference": {
					"type": "string"
				},
				"orderId": {
					"type": "string"
				},
				"state": {
					"$ref": "#/definitions/model.SessionState"
				},
				"storeId": {
					"type": "string"
				},
				"totalAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"updatedAt": {
					"type": "string"
				}
			}
		},
		"model.SessionState": {
			"type": "string",
			"enum": [
				"open",
				"locked",
				"pendingSca",
				"authorized",
				"expired",
				"cancelled"
			],
			"x-enum-varnames": [
				"StateOpen",
				"StateLocked",
				"StatePendingSca",
				"StateAuthorized",
				"StateExpired",
				"StateCancelled"
			]
		},
		"model.SessionRequest": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"locale"
			],
			"properties": {
				"autoCapture": {
					"$ref": "#/definitions/model.AutoCapture"
				},
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.InitialCustomerData"
				},
				"externalSessionId": {
					"type": "string",
					"maxLength": 50
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.OrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"source": {
					"enum": [
						"pos",
						"online"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.OrderSource"
						}
					]
				},
				"storeId": {
					"type": "string"
				},
				"tokenize": {
					"type": "boolean"
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.InitialCustomerData": {
			"type": "object",
			"properties": {
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"ssn": {
					"type": "string"
				}
			}
		},
		"model.OrderSettings": {
			"type": "object",
			"properties": {
				"customer": {
					"$ref": "#/definitions/model.CustomerSettings"
				},
				"security": {
					"$ref": "#/definitions/model.OrderSecurity"
				},
				"signatories": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.CustomSignatory"
					}
				},
				"urls": {
					"$ref": "#/definitions/model.MerchantUrls"
				}
			}
		},
		"model.CustomerSettings": {
			"type": "object",
			"properties": {
				"allowShippingAddress": {
					"type": "boolean"
				},
				"showNameFields": {
					"type": "boolean"
				},
				"showShippingAddressContact": {
					"type": "boolean"
				}
			}
		},
		"model.OrderSecurity": {
			"type": "object",
			"properties": {
				"level": {
					"type": "integer",
					"enum": [
						100,
						110,
						120,
						200,
						210,
						220,
						300,
						400
					]
				},
				"requireClientValidation": {
					"type": "boolean"
				},
				"validationSuccessOnTimeout": {
					"type": "boolean"
				}
			}
		},
		"model.CustomSignatory": {
			"type": "object",
			"properties": {
				"email": {
					"type": "string"
				},
				"fullName": {
					"type": "string",
					"maxLength": 200
				}
			}
		},
		"model.MerchantUrls": {
			"type": "object",
			"required": [
				"terms"
			],
			"properties": {
				"confirmation": {
					"type": "string",
					"maxLength": 2000
				},
				"notification": {
					"type": "string",
					"maxLength": 2000
				},
				"privacy": {
					"type": "string",
					"maxLength": 2000
				},
				"terms": {
					"type": "string",
					"maxLength": 2000
				},
				"validate": {
					"type": "string",
					"maxLength": 2000
				}
			}
		},
		"model.OrderSource": {
			"type": "string",
			"enum": [
				"pos",
				"online"
			],
			"x-enum-varnames": [
				"Pos",
				"Online"
			]
		},
		"model.SessionCreatedResponse": {
			"type": "object",
			"properties": {
				"checkoutUrl": {
					"type": "string"
				},
				"expiresAt": {
					"type": "string"
				},
				"orderId": {
					"type": "string"
				},
				"sessionId": {
					"type": "string"
				}
			}
		},
		"model.SessionResponse": {
			"type": "object",
			"properties": {
				"createdAt": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/model.CustomerData"
				},
				"expiresAt": {
					"type": "string"
				},
				"id": {
					"type": "string"
				},
				"merchantId": {
					"type": "string"
				},
				"order": {
					"$ref": "#/definitions/model.OrderData"
				},
				"orderId": {
					"type": "string"
				},
				"signState": {
					"$ref": "#/definitions/model.SignState"
				},
				"state": {
					"$ref": "#/definitions/model.SessionState"
				},
				"storeId": {
					"type": "string"
				},
				"updatedAt": {
					"type": "string"
				}
			}
		},
		"model.CustomerData": {
			"type": "object",
			"properties": {
				"billingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"companyId": {
					"type": "string"
				},
				"country": {
					"type": "string"
				},
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"invoiceChannel": {
					"$ref": "#/definitions/model.SelectedInvoiceChannel"
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"paymentMethod": {
					"$ref": "#/definitions/model.SelectedPaymentMethod"
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"settings": {
					"$ref": "#/definitions/model.CustomerDataSettings"
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"ssn": {
					"type": "string"
				}
			}
		},
		"model.CustomerDataSettings": {
			"type": "object",
			"properties": {
				"save": {
					"type": "boolean"
				}
			}
		},
		"model.OrderData": {
			"type": "object",
			"required": [
				"country",
				"currency",
				"locale"
			],
			"properties": {
				"autoCapture": {
					"$ref": "#/definitions/model.AutoCapture"
				},
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"externalSessionId": {
					"type": "string",
					"maxLength": 50
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.OrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"source": {
					"enum": [
						"pos",
						"online"
					],
					"allOf": [
						{
							"$ref": "#/definitions/model.OrderSource"
						}
					]
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"model.SignState": {
			"type": "string",
			"enum": [
				"unsigned",
				"partSign",
				"fullSign"
			],
			"x-enum-varnames": [
				"SignStateUnSigned",
				"SignStatePartSigned",
				"SignStateFullSigned"
			]
		},
		"model.UpdateSessionRequest": {
			"type": "object",
			"required": [
				"totalOrderAmount",
				"totalOrderAmountExclVat",
				"totalOrderVatAmount"
			],
			"properties": {
				"country": {
					"type": "string"
				},
				"currency": {
					"type": "string"
				},
				"customer": {
					"$ref": "#/definitions/only_available_in_locked_mode"
				},
				"locale": {
					"type": "string"
				},
				"metadata": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"orderLines": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.OrderLine"
					}
				},
				"reference": {
					"type": "string",
					"maxLength": 50
				},
				"settings": {
					"$ref": "#/definitions/model.UpdatableOrderSettings"
				},
				"settlementReference": {
					"type": "string",
					"maxLength": 50
				},
				"tokenize": {
					"type": "boolean"
				},
				"totalOrderAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderAmountExclVat": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				},
				"totalOrderVatAmount": {
					"type": "integer",
					"maximum": 1000000000,
					"minimum": 0
				}
			}
		},
		"only_available_in_locked_mode": {
			"type": "object",
			"properties": {
				"email": {
					"type": "string"
				},
				"firstName": {
					"type": "string",
					"maxLength": 200
				},
				"lastName": {
					"type": "string",
					"maxLength": 200
				},
				"phone": {
					"type": "string"
				},
				"reference1": {
					"type": "string",
					"maxLength": 200
				},
				"reference2": {
					"type": "string",
					"maxLength": 200
				},
				"shippingAddress": {
					"$ref": "#/definitions/model.CompanyAddress"
				},
				"ssn": {
					"type": "string"
				}
			}
		},
		"model.UpdatableOrderSettings": {
			"type": "object",
			"properties": {
				"security": {
					"$ref": "#/definitions/model.OrderSecurity"
				}
			}
		},
		"model.ReportSettlementsResponse": {
			"type": "object",
			"properties": {
				"lastId": {
					"type": "string"
				},
				"settlements": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.ReportSettlement"
					}
				}
			}
		},
		"model.ReportSettlement": {
			"type": "object",
			"properties": {
				"captureDateMax": {
					"type": "string"
				},
				"captureDateMin": {
					"type": "string"
				},
				"creditAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"creditVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"creditVatBreakdown": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.VatAmount"
					}
				},
				"currency": {
					"type": "string"
				},
				"feeVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"id": {
					"type": "string"
				},
				"invoiceServicePayoutAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"merchantId": {
					"type": "string"
				},
				"monthlyFeeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"netAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"noOfCredits": {
					"type": "integer"
				},
				"noOfInvoiceServicePayouts": {
					"type": "integer"
				},
				"noOfPurchaseFixedFee": {
					"type": "integer"
				},
				"noOfPurchaseVariableFee": {
					"type": "integer"
				},
				"noOfReversals": {
					"type": "integer"
				},
				"noOfSales": {
					"type": "integer"
				},
				"otherChargeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"payoutAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"payoutDate": {
					"type": "string"
				},
				"purchaseFixedFeeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"purchaseVariableFeeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"reference": {
					"type": "string"
				},
				"reversalAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"reversalVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"reversalVatBreakdown": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.VatAmount"
					}
				},
				"saleAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"saleVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"saleVatBreakdown": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.VatAmount"
					}
				},
				"storeId": {
					"type": "string"
				},
				"subtotalAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"subtotalVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"totalCostsAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"totalOtherChargeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"urls": {
					"$ref": "#/definitions/model.ReportSettlementUrls"
				},
				"yearlyFeeAmount": {
					"$ref": "#/definitions/model.Money"
				}
			}
		},
		"model.VatAmount": {
			"type": "object",
			"properties": {
				"amount": {
					"$ref": "#/definitions/model.Money"
				},
				"vat": {
					"type": "integer"
				}
			}
		},
		"model.ReportSettlementUrls": {
			"type": "object",
			"properties": {
				"csv": {
					"type": "string"
				},
				"pdf": {
					"type": "string"
				}
			}
		},
		"model.ReportSettlementTxResponse": {
			"type": "object",
			"properties": {
				"lastId": {
					"type": "string"
				},
				"settlementId": {
					"type": "string"
				},
				"tx": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.ReportSettlementTx"
					}
				}
			}
		},
		"model.ReportSettlementTx": {
			"type": "object",
			"properties": {
				"accountId": {
					"type": "string"
				},
				"amount": {
					"$ref": "#/definitions/model.Money"
				},
				"capturedAt": {
					"type": "string"
				},
				"feeVatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"fixedFeeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"invoiceCreatedAt": {
					"type": "string"
				},
				"invoiceNumber": {
					"type": "string"
				},
				"merchantReference": {
					"type": "string"
				},
				"payoutAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"storeId": {
					"type": "string"
				},
				"txType": {
					"$ref": "#/definitions/model.SettlementTxType"
				},
				"variableFeeAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"vatAmount": {
					"$ref": "#/definitions/model.Money"
				},
				"vatBreakdown": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/model.VatAmount"
					}
				}
			}
		},
		"model.SettlementTxType": {
			"type": "string",
			"enum": [
				"sale",
				"credit",
				"reversal",
				"invoiceServicePayout",
				"otherCharge",
				"yearlyFee",
				"monthlyFee",
				"other"
			],
			"x-enum-varnames": [
				"SettlementTxTypeSale",
				"SettlementTxTypeCredit",
				"SettlementTxTypeReversal",
				"SettlementTxTypeInvoiceServicePayout",
				"SettlementTxTypeOtherCharge",
				"SettlementTxTypeYearlyFee",
				"SettlementTxTypeMonthlyFee",
				"SettlementTxTypeOther"
			]
		}
	},
	"securityDefinitions": {
		"OAuth2": {
			"type": "oauth2",
			"flow": "application",
			"tokenUrl": "https://auth.sandbox.ledyer.com/oauth/token",
			"scopes": {
				"read": "",
				"write": "(default)"
			}
		}
	},
	"x-tagGroups": [
		{
			"name": "PUBLIC",
			"tags": [
				"Order Management API",
				"Settlement API",
				"Checkout API",
				"Payments API",
				"Headless API"
			]
		}
	]
}
