# Zaprite API - **OpenAPI Version:** `3.1.0` - **API Version:** `1.0` Build checkout and order flows on Zaprite with a single API for Orders, Contacts, and Webhooks. > The Zaprite API is designed for hosted checkout flows: create an order, send your customer to `checkoutUrl`, and use webhook events to keep your own product in sync. Using TypeScript? Start with our [official JS SDK](https://www.npmjs.com/package/@zaprite/api) for typed request helpers and a faster integration. ## Start Here 1. Generate an API key in your [Zaprite API settings](https://app.zaprite.com/org/default/settings/api) 2. Send it as a Bearer token in the `Authorization` header 3. Create an order with pricing, customer, and redirect details 4. Redirect your customer to the returned `checkoutUrl` 5. Subscribe to webhook events so your system stays updated after payment ## Base URL All public API endpoints are served from: ```text https://api.zaprite.com ``` Resource paths are versioned under `/v1`, such as `/v1/orders` and `/v1/webhooks`. ## Authentication Authenticated endpoints expect a Bearer token in the `Authorization` header. Each API key is scoped to a single Zaprite organization, so requests automatically operate on that organization's data. ```http Authorization: Bearer YOUR_ZAPRITE_API_KEY ``` You can create, rotate, and revoke keys in your [Zaprite API settings](https://app.zaprite.com/org/default/settings/api). ## Errors Zaprite uses standard HTTP status codes and returns a consistent error envelope: ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [ { "message": "Expected string, received number" } ] } ``` The `code` field is the machine-readable error code, the `message` field is the human-readable summary, and the optional `issues` array is most useful for validation failures where a request field is malformed or missing. In practice, the most common API failures are: - `BAD_REQUEST` when request input is invalid - `UNAUTHORIZED` when the API key is missing, invalid, the organization is suspended, or the organization no longer has access to the action - `FORBIDDEN` when access to a resource is denied - `NOT_FOUND` when the resource does not exist for your organization - `INTERNAL_SERVER_ERROR` when Zaprite encounters an unexpected failure When handling errors, log the HTTP status code, `code`, and `message`. For `BAD_REQUEST` responses, inspect `issues` to display field-level feedback or to debug invalid request payloads quickly. ## Pagination List endpoints return a consistent paginated envelope with up to 100 results per page. Use the `page` parameter to move through the collection and inspect the `meta` object to understand how many results remain. ```json { "items": [], "meta": { "itemsCount": 42, "pagesCount": 1, "page": 1, "perPage": 100 } } ``` ## Metadata Orders support custom metadata so you can attach your own internal identifiers or workflow context to a payment flow. Metadata is returned on create, retrieve, and list responses for orders, which makes it a good place to store reconciliation fields from your own system. ## Testing and Sandbox Use a sandbox organization to test your integration without moving real money. Sandbox organizations let you validate order creation, checkout redirects, and webhook flows before you point production traffic at Zaprite. If you need a safe starting point, follow our [sandbox testing guide](https://help.zaprite.com/en/articles/9875022-how-to-test-payments-for-an-api-integration). ## Webhooks Webhooks let Zaprite notify your system when order activity changes. A common production flow is: create an order, redirect the customer to checkout, then rely on webhook deliveries to confirm downstream fulfillment or status updates in your own system. If your endpoint returns a non-`200` response, Zaprite retries the delivery multiple times before abandoning it. Make sure your webhook handler is fast, logs failures clearly, and can safely process the same business event more than once. ## Developer Resources - **OpenAPI JSON** - [View the raw OpenAPI document](https://api.zaprite.com/openapi.json) for code generation and tooling - **LLM Docs** - [Read the Markdown version of these docs](https://api.zaprite.com/llms.txt) for AI workflows and plain-text reference - **Official JS SDK** - [@zaprite/api](https://www.npmjs.com/package/@zaprite/api) for Node.js and browser integrations - **Support** - Questions about the API? [Contact us](https://help.zaprite.com/) ## Servers - **URL:** `https://api.zaprite.com` ## Operations ### Create Order - **Method:** `POST` - **Path:** `/v1/orders` - **Tags:** Orders Create a Zaprite Order. You can then send your customer to `checkoutUrl` to pay that Order. Note that Orders are not visible on your Zaprite dashboard until they have received a payment.\ 💡 To test your integration, you can create [Zaprite sandbox Organizations](https://help.zaprite.com/en/articles/9875022-how-to-test-payments-for-an-api-integration) that let you complete Orders with no real payment.\ \ You can also create an invoice along with the order by providing the `invoice` field with line items. In this case, the order amount will be calculated from the invoice line items. #### Request Body ##### Content-Type: application/json - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`allowSavePaymentProfile`** `boolean` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`amount`** `integer` — Amount denominated in currency smallest unit (e.g., cents for USD, satoshis for BTC). Example: \`100\` for $1.00 USD. Optional only if invoice is provided, in which case the amount will be calculated from invoice line items and amount will be ignored if provided. - **`contactId`** `string` — Optionally, you can associate the Order with one of your Zaprite contacts. - **`customCheckoutId`** `string` — If you want a custom checkout for specific orders, you can configure a new checkout at https\://app.zaprite.com/org/default/settings/api - **`customerData`** `object` - **`email`** `string` — If set, a payment receipt will be sent to this email upon payment. - **`name`** `string` - **`customerFields`** `object` — Configure fields displayed on checkout page to collect customer information. Collected information will be stored in the \`Order.customerData\` field. - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Collect the customer full postal address - **`company`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Collect the customer company - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Collect the customer email - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Collect the customer name - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Let the customer add a free-text note - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` — Collect the customer phone number - **`disablePaymentNotifs`** `boolean` — Whether to disable payment notifications to organization admins after successful payment. Defaults to false. - **`expiresAt`** `string`, format: `date-time` — ISO 8601 datetime when this order expires. After this time, the order cannot be paid unless a payment is already in progress. - **`externalUniqId`** `string` — Optionally, you can store your own unique ID for this order. This can be useful for reconciling payments with your own systems. - **`invoice`** `object` — Optional invoice data. If provided, an invoice will be created for this order, and the order amount will be calculated from invoice line items. You must provide a \`contactId\` when creating an invoice. - **`lineItems` (required)** `array` — Line items for the invoice **Items:** - **`name` (required)** `string` — Name of the line item - **`unitPrice` (required)** `integer` — Price per unit in currency smallest unit (e.g., cents for USD, satoshis for BTC). Can be negative for credits or adjustments. - **`description`** `string` — Optional description of the line item - **`discountAmount`** `integer`, default: `0` — Fixed discount amount in currency smallest unit (e.g., cents for USD, satoshis for BTC) - **`discountRateBips`** `integer`, default: `0` — Discount rate in bips (e.g., 1000 = 10%) - **`quantity`** `number` — Quantity as a decimal number (e.g., 1.5 for one and a half units). Maximum of 2 decimal places allowed. Defaults to 1 if not provided. - **`taxRateBips`** `integer`, default: `0` — Tax rate in bips (e.g., 1000 = 10%) - **`date`** `string` — Invoice date in YYYY-MM-DD format. Defaults to current date - **`daysToPay`** `integer` — Number of days until payment is due. If not provided, the invoice will show "DUE ON RECEIPT" - **`footerNote`** `string` — Optional note to display at the bottom of the invoice - **`number`** `string` — Optional invoice number. If not provided, one will be generated - **`purchaseOrderNumber`** `string` — Optional purchase order number - **`title`** `string` — Optional title for the invoice - **`label`** `string` — Will be shown on the checkout page and in Bitcoin on-chain transaction labels. - **`metadata`** `object` — Custom metadata for this order. Limited to 50 key-value pairs. Keys must be strings with a maximum length of 255 characters. Values must be strings with a maximum length of 1000 characters. - **`redirectIfPending`** `boolean` — If true, the customer will be redirected to \`redirectUrl\` even if the order is still pending (ie. Bitcoin transaction is unconfirmed). - **`redirectUrl`** `string`, format: `uri` — Redirect your customer to this URL after they have paid for the order. - **`sendReceiptToCustomer`** `boolean`, default: `true` — Whether to send a receipt email to the customer after successful payment. Defaults to true. - **`tags`** `array` — Add arbitrary tags to easily group and filter Orders in your reports. You can add up to 10 tags, each with a maximum length of 32 characters. **Items:** `string` **Example:** ```json { "amount": 0, "currency": "USD", "externalUniqId": "", "redirectUrl": "", "redirectIfPending": true, "expiresAt": "", "label": "", "customCheckoutId": "", "contactId": "", "sendReceiptToCustomer": true, "disablePaymentNotifs": true, "customerData": { "email": "", "name": "" }, "metadata": { "additionalProperty": "" }, "tags": [ "" ], "invoice": { "title": "", "number": "", "date": "", "daysToPay": 0, "purchaseOrderNumber": "", "footerNote": "", "lineItems": [ { "name": "", "description": "", "quantity": 1, "unitPrice": -9007199254740991, "taxRateBips": 0, "discountRateBips": 0, "discountAmount": 0 } ] }, "allowSavePaymentProfile": true, "customerFields": { "email": "REQUIRED", "name": "REQUIRED", "address": "REQUIRED", "phone": "REQUIRED", "company": "REQUIRED", "note": "REQUIRED" } } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`allowSavePaymentProfile` (required)** `boolean`, default: `false` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`checkoutUrl` (required)** `string`, format: `uri` — Send your customer to this URL to complete the payment - **`contact` (required)** `object` - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`customCheckoutId` (required)** `object` - **`customerData` (required)** `object` — Customer data collected on payment links if you enabled customer fields. Custom field values are included as additional keys. - **`address` (required)** `object` - **`company` (required)** `object` - **`email` (required)** `object` - **`name` (required)** `object` - **`note` (required)** `object` - **`phone` (required)** `object` - **`customerFields` (required)** `object` — Configuration for fields displayed on checkout page to collect customer data - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`eventTickets` (required)** `array`, default: `[]` — Event tickets issued for this order (empty if none). **Items:** - **`id` (required)** `string` - **`paymentLinkItem` (required)** `object` - **`id` (required)** `string` - **`title` (required)** `object` - **`expiresAt` (required)** `object` — Date in ISO 8601 format when this order expires. After this time, the order cannot be paid. - **`externalUniqId` (required)** `object` - **`id` (required)** `string` - **`invoice` (required)** `object` — Set only if the order is for a Zaprite invoice (\`orderType="invoice"\`), \`null\` otherwise - **`label` (required)** `object` - **`metadata` (required)** `object`, default: `{}` — Custom metadata for this order - **`orderItems` (required)** `array` — Order items for this order. Empty if none. **Items:** - **`id` (required)** `string` - **`label` (required)** `object` - **`paymentLinkItem` (required)** `object` - **`quantity` (required)** `integer` - **`orderType` (required)** `string`, possible values: `"invoice", "paymentLink", "pos", "event", "wooCommerce", "paymentRequest", "other"` - **`orgId` (required)** `string` — Id of the Zaprite organization that created this order - **`paidAt` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z"). \`null\` until the order is paid. - **`paymentLink` (required)** `object` — Set only if the order was created from a Payment Link (\`orderType="paymentLink"\`), \`null\` otherwise - **`receiptPdfUrl` (required)** `object` — URL to download the Order receipt PDF. \`null\` until the order is paid. - **`redirectUrl` (required)** `object` - **`status` (required)** `string`, possible values: `"PENDING", "PROCESSING", "PAID", "OVERPAID", "UNDERPAID", "COMPLETE"` — \`PENDING\`: The order is pending payment\
\`PROCESSING\`: The order received a payment but the transaction is still pending (ie. an on-chain transaction with 0 conf or manual bank transfer awaiting manual confirmation)\
\`PAID\`: The order was paid but it requires manual fulfillment to be flagged as \`COMPLETE\`\
\`COMPLETE\`: The order was paid and is complete\
\`OVERPAID\`: The order received a payment that was more than the total amount\
\`UNDERPAID\`: The order received a payment that was less than the total amount - **`tags` (required)** `array` — Custom tags for this order **Items:** `string` - **`totalAmount` (required)** `integer` — Total amount to be paid by the customer in currency smallest unit (e.g. cents or sats) - **`transactions` (required)** `array` — All transactions this Order received **Items:** - **`accountingCurrency` (required)** `object` — The is the currency configured for your Organization - **`amount` (required)** `integer` — Transaction amount in currency smallest unit (e.g. cents or sats) - **`amountInAccountingCurrency` (required)** `object` — Transaction amount denominated in accounting currency and in smallest unit (e.g. cents or sats) - **`amountInOrderCurrency` (required)** `object` — Transaction amount denominated in the currency of the Order and in smallest unit (e.g. cents or sats) - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`date` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z") - **`discountsInOrderCurrency` (required)** `array` — List premiums and discounts applied to this transaction. Note: The amount retained as payment for the Order is \`amountInOrderCurrency + sum(discountsInChargeCurrency.amount)\` **Items:** - **`amountOff` (required)** `integer` — Amount of the discount denominated in \`orderCurrency\` and in smallest unit (e.g cents or sats). Negative value means a premium was applied. - **`paymentType` (required)** `string`, possible values: `"FIAT", "BITCOIN", "LIGHTNING", "STABLECOIN"` — Type of payments this discount applies to - **`rateBipsOff` (required)** `integer` — Rate of the discount in bips (e.g. 1234 for 12.34%). Negative value means a premium was applied. - **`externalRef` (required)** `object` — External reference for the transaction. (e.g. Bitcoin txId, Stripe transaction ID...) - **`method` (required)** `string`, possible values: `"BITCOIN", "LIQUID", "LIGHTNING", "BANK", "CARD", "CASH", "CHECK", "GIFTCARD", "COUPON", "APPLEPAY", "GOOGLEPAY", "CASHAPP_PAY", "INTERAC", "ACH", "SEPA", "UNKNOWN", "WIRE_TRANSFER", "VENMO", "PAYPAL", "NO_CHARGE", "TETHER", "USDCIRCLE"` - **`orderCurrency` (required)** `object` — Currency of the Order this transaction is paying for. For example, when paying an USD invoice in BTC, transaction \`currency\` would be USD and \`orderCurrency\` USD. - **`status` (required)** `string`, possible values: `"PENDING", "CONFIRMED", "CANCELED"` - **`id`** `string` **Example:** ```json { "id": "", "orgId": "", "orderType": "invoice", "totalAmount": -9007199254740991, "currency": "USD", "externalUniqId": "", "status": "PENDING", "paidAt": "", "expiresAt": "", "redirectUrl": "", "label": "", "checkoutUrl": "", "receiptPdfUrl": "", "customCheckoutId": "", "contact": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "invoice": { "id": "", "number": "", "title": "", "orgId": "", "status": "DRAFT", "footerNote": "", "daysToPay": -9007199254740991, "date": "", "purchaseOrderNumber": "", "hideOrgAddress": true, "hideOrgEmail": true, "hideOrgName": true, "sentAt": "", "publicUrl": "", "customer": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "lineItems": [ { "id": "", "name": "", "description": "", "unitPrice": -9007199254740991, "quantity": 1, "taxRateBips": -9007199254740991, "taxAmount": -9007199254740991, "discountRateBips": -9007199254740991, "discountAmount": -9007199254740991 } ] }, "paymentLink": { "id": "", "title": "" }, "transactions": [ { "id": "", "date": null, "amount": -9007199254740991, "currency": "USD", "amountInOrderCurrency": -9007199254740991, "discountsInOrderCurrency": [ { "amountOff": -9007199254740991, "rateBipsOff": -9007199254740991, "paymentType": "FIAT" } ], "orderCurrency": "USD", "accountingCurrency": "USD", "amountInAccountingCurrency": -9007199254740991, "method": "BITCOIN", "externalRef": "", "status": "PENDING" } ], "customerData": { "email": "", "name": "", "phone": "", "address": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "note": "", "company": "", "additionalProperty": "anything" }, "customerFields": { "address": "REQUIRED", "email": "REQUIRED", "name": "REQUIRED", "phone": "REQUIRED", "note": "REQUIRED" }, "metadata": {}, "tags": [ "" ], "allowSavePaymentProfile": false, "eventTickets": [], "orderItems": [ { "id": "", "label": "", "quantity": -9007199254740991, "paymentLinkItem": { "id": "", "title": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### List Orders - **Method:** `GET` - **Path:** `/v1/orders` - **Tags:** Orders Retrieve a paginated list of orders with support for full-text search and filtering by date, status, currency, or contact. Returns up to 100 results per page. **Note:** To reduce noise, `PENDING` orders are excluded by default. To view them, explicitly set `includePending=true` or filter by a specific `status` (which overrides this default). #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`items` (required)** `array` **Items:** - **`allowSavePaymentProfile` (required)** `boolean`, default: `false` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`checkoutUrl` (required)** `string`, format: `uri` — Send your customer to this URL to complete the payment - **`contact` (required)** `object` - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`customCheckoutId` (required)** `object` - **`customerData` (required)** `object` — Customer data collected on payment links if you enabled customer fields. Custom field values are included as additional keys. - **`address` (required)** `object` - **`company` (required)** `object` - **`email` (required)** `object` - **`name` (required)** `object` - **`note` (required)** `object` - **`phone` (required)** `object` - **`customerFields` (required)** `object` — Configuration for fields displayed on checkout page to collect customer data - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`eventTickets` (required)** `array`, default: `[]` — Event tickets issued for this order (empty if none). **Items:** - **`id` (required)** `string` - **`paymentLinkItem` (required)** `object` - **`id` (required)** `string` - **`title` (required)** `object` - **`expiresAt` (required)** `object` — Date in ISO 8601 format when this order expires. After this time, the order cannot be paid. - **`externalUniqId` (required)** `object` - **`id` (required)** `string` - **`invoice` (required)** `object` — Set only if the order is for a Zaprite invoice (\`orderType="invoice"\`), \`null\` otherwise - **`label` (required)** `object` - **`metadata` (required)** `object`, default: `{}` — Custom metadata for this order - **`orderItems` (required)** `array` — Order items for this order. Empty if none. **Items:** - **`id` (required)** `string` - **`label` (required)** `object` - **`paymentLinkItem` (required)** `object` - **`quantity` (required)** `integer` - **`orderType` (required)** `string`, possible values: `"invoice", "paymentLink", "pos", "event", "wooCommerce", "paymentRequest", "other"` - **`orgId` (required)** `string` — Id of the Zaprite organization that created this order - **`paidAt` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z"). \`null\` until the order is paid. - **`paymentLink` (required)** `object` — Set only if the order was created from a Payment Link (\`orderType="paymentLink"\`), \`null\` otherwise - **`receiptPdfUrl` (required)** `object` — URL to download the Order receipt PDF. \`null\` until the order is paid. - **`redirectUrl` (required)** `object` - **`status` (required)** `string`, possible values: `"PENDING", "PROCESSING", "PAID", "OVERPAID", "UNDERPAID", "COMPLETE"` — \`PENDING\`: The order is pending payment\
\`PROCESSING\`: The order received a payment but the transaction is still pending (ie. an on-chain transaction with 0 conf or manual bank transfer awaiting manual confirmation)\
\`PAID\`: The order was paid but it requires manual fulfillment to be flagged as \`COMPLETE\`\
\`COMPLETE\`: The order was paid and is complete\
\`OVERPAID\`: The order received a payment that was more than the total amount\
\`UNDERPAID\`: The order received a payment that was less than the total amount - **`tags` (required)** `array` — Custom tags for this order **Items:** `string` - **`totalAmount` (required)** `integer` — Total amount to be paid by the customer in currency smallest unit (e.g. cents or sats) - **`transactions` (required)** `array` — All transactions this Order received **Items:** - **`accountingCurrency` (required)** `object` — The is the currency configured for your Organization - **`amount` (required)** `integer` — Transaction amount in currency smallest unit (e.g. cents or sats) - **`amountInAccountingCurrency` (required)** `object` — Transaction amount denominated in accounting currency and in smallest unit (e.g. cents or sats) - **`amountInOrderCurrency` (required)** `object` — Transaction amount denominated in the currency of the Order and in smallest unit (e.g. cents or sats) - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`date` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z") - **`discountsInOrderCurrency` (required)** `array` — List premiums and discounts applied to this transaction. Note: The amount retained as payment for the Order is \`amountInOrderCurrency + sum(discountsInChargeCurrency.amount)\` **Items:** - **`amountOff` (required)** `integer` — Amount of the discount denominated in \`orderCurrency\` and in smallest unit (e.g cents or sats). Negative value means a premium was applied. - **`paymentType` (required)** `string`, possible values: `"FIAT", "BITCOIN", "LIGHTNING", "STABLECOIN"` — Type of payments this discount applies to - **`rateBipsOff` (required)** `integer` — Rate of the discount in bips (e.g. 1234 for 12.34%). Negative value means a premium was applied. - **`externalRef` (required)** `object` — External reference for the transaction. (e.g. Bitcoin txId, Stripe transaction ID...) - **`method` (required)** `string`, possible values: `"BITCOIN", "LIQUID", "LIGHTNING", "BANK", "CARD", "CASH", "CHECK", "GIFTCARD", "COUPON", "APPLEPAY", "GOOGLEPAY", "CASHAPP_PAY", "INTERAC", "ACH", "SEPA", "UNKNOWN", "WIRE_TRANSFER", "VENMO", "PAYPAL", "NO_CHARGE", "TETHER", "USDCIRCLE"` - **`orderCurrency` (required)** `object` — Currency of the Order this transaction is paying for. For example, when paying an USD invoice in BTC, transaction \`currency\` would be USD and \`orderCurrency\` USD. - **`status` (required)** `string`, possible values: `"PENDING", "CONFIRMED", "CANCELED"` - **`id`** `string` - **`meta` (required)** `object` — Pagination metadata - **`itemsCount` (required)** `number` - **`page` (required)** `number` - **`pagesCount` (required)** `number` - **`perPage` (required)** `number` **Example:** ```json { "items": [ { "id": "", "orgId": "", "orderType": "invoice", "totalAmount": -9007199254740991, "currency": "USD", "externalUniqId": "", "status": "PENDING", "paidAt": "", "expiresAt": "", "redirectUrl": "", "label": "", "checkoutUrl": "", "receiptPdfUrl": "", "customCheckoutId": "", "contact": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "invoice": { "id": "", "number": "", "title": "", "orgId": "", "status": "DRAFT", "footerNote": "", "daysToPay": -9007199254740991, "date": "", "purchaseOrderNumber": "", "hideOrgAddress": true, "hideOrgEmail": true, "hideOrgName": true, "sentAt": "", "publicUrl": "", "customer": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "[Max Depth Exceeded]", "externalUniqId": "[Max Depth Exceeded]" } } ] }, "lineItems": [ { "id": "", "name": "", "description": "", "unitPrice": -9007199254740991, "quantity": 1, "taxRateBips": -9007199254740991, "taxAmount": -9007199254740991, "discountRateBips": -9007199254740991, "discountAmount": -9007199254740991 } ] }, "paymentLink": { "id": "", "title": "" }, "transactions": [ { "id": "", "date": null, "amount": -9007199254740991, "currency": "USD", "amountInOrderCurrency": -9007199254740991, "discountsInOrderCurrency": [ { "amountOff": -9007199254740991, "rateBipsOff": -9007199254740991, "paymentType": "FIAT" } ], "orderCurrency": "USD", "accountingCurrency": "USD", "amountInAccountingCurrency": -9007199254740991, "method": "BITCOIN", "externalRef": "", "status": "PENDING" } ], "customerData": { "email": "", "name": "", "phone": "", "address": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "note": "", "company": "", "additionalProperty": "anything" }, "customerFields": { "address": "REQUIRED", "email": "REQUIRED", "name": "REQUIRED", "phone": "REQUIRED", "note": "REQUIRED" }, "metadata": {}, "tags": [ "" ], "allowSavePaymentProfile": false, "eventTickets": [], "orderItems": [ { "id": "", "label": "", "quantity": -9007199254740991, "paymentLinkItem": { "id": "", "title": "" } } ] } ], "meta": { "itemsCount": 1, "pagesCount": 1, "page": 1, "perPage": 1 } } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Edit Order - **Method:** `PATCH` - **Path:** `/v1/orders/{id}` - **Tags:** Orders Update order status and expiration. Status updates are equivalent to using "Mark as Complete" in the Zaprite dashboard. When setting expiration to the past, new payments are prevented but in-flight payments will still be processed. #### Request Body ##### Content-Type: application/json - **`expiresAt`** `object` — ISO 8601 datetime when this order expires. Set to anytime in past to immediately expire the order which prevents new payments (in-flight payments will still be processed). Set to null to remove expiration. - **`status`** `string`, possible values: `"COMPLETE", "PAID"` — New status for the order **Example:** ```json { "status": "COMPLETE", "expiresAt": "" } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`allowSavePaymentProfile` (required)** `boolean`, default: `false` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`checkoutUrl` (required)** `string`, format: `uri` — Send your customer to this URL to complete the payment - **`contact` (required)** `object` - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`customCheckoutId` (required)** `object` - **`customerData` (required)** `object` — Customer data collected on payment links if you enabled customer fields. Custom field values are included as additional keys. - **`address` (required)** `object` - **`company` (required)** `object` - **`email` (required)** `object` - **`name` (required)** `object` - **`note` (required)** `object` - **`phone` (required)** `object` - **`customerFields` (required)** `object` — Configuration for fields displayed on checkout page to collect customer data - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`eventTickets` (required)** `array`, default: `[]` — Event tickets issued for this order (empty if none). **Items:** - **`id` (required)** `string` - **`paymentLinkItem` (required)** `object` - **`id` (required)** `string` - **`title` (required)** `object` - **`expiresAt` (required)** `object` — Date in ISO 8601 format when this order expires. After this time, the order cannot be paid. - **`externalUniqId` (required)** `object` - **`id` (required)** `string` - **`invoice` (required)** `object` — Set only if the order is for a Zaprite invoice (\`orderType="invoice"\`), \`null\` otherwise - **`label` (required)** `object` - **`metadata` (required)** `object`, default: `{}` — Custom metadata for this order - **`orderItems` (required)** `array` — Order items for this order. Empty if none. **Items:** - **`id` (required)** `string` - **`label` (required)** `object` - **`paymentLinkItem` (required)** `object` - **`quantity` (required)** `integer` - **`orderType` (required)** `string`, possible values: `"invoice", "paymentLink", "pos", "event", "wooCommerce", "paymentRequest", "other"` - **`orgId` (required)** `string` — Id of the Zaprite organization that created this order - **`paidAt` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z"). \`null\` until the order is paid. - **`paymentLink` (required)** `object` — Set only if the order was created from a Payment Link (\`orderType="paymentLink"\`), \`null\` otherwise - **`receiptPdfUrl` (required)** `object` — URL to download the Order receipt PDF. \`null\` until the order is paid. - **`redirectUrl` (required)** `object` - **`status` (required)** `string`, possible values: `"PENDING", "PROCESSING", "PAID", "OVERPAID", "UNDERPAID", "COMPLETE"` — \`PENDING\`: The order is pending payment\
\`PROCESSING\`: The order received a payment but the transaction is still pending (ie. an on-chain transaction with 0 conf or manual bank transfer awaiting manual confirmation)\
\`PAID\`: The order was paid but it requires manual fulfillment to be flagged as \`COMPLETE\`\
\`COMPLETE\`: The order was paid and is complete\
\`OVERPAID\`: The order received a payment that was more than the total amount\
\`UNDERPAID\`: The order received a payment that was less than the total amount - **`tags` (required)** `array` — Custom tags for this order **Items:** `string` - **`totalAmount` (required)** `integer` — Total amount to be paid by the customer in currency smallest unit (e.g. cents or sats) - **`transactions` (required)** `array` — All transactions this Order received **Items:** - **`accountingCurrency` (required)** `object` — The is the currency configured for your Organization - **`amount` (required)** `integer` — Transaction amount in currency smallest unit (e.g. cents or sats) - **`amountInAccountingCurrency` (required)** `object` — Transaction amount denominated in accounting currency and in smallest unit (e.g. cents or sats) - **`amountInOrderCurrency` (required)** `object` — Transaction amount denominated in the currency of the Order and in smallest unit (e.g. cents or sats) - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`date` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z") - **`discountsInOrderCurrency` (required)** `array` — List premiums and discounts applied to this transaction. Note: The amount retained as payment for the Order is \`amountInOrderCurrency + sum(discountsInChargeCurrency.amount)\` **Items:** - **`amountOff` (required)** `integer` — Amount of the discount denominated in \`orderCurrency\` and in smallest unit (e.g cents or sats). Negative value means a premium was applied. - **`paymentType` (required)** `string`, possible values: `"FIAT", "BITCOIN", "LIGHTNING", "STABLECOIN"` — Type of payments this discount applies to - **`rateBipsOff` (required)** `integer` — Rate of the discount in bips (e.g. 1234 for 12.34%). Negative value means a premium was applied. - **`externalRef` (required)** `object` — External reference for the transaction. (e.g. Bitcoin txId, Stripe transaction ID...) - **`method` (required)** `string`, possible values: `"BITCOIN", "LIQUID", "LIGHTNING", "BANK", "CARD", "CASH", "CHECK", "GIFTCARD", "COUPON", "APPLEPAY", "GOOGLEPAY", "CASHAPP_PAY", "INTERAC", "ACH", "SEPA", "UNKNOWN", "WIRE_TRANSFER", "VENMO", "PAYPAL", "NO_CHARGE", "TETHER", "USDCIRCLE"` - **`orderCurrency` (required)** `object` — Currency of the Order this transaction is paying for. For example, when paying an USD invoice in BTC, transaction \`currency\` would be USD and \`orderCurrency\` USD. - **`status` (required)** `string`, possible values: `"PENDING", "CONFIRMED", "CANCELED"` - **`id`** `string` **Example:** ```json { "id": "", "orgId": "", "orderType": "invoice", "totalAmount": -9007199254740991, "currency": "USD", "externalUniqId": "", "status": "PENDING", "paidAt": "", "expiresAt": "", "redirectUrl": "", "label": "", "checkoutUrl": "", "receiptPdfUrl": "", "customCheckoutId": "", "contact": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "invoice": { "id": "", "number": "", "title": "", "orgId": "", "status": "DRAFT", "footerNote": "", "daysToPay": -9007199254740991, "date": "", "purchaseOrderNumber": "", "hideOrgAddress": true, "hideOrgEmail": true, "hideOrgName": true, "sentAt": "", "publicUrl": "", "customer": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "lineItems": [ { "id": "", "name": "", "description": "", "unitPrice": -9007199254740991, "quantity": 1, "taxRateBips": -9007199254740991, "taxAmount": -9007199254740991, "discountRateBips": -9007199254740991, "discountAmount": -9007199254740991 } ] }, "paymentLink": { "id": "", "title": "" }, "transactions": [ { "id": "", "date": null, "amount": -9007199254740991, "currency": "USD", "amountInOrderCurrency": -9007199254740991, "discountsInOrderCurrency": [ { "amountOff": -9007199254740991, "rateBipsOff": -9007199254740991, "paymentType": "FIAT" } ], "orderCurrency": "USD", "accountingCurrency": "USD", "amountInAccountingCurrency": -9007199254740991, "method": "BITCOIN", "externalRef": "", "status": "PENDING" } ], "customerData": { "email": "", "name": "", "phone": "", "address": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "note": "", "company": "", "additionalProperty": "anything" }, "customerFields": { "address": "REQUIRED", "email": "REQUIRED", "name": "REQUIRED", "phone": "REQUIRED", "note": "REQUIRED" }, "metadata": {}, "tags": [ "" ], "allowSavePaymentProfile": false, "eventTickets": [], "orderItems": [ { "id": "", "label": "", "quantity": -9007199254740991, "paymentLinkItem": { "id": "", "title": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Get Order - **Method:** `GET` - **Path:** `/v1/orders/{id}` - **Tags:** Orders Get an order by either it's Zaprite ID or your own ID (`externalUniqId`) #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`allowSavePaymentProfile` (required)** `boolean`, default: `false` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`checkoutUrl` (required)** `string`, format: `uri` — Send your customer to this URL to complete the payment - **`contact` (required)** `object` - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`customCheckoutId` (required)** `object` - **`customerData` (required)** `object` — Customer data collected on payment links if you enabled customer fields. Custom field values are included as additional keys. - **`address` (required)** `object` - **`company` (required)** `object` - **`email` (required)** `object` - **`name` (required)** `object` - **`note` (required)** `object` - **`phone` (required)** `object` - **`customerFields` (required)** `object` — Configuration for fields displayed on checkout page to collect customer data - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`eventTickets` (required)** `array`, default: `[]` — Event tickets issued for this order (empty if none). **Items:** - **`id` (required)** `string` - **`paymentLinkItem` (required)** `object` - **`id` (required)** `string` - **`title` (required)** `object` - **`expiresAt` (required)** `object` — Date in ISO 8601 format when this order expires. After this time, the order cannot be paid. - **`externalUniqId` (required)** `object` - **`id` (required)** `string` - **`invoice` (required)** `object` — Set only if the order is for a Zaprite invoice (\`orderType="invoice"\`), \`null\` otherwise - **`label` (required)** `object` - **`metadata` (required)** `object`, default: `{}` — Custom metadata for this order - **`orderItems` (required)** `array` — Order items for this order. Empty if none. **Items:** - **`id` (required)** `string` - **`label` (required)** `object` - **`paymentLinkItem` (required)** `object` - **`quantity` (required)** `integer` - **`orderType` (required)** `string`, possible values: `"invoice", "paymentLink", "pos", "event", "wooCommerce", "paymentRequest", "other"` - **`orgId` (required)** `string` — Id of the Zaprite organization that created this order - **`paidAt` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z"). \`null\` until the order is paid. - **`paymentLink` (required)** `object` — Set only if the order was created from a Payment Link (\`orderType="paymentLink"\`), \`null\` otherwise - **`receiptPdfUrl` (required)** `object` — URL to download the Order receipt PDF. \`null\` until the order is paid. - **`redirectUrl` (required)** `object` - **`status` (required)** `string`, possible values: `"PENDING", "PROCESSING", "PAID", "OVERPAID", "UNDERPAID", "COMPLETE"` — \`PENDING\`: The order is pending payment\
\`PROCESSING\`: The order received a payment but the transaction is still pending (ie. an on-chain transaction with 0 conf or manual bank transfer awaiting manual confirmation)\
\`PAID\`: The order was paid but it requires manual fulfillment to be flagged as \`COMPLETE\`\
\`COMPLETE\`: The order was paid and is complete\
\`OVERPAID\`: The order received a payment that was more than the total amount\
\`UNDERPAID\`: The order received a payment that was less than the total amount - **`tags` (required)** `array` — Custom tags for this order **Items:** `string` - **`totalAmount` (required)** `integer` — Total amount to be paid by the customer in currency smallest unit (e.g. cents or sats) - **`transactions` (required)** `array` — All transactions this Order received **Items:** - **`accountingCurrency` (required)** `object` — The is the currency configured for your Organization - **`amount` (required)** `integer` — Transaction amount in currency smallest unit (e.g. cents or sats) - **`amountInAccountingCurrency` (required)** `object` — Transaction amount denominated in accounting currency and in smallest unit (e.g. cents or sats) - **`amountInOrderCurrency` (required)** `object` — Transaction amount denominated in the currency of the Order and in smallest unit (e.g. cents or sats) - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`date` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z") - **`discountsInOrderCurrency` (required)** `array` — List premiums and discounts applied to this transaction. Note: The amount retained as payment for the Order is \`amountInOrderCurrency + sum(discountsInChargeCurrency.amount)\` **Items:** - **`amountOff` (required)** `integer` — Amount of the discount denominated in \`orderCurrency\` and in smallest unit (e.g cents or sats). Negative value means a premium was applied. - **`paymentType` (required)** `string`, possible values: `"FIAT", "BITCOIN", "LIGHTNING", "STABLECOIN"` — Type of payments this discount applies to - **`rateBipsOff` (required)** `integer` — Rate of the discount in bips (e.g. 1234 for 12.34%). Negative value means a premium was applied. - **`externalRef` (required)** `object` — External reference for the transaction. (e.g. Bitcoin txId, Stripe transaction ID...) - **`method` (required)** `string`, possible values: `"BITCOIN", "LIQUID", "LIGHTNING", "BANK", "CARD", "CASH", "CHECK", "GIFTCARD", "COUPON", "APPLEPAY", "GOOGLEPAY", "CASHAPP_PAY", "INTERAC", "ACH", "SEPA", "UNKNOWN", "WIRE_TRANSFER", "VENMO", "PAYPAL", "NO_CHARGE", "TETHER", "USDCIRCLE"` - **`orderCurrency` (required)** `object` — Currency of the Order this transaction is paying for. For example, when paying an USD invoice in BTC, transaction \`currency\` would be USD and \`orderCurrency\` USD. - **`status` (required)** `string`, possible values: `"PENDING", "CONFIRMED", "CANCELED"` - **`id`** `string` **Example:** ```json { "id": "", "orgId": "", "orderType": "invoice", "totalAmount": -9007199254740991, "currency": "USD", "externalUniqId": "", "status": "PENDING", "paidAt": "", "expiresAt": "", "redirectUrl": "", "label": "", "checkoutUrl": "", "receiptPdfUrl": "", "customCheckoutId": "", "contact": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "invoice": { "id": "", "number": "", "title": "", "orgId": "", "status": "DRAFT", "footerNote": "", "daysToPay": -9007199254740991, "date": "", "purchaseOrderNumber": "", "hideOrgAddress": true, "hideOrgEmail": true, "hideOrgName": true, "sentAt": "", "publicUrl": "", "customer": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "lineItems": [ { "id": "", "name": "", "description": "", "unitPrice": -9007199254740991, "quantity": 1, "taxRateBips": -9007199254740991, "taxAmount": -9007199254740991, "discountRateBips": -9007199254740991, "discountAmount": -9007199254740991 } ] }, "paymentLink": { "id": "", "title": "" }, "transactions": [ { "id": "", "date": null, "amount": -9007199254740991, "currency": "USD", "amountInOrderCurrency": -9007199254740991, "discountsInOrderCurrency": [ { "amountOff": -9007199254740991, "rateBipsOff": -9007199254740991, "paymentType": "FIAT" } ], "orderCurrency": "USD", "accountingCurrency": "USD", "amountInAccountingCurrency": -9007199254740991, "method": "BITCOIN", "externalRef": "", "status": "PENDING" } ], "customerData": { "email": "", "name": "", "phone": "", "address": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "note": "", "company": "", "additionalProperty": "anything" }, "customerFields": { "address": "REQUIRED", "email": "REQUIRED", "name": "REQUIRED", "phone": "REQUIRED", "note": "REQUIRED" }, "metadata": {}, "tags": [ "" ], "allowSavePaymentProfile": false, "eventTickets": [], "orderItems": [ { "id": "", "label": "", "quantity": -9007199254740991, "paymentLinkItem": { "id": "", "title": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Pay Order - **Method:** `POST` - **Path:** `/v1/orders/charge` - **Tags:** Orders Pay an Order with a payment profile previously saved by your customer. #### Request Body ##### Content-Type: application/json - **`orderId` (required)** `string` — Zaprite \`id\` or \`externalUniqId\` - **`paymentProfileId` (required)** `string` — You can find this id in \`Contact.paymentProfiles\`. Your Order checkout must enabled the connection for this payment profile. - **`sendReceiptToCustomer` (required)** `boolean` — Required field that must be explicitly set to true or false. If true, will send a receipt email to the customer after successful payment. **Example:** ```json { "orderId": "", "paymentProfileId": "", "sendReceiptToCustomer": true } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`allowSavePaymentProfile` (required)** `boolean`, default: `false` — If true and the selected payment method supports autopay, then the customer will be able to save their payment profile for future payments. - **`checkoutUrl` (required)** `string`, format: `uri` — Send your customer to this URL to complete the payment - **`contact` (required)** `object` - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`customCheckoutId` (required)** `object` - **`customerData` (required)** `object` — Customer data collected on payment links if you enabled customer fields. Custom field values are included as additional keys. - **`address` (required)** `object` - **`company` (required)** `object` - **`email` (required)** `object` - **`name` (required)** `object` - **`note` (required)** `object` - **`phone` (required)** `object` - **`customerFields` (required)** `object` — Configuration for fields displayed on checkout page to collect customer data - **`address`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`email`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`name`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`note`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`phone`** `string`, possible values: `"REQUIRED", "OPTIONAL"` - **`eventTickets` (required)** `array`, default: `[]` — Event tickets issued for this order (empty if none). **Items:** - **`id` (required)** `string` - **`paymentLinkItem` (required)** `object` - **`id` (required)** `string` - **`title` (required)** `object` - **`expiresAt` (required)** `object` — Date in ISO 8601 format when this order expires. After this time, the order cannot be paid. - **`externalUniqId` (required)** `object` - **`id` (required)** `string` - **`invoice` (required)** `object` — Set only if the order is for a Zaprite invoice (\`orderType="invoice"\`), \`null\` otherwise - **`label` (required)** `object` - **`metadata` (required)** `object`, default: `{}` — Custom metadata for this order - **`orderItems` (required)** `array` — Order items for this order. Empty if none. **Items:** - **`id` (required)** `string` - **`label` (required)** `object` - **`paymentLinkItem` (required)** `object` - **`quantity` (required)** `integer` - **`orderType` (required)** `string`, possible values: `"invoice", "paymentLink", "pos", "event", "wooCommerce", "paymentRequest", "other"` - **`orgId` (required)** `string` — Id of the Zaprite organization that created this order - **`paidAt` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z"). \`null\` until the order is paid. - **`paymentLink` (required)** `object` — Set only if the order was created from a Payment Link (\`orderType="paymentLink"\`), \`null\` otherwise - **`receiptPdfUrl` (required)** `object` — URL to download the Order receipt PDF. \`null\` until the order is paid. - **`redirectUrl` (required)** `object` - **`status` (required)** `string`, possible values: `"PENDING", "PROCESSING", "PAID", "OVERPAID", "UNDERPAID", "COMPLETE"` — \`PENDING\`: The order is pending payment\
\`PROCESSING\`: The order received a payment but the transaction is still pending (ie. an on-chain transaction with 0 conf or manual bank transfer awaiting manual confirmation)\
\`PAID\`: The order was paid but it requires manual fulfillment to be flagged as \`COMPLETE\`\
\`COMPLETE\`: The order was paid and is complete\
\`OVERPAID\`: The order received a payment that was more than the total amount\
\`UNDERPAID\`: The order received a payment that was less than the total amount - **`tags` (required)** `array` — Custom tags for this order **Items:** `string` - **`totalAmount` (required)** `integer` — Total amount to be paid by the customer in currency smallest unit (e.g. cents or sats) - **`transactions` (required)** `array` — All transactions this Order received **Items:** - **`accountingCurrency` (required)** `object` — The is the currency configured for your Organization - **`amount` (required)** `integer` — Transaction amount in currency smallest unit (e.g. cents or sats) - **`amountInAccountingCurrency` (required)** `object` — Transaction amount denominated in accounting currency and in smallest unit (e.g. cents or sats) - **`amountInOrderCurrency` (required)** `object` — Transaction amount denominated in the currency of the Order and in smallest unit (e.g. cents or sats) - **`currency` (required)** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`date` (required)** `object` — Date in ISO 8601 format (e.g. "2021-01-01T00:00:00.000Z") - **`discountsInOrderCurrency` (required)** `array` — List premiums and discounts applied to this transaction. Note: The amount retained as payment for the Order is \`amountInOrderCurrency + sum(discountsInChargeCurrency.amount)\` **Items:** - **`amountOff` (required)** `integer` — Amount of the discount denominated in \`orderCurrency\` and in smallest unit (e.g cents or sats). Negative value means a premium was applied. - **`paymentType` (required)** `string`, possible values: `"FIAT", "BITCOIN", "LIGHTNING", "STABLECOIN"` — Type of payments this discount applies to - **`rateBipsOff` (required)** `integer` — Rate of the discount in bips (e.g. 1234 for 12.34%). Negative value means a premium was applied. - **`externalRef` (required)** `object` — External reference for the transaction. (e.g. Bitcoin txId, Stripe transaction ID...) - **`method` (required)** `string`, possible values: `"BITCOIN", "LIQUID", "LIGHTNING", "BANK", "CARD", "CASH", "CHECK", "GIFTCARD", "COUPON", "APPLEPAY", "GOOGLEPAY", "CASHAPP_PAY", "INTERAC", "ACH", "SEPA", "UNKNOWN", "WIRE_TRANSFER", "VENMO", "PAYPAL", "NO_CHARGE", "TETHER", "USDCIRCLE"` - **`orderCurrency` (required)** `object` — Currency of the Order this transaction is paying for. For example, when paying an USD invoice in BTC, transaction \`currency\` would be USD and \`orderCurrency\` USD. - **`status` (required)** `string`, possible values: `"PENDING", "CONFIRMED", "CANCELED"` - **`id`** `string` **Example:** ```json { "id": "", "orgId": "", "orderType": "invoice", "totalAmount": -9007199254740991, "currency": "USD", "externalUniqId": "", "status": "PENDING", "paidAt": "", "expiresAt": "", "redirectUrl": "", "label": "", "checkoutUrl": "", "receiptPdfUrl": "", "customCheckoutId": "", "contact": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "invoice": { "id": "", "number": "", "title": "", "orgId": "", "status": "DRAFT", "footerNote": "", "daysToPay": -9007199254740991, "date": "", "purchaseOrderNumber": "", "hideOrgAddress": true, "hideOrgEmail": true, "hideOrgName": true, "sentAt": "", "publicUrl": "", "customer": { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] }, "lineItems": [ { "id": "", "name": "", "description": "", "unitPrice": -9007199254740991, "quantity": 1, "taxRateBips": -9007199254740991, "taxAmount": -9007199254740991, "discountRateBips": -9007199254740991, "discountAmount": -9007199254740991 } ] }, "paymentLink": { "id": "", "title": "" }, "transactions": [ { "id": "", "date": null, "amount": -9007199254740991, "currency": "USD", "amountInOrderCurrency": -9007199254740991, "discountsInOrderCurrency": [ { "amountOff": -9007199254740991, "rateBipsOff": -9007199254740991, "paymentType": "FIAT" } ], "orderCurrency": "USD", "accountingCurrency": "USD", "amountInAccountingCurrency": -9007199254740991, "method": "BITCOIN", "externalRef": "", "status": "PENDING" } ], "customerData": { "email": "", "name": "", "phone": "", "address": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "note": "", "company": "", "additionalProperty": "anything" }, "customerFields": { "address": "REQUIRED", "email": "REQUIRED", "name": "REQUIRED", "phone": "REQUIRED", "note": "REQUIRED" }, "metadata": {}, "tags": [ "" ], "allowSavePaymentProfile": false, "eventTickets": [], "orderItems": [ { "id": "", "label": "", "quantity": -9007199254740991, "paymentLinkItem": { "id": "", "title": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Create Contact - **Method:** `POST` - **Path:** `/v1/contacts` - **Tags:** Contacts Create a Zaprite Contact. You can then link this contact to Zaprite Orders. #### Request Body ##### Content-Type: application/json - **`email` (required)** `string`, format: `email` - **`legalName` (required)** `string` - **`billingAddress`** `object` - **`city`** `object` - **`countryCode`** `object` - **`line1`** `object` - **`line2`** `object` - **`state`** `object` - **`zipCode`** `object` - **`contactName`** `string` - **`defaultCurrency`** `string`, possible values: `"USD", "USDC", "USDT", "BTC", "LBTC", "ALL", "DZD", "ARS", "AMD", "AUD", "AZN", "BHD", "BDT", "BYN", "BMD", "BOB", "BAM", "BRL", "BGN", "KHR", "CAD", "CLP", "CNY", "COP", "CRC", "HRK", "CUP", "CZK", "DKK", "DOP", "EGP", "EUR", "GEL", "GHS", "GTQ", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KWD", "KGS", "LBP", "MKD", "MYR", "MUR", "MXN", "MDL", "MNT", "MAD", "MMK", "NAD", "NPR", "TWD", "NZD", "NIO", "NGN", "NOK", "OMR", "PKR", "PAB", "PEN", "PHP", "PLN", "GBP", "QAR", "RON", "RUB", "SAR", "RSD", "SGD", "ZAR", "KRW", "SSP", "VES", "LKR", "SEK", "CHF", "THB", "TTD", "TND", "TRY", "UGX", "UAH", "AED", "UYU", "UZS", "VND"` - **`displayName`** `string` - **`internalNote`** `string` - **`taxId`** `string` **Example:** ```json { "contactName": "", "displayName": "", "legalName": "", "email": "", "internalNote": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" } } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`billingAddress` (required)** `object` - **`contactName` (required)** `object` - **`defaultCurrency` (required)** `object` - **`displayName` (required)** `object` - **`email` (required)** `object` - **`id` (required)** `string` - **`legalName` (required)** `string` - **`paymentProfiles` (required)** `array` — Saved payment profiles for this contact. Can be used to pay Orders with the \`charge\` endpoint. **Items:** - **`connection` (required)** `object` - **`id` (required)** `string` - **`label` (required)** `string` - **`pluginSlug` (required)** `string` - **`expiresAt` (required)** `object` - **`externalId` (required)** `string` - **`id` (required)** `string` - **`label` (required)** `string` - **`method` (required)** `string` - **`sourceOrder` (required)** `object` — The Order that your customer was paying when saving this payment profile. - **`taxId` (required)** `object` **Example:** ```json { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### List Contacts - **Method:** `GET` - **Path:** `/v1/contacts` - **Tags:** Contacts List Zaprite Contacts. Returns up to 100 contacts per request. #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`items` (required)** `array` **Items:** - **`billingAddress` (required)** `object` - **`contactName` (required)** `object` - **`defaultCurrency` (required)** `object` - **`displayName` (required)** `object` - **`email` (required)** `object` - **`id` (required)** `string` - **`legalName` (required)** `string` - **`paymentProfiles` (required)** `array` — Saved payment profiles for this contact. Can be used to pay Orders with the \`charge\` endpoint. **Items:** - **`connection` (required)** `object` - **`id` (required)** `string` - **`label` (required)** `string` - **`pluginSlug` (required)** `string` - **`expiresAt` (required)** `object` - **`externalId` (required)** `string` - **`id` (required)** `string` - **`label` (required)** `string` - **`method` (required)** `string` - **`sourceOrder` (required)** `object` — The Order that your customer was paying when saving this payment profile. - **`taxId` (required)** `object` - **`meta` (required)** `object` — Pagination metadata - **`itemsCount` (required)** `number` - **`page` (required)** `number` - **`pagesCount` (required)** `number` - **`perPage` (required)** `number` **Example:** ```json { "items": [ { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] } ], "meta": { "itemsCount": 1, "pagesCount": 1, "page": 1, "perPage": 1 } } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Update Contact - **Method:** `PUT` - **Path:** `/v1/contacts/{id}` - **Tags:** Contacts Update a Zaprite Contact. Only provided fields are updated. #### Request Body ##### Content-Type: application/json - **`billingAddress`** `object` - **`contactName`** `object` - **`defaultCurrency`** `object` - **`displayName`** `object` - **`email`** `object` - **`internalNote`** `object` - **`legalName`** `string` - **`taxId`** `object` **Example:** ```json { "contactName": "", "displayName": "", "legalName": "", "email": "", "internalNote": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" } } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`billingAddress` (required)** `object` - **`contactName` (required)** `object` - **`defaultCurrency` (required)** `object` - **`displayName` (required)** `object` - **`email` (required)** `object` - **`id` (required)** `string` - **`legalName` (required)** `string` - **`paymentProfiles` (required)** `array` — Saved payment profiles for this contact. Can be used to pay Orders with the \`charge\` endpoint. **Items:** - **`connection` (required)** `object` - **`id` (required)** `string` - **`label` (required)** `string` - **`pluginSlug` (required)** `string` - **`expiresAt` (required)** `object` - **`externalId` (required)** `string` - **`id` (required)** `string` - **`label` (required)** `string` - **`method` (required)** `string` - **`sourceOrder` (required)** `object` — The Order that your customer was paying when saving this payment profile. - **`taxId` (required)** `object` **Example:** ```json { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Delete Contact - **Method:** `DELETE` - **Path:** `/v1/contacts/{id}` - **Tags:** Contacts Delete a Zaprite Contact #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json **Example:** ```json {} ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Get Contact - **Method:** `GET` - **Path:** `/v1/contacts/{id}` - **Tags:** Contacts Get a Zaprite Contact #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`billingAddress` (required)** `object` - **`contactName` (required)** `object` - **`defaultCurrency` (required)** `object` - **`displayName` (required)** `object` - **`email` (required)** `object` - **`id` (required)** `string` - **`legalName` (required)** `string` - **`paymentProfiles` (required)** `array` — Saved payment profiles for this contact. Can be used to pay Orders with the \`charge\` endpoint. **Items:** - **`connection` (required)** `object` - **`id` (required)** `string` - **`label` (required)** `string` - **`pluginSlug` (required)** `string` - **`expiresAt` (required)** `object` - **`externalId` (required)** `string` - **`id` (required)** `string` - **`label` (required)** `string` - **`method` (required)** `string` - **`sourceOrder` (required)** `object` — The Order that your customer was paying when saving this payment profile. - **`taxId` (required)** `object` **Example:** ```json { "id": "", "legalName": "", "contactName": "", "displayName": "", "email": "", "taxId": "", "defaultCurrency": "USD", "billingAddress": { "line1": "", "line2": "", "zipCode": "", "city": "", "state": "", "countryCode": "" }, "paymentProfiles": [ { "id": "", "externalId": "", "method": "", "label": "", "expiresAt": null, "connection": { "label": "", "pluginSlug": "", "id": "" }, "sourceOrder": { "id": "", "externalUniqId": "" } } ] } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Create Webhook - **Method:** `POST` - **Path:** `/v1/webhooks` - **Tags:** Webhooks Create a webhook to receive notifications about events in your Zaprite organization. #### Request Body ##### Content-Type: application/json - **`url` (required)** `string`, format: `uri` — The URL that will receive webhook requests - **`label`** `object` — Optional label for the webhook **Example:** ```json { "url": "", "label": "" } ``` #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`createdAt` (required)** `object` — When the webhook was created - **`id` (required)** `string` - **`label` (required)** `object` — Optional label for the webhook - **`url` (required)** `string`, format: `uri` — The URL that will receive webhook requests **Example:** ```json { "id": "", "url": "", "label": "", "createdAt": null } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### List Webhooks - **Method:** `GET` - **Path:** `/v1/webhooks` - **Tags:** Webhooks List all webhooks configured for your Zaprite organization. Returns up to 100 webhooks per request. #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json - **`items` (required)** `array` **Items:** - **`createdAt` (required)** `object` — When the webhook was created - **`id` (required)** `string` - **`label` (required)** `object` — Optional label for the webhook - **`url` (required)** `string`, format: `uri` — The URL that will receive webhook requests - **`meta` (required)** `object` — Pagination metadata - **`itemsCount` (required)** `number` - **`page` (required)** `number` - **`pagesCount` (required)** `number` - **`perPage` (required)** `number` **Example:** ```json { "items": [ { "id": "", "url": "", "label": "", "createdAt": null } ], "meta": { "itemsCount": 1, "pagesCount": 1, "page": 1, "perPage": 1 } } ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Delete Webhook - **Method:** `DELETE` - **Path:** `/v1/webhooks/{id}` - **Tags:** Webhooks Delete a webhook from your Zaprite organization. #### Responses ##### Status: 200 Successful response ###### Content-Type: application/json **Example:** ```json {} ``` ##### Status: 400 Invalid input data ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ##### Status: 401 Authorization not provided ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ##### Status: 403 Insufficient access ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ##### Status: 404 Not found ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ``` ##### Status: 500 Internal server error ###### Content-Type: application/json - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ## Webhooks ### order.change - **Method:**`POST` - **Path:**`/webhooks/order.change` - **Tags:** Webhooks Sent to your own server when an Order status changes. You can use this hook to detect paid orders. ### invoice.sent - **Method:**`POST` - **Path:**`/webhooks/invoice.sent` - **Tags:** Webhooks Sent to your own server when an invoice is sent. ### contact.updated - **Method:**`POST` - **Path:**`/webhooks/contact.updated` - **Tags:** Webhooks Sent to your own server when a Contact is updated. ### paymentProfile.created - **Method:**`POST` - **Path:**`/webhooks/paymentProfile.created` - **Tags:** Webhooks Sent to your server when a Payment Profile is created ### paymentProfile.updated - **Method:**`POST` - **Path:**`/webhooks/paymentProfile.updated` - **Tags:** Webhooks Sent to your server when a Payment Profile is updated ## Schemas ### Invalid input data error (400) - **Type:**`object` The error information - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } ``` ### Authorization not provided error (401) - **Type:**`object` The error information - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": [] } ``` ### Insufficient access error (403) - **Type:**`object` The error information - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "FORBIDDEN", "message": "Insufficient access", "issues": [] } ``` ### Internal server error error (500) - **Type:**`object` The error information - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } ``` ### Not found error (404) - **Type:**`object` The error information - **`code` (required)** `string` — The error code - **`message` (required)** `string` — The error message - **`issues`** `array` — An array of issues that were responsible for the error **Items:** - **`message` (required)** `string` **Example:** ```json { "code": "NOT_FOUND", "message": "Not found", "issues": [] } ```