PageSourceSearch

https://surecart-docs.netlify.app/assets/js/dc59d6de.9f3b96cf.js

js surecart-docs.netlify.app collected 2026-10-03 11:29:43 UTC 210,877 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_surecart_docs=self.webpackChunk_surecart_docs||[]).push([[2586],{20117:function(e,t,a){a.d(t,{Z:function(){return o}});var s=a(2784),n=e=>{let{children:t,required:a}=e;return s.createElement("small",{style:{fontSize:"12px",opacity:"0.5",textTransform:"uppercase",color:a?"red":"inherit",fontWeight:500}},t)},o=e=>{var t;let{parameter:a,required:o}=e;return s.createElement("div",null,s.createElement("strong",null,a.name)," ",s.createElement(n,null,(null==a||null==(t=a.schema)?void 0:t.type)||(null==a?void 0:a.type))," ",o&&s.createElement(n,{required:!0},"required"),s.createElement("p",null,a.description))}},4231:function(e,t,a){var s=a(20117),n=a(12949),o=a(2784);t.Z=e=>{var t,a,r;let{path:i,method:c}=e;const[d,p]=(0,o.useState)(null);(0,o.useEffect)((()=>{SwaggerClient.resolve({spec:n}).then((e=>{let{spec:t}=e;p(t)}))}),[]);const l=null==d||null==(t=d.paths)||null==(a=t["/v1/"+i])?void 0:a[c];return null!=l&&null!=(r=l.parameters)&&r.length?l.parameters.map((e=>{if(!["limit","page"].includes(null==e?void 0:e.name))return o.createElement(s.Z,{parameter:e})})):""}},82173:function(e,t,a){var s=a(20117),n=a(12949),o=a(2784);t.Z=e=>{var t,a,r,i,c,d,p,l,u;let{path:m,method:h,model:b}=e;const[_,f]=(0,o.useState)(null);(0,o.useEffect)((()=>{SwaggerClient.resolve({spec:n}).then((e=>{let{spec:t}=e;f(t)}))}),[]);const y=null==_||null==(t=_.paths)||null==(a=t["/v1/"+m])||null==(r=a[h])||null==(i=r.responses)||null==(c=i[200])||null==(d=c.content)||null==(p=d["application/json"])||null==(l=p.schema)?void 0:l.properties;return null!=(u=Object.keys(y||{}))&&u.length?Object.keys(y).map((e=>{const t={...y[e],name:e};return o.createElement(s.Z,{parameter:t})})):""}},21881:function(e,t,a){a.r(t),a.d(t,{assets:function(){return p},contentTitle:function(){return c},default:function(){return m},frontMatter:function(){return i},metadata:function(){return d},toc:function(){return l}});var s=a(28427),n=(a(2784),a(30876)),o=a(4231),r=a(82173);const i={},c="Find with ID",d={unversionedId:"models/Customer/find",id:"models/Customer/find",title:"Find with ID",description:"Returns a single customer by id.",source:"@site/docs/models/Customer/find.mdx",sourceDirName:"models/Customer",slug:"/models/Customer/find",permalink:"/models/Customer/find",draft:!1,editUrl:"https://github.com/facebook/docusaurus/edit/master/website/docs/models/Customer/find.mdx",tags:[],version:"current",frontMatter:{}},p={},l=[{value:"Examples",id:"examples",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Response Attributes",id:"response-attributes",level:2}],u={toc:l};
1function m(e){let{components:t,...a}=e;return(0,n.kt)("wrapper",(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"find-with-id"},"Find with ID"),(0,n.kt)("p",null,"Returns a single customer by id."),(0,n.kt)("h2",{id:"examples"},"Examples"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-php"},"\\SureCart\\Models\\Customer::with([\n    'billing_address'\n])->find('8ba8d60f-5277-4e6b-807c-dee8166446d5');\n")),(0,n.kt)("h2",{id:"parameters"},"Parameters"),(0,n.kt)(o.Z,{path:"customers/{id}",method:"get",mdxType:"ModelParameters"}),(0,n.kt)("h2",{id:"response-attributes"},"Response Attributes"),(0,n.kt)(r.Z,{path:"customers/{id}",method:"get",model:"customer",mdxType:"ModelResponse"}))}m.isMDXComponent=!0},12949:function(e){e.exports=JSON.parse('{"openapi":"3.0.1","info":{"title":"Endpoints","version":"v1"},"servers":[{"url":"https://{defaultHost}","variables":{"defaultHost":{"default":"api.surecart.com"}}}],"security":[{"bearer_auth":[]}],"components":{"securitySchemes":{"bearer_auth":{"type":"http","scheme":"bearer"}},"schemas":{"abandoned_checkout_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"notification_status":{"type":"string","description":"The current notification status for this abandonded checkout, which can be one of `not_sent`, `scheduled`, or `sent`."},"status":{"type":"string","description":"The current status of this abandonded checkout, which can be one of `not_notified`, `notified`, or `recovered`."},"customer":{"type":"expandable","description":"The associated customer."},"latest_recoverable_checkout":{"type":"expandable","description":"This customer\'s most recent checkout that has been abandoned.."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"account_base":{"properties":{"currency":{"type":"string","description":"The default currency for this account. This will be used as the default value for `Price`, `Checkout`, and other objects that have the `currency` attribute."},"name":{"type":"string","description":"The full name, business name, or other short descriptor for this account."},"time_zone":{"type":"string","description":"The time zone of the account. Values must be a valid IANA time zone database identifier."},"url":{"type":"string","nullable":true,"description":"The URL of this account\'s store. This will be used as the base for all redirects back to your store."}}},"account_body":{"allOf":[{"$ref":"#/components/schemas/account_base"},{"properties":null,"address":{"description":"The associated address.","allOf":[{"$ref":"#/components/schemas/address_body"}]}}]},"account_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/account_base"},{"properties":{"address":{"type":"expandable","description":"The associated legal business address."},"brand":{"type":"expandable","description":"The associated brand."},"customer_notification_protocol":{"type":"expandable","description":"The associated customer notification protocol."},"entitlements":{"type":"object","description":"The permissions this account has for gated features."},"medias_byte_size":{"type":"integer","description":"The total number of bytes from this account\'s medias."},"owner":{"type":"expandable","description":"The associated user that owns this account."},"portal_protocol":{"type":"expandable","description":"The associated portal protocol."},"processors":{"type":"array","description":"A list of connected processors."},"tax_protocol":{"type":"expandable","description":"The associated tax protocol."},"coupons_updated_at":{"type":"integer","nullable":true,"description":"Time at which the coupons collection was last updated. This reflects any changes to the `Coupon`, `Discount`, and `Promotion` collections."},"products_updated_at":{"type":"integer","nullable":true,"description":"Time at which the products collection was last updated. This reflects any changes to the `Product`, `Price`, and `Product Group` collections."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"activation_base":{"properties":{"fingerprint":{"type":"string","description":"The unique identifier for this activation. For example a URL, a machine fingerprint, etc."},"name":{"type":"string","nullable":true,"description":"The name of this activation."}}},"activation_body":{"allOf":[{"$ref":"#/components/schemas/activation_base"},{"properties":{"license":{"type":"string","description":"The UUID of the license."}}}]},"activation_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/activation_base"},{"properties":{"license":{"type":"expandable","description":"The associated license."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"public_activation_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/activation_base"},{"properties":{"license":{"type":"expandable","description":"The associated license."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"address_body":{"properties":{"city":{"type":"string","description":"City, district, suburb, town, or village."},"country":{"type":"string","description":"Two-letter country code (ISO 3166-1 alpha-2)."},"line_1":{"type":"string","description":"Address line 1 (e.g., street, PO Box, or company name)."},"line_2":{"type":"string","nullable":true,"description":"Address line 2 (e.g., apartment, suite, unit, or building)."}
1,"name":{"type":"string","description":"The full name or business name for this address. (If empty, this will fallback to the customer\'s name.)"},"postal_code":{"type":"string","description":"ZIP or postal code."},"state":{"type":"string","description":"State, county, province, or region."}}},"address_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/address_body"},{"$ref":"#/components/schemas/model_timestamps"}]},"balance_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"amount":{"type":"integer","description":"The total balance amount for this customer in this currency."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase."},"balance_transactions":{"type":"expandable","description":"The associated balance transactions."},"customer":{"type":"expandable","description":"The associated customer."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"balance_transaction_base":{"properties":{"amount":{"type":"integer","description":"The amount of the transaction. A negative value is a credit for the customer\u2019s balance, and a positive value is a debit to the customer\u2019s balance."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase."}}},"balance_transaction_body":{"allOf":[{"$ref":"#/components/schemas/balance_transaction_base"},{"properties":{"customer":{"type":"string","description":"The UUID of the customer."}}}]},"balance_transaction_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/balance_transaction_base"},{"properties":{"balance":{"type":"expandable","description":"The associated balance."},"customer":{"type":"expandable","description":"The associated customer."},"ending_balance_amount":{"type":"integer","description":"The balance amount after the transaction was applied."},"checkout":{"type":"expandable","description":"The associated checkout."},"transaction_type":{"type":"string","description":"One of either `adjustment`, `applied_to_checkout`, `checkout_below_currency_minimum`, or `checkout_credit`. Balance transactions created through the API are always `adjustment` transactions."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"brand_base":{"properties":{"color":{"type":"string","nullable":true,"description":"The primary brand color. Used for buttons, links, loading states, etc."},"email":{"type":"string","nullable":true,"description":"The email address that will be shown to customers for support, on statements, etc."},"phone":{"type":"string","nullable":true,"description":"The phone number that will be shown to customers for support, on statements, etc."},"website":{"type":"string","nullable":true,"description":"The website that will be shown to customers for support, on statements, etc."}}},"brand_body":{"allOf":[{"$ref":"#/components/schemas/brand_base"},{"properties":{"logo":{"type":"string","description":"The UUID of the media."},"address":{"description":"The associated address.","allOf":[{"$ref":"#/components/schemas/address_body"}]}}}]},"brand_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/brand_base"},{"properties":{"logo":{"type":"expandable","description":"The associated media."},"address":{"type":"expandable","description":"The associated address."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"card_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"brand":{"type":"string","description":"The brand of the card, which can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`."},"exp_month":{"type":"integer","description":"Two-digit number representing the card\u2019s expiration month."},"exp_year":{"type":"integer","description":"Four-digit number representing the card\u2019s expiration year."},"last4":{"type":"string","description":"The last four digits of the card."},"wallet_type":{"type":"string","nullable":true,"description":"If this card is part of a card wallet, this will be set to the type of wallet. The current types are `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"charge_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"amount":{"type":"integer","description":"The amount in cents that was charged, represented as a whole integer. For example `9900` is equivalent to `$99`."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase."},"external_charge_id":{"type":"string","description":"The external processor ID representing this charge."},"fully_refunded":{"type":"boolean","description":"Whether or not this charge has been refunded completely."},"live_mode":{"type":"boolean","description":"Set to `true` if this charge is in live mode, and set to `false` if it is in test mode."},"refunded_amount":{"type":"integer","description":"Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued)."},"status":{"type":"string","description":"The current status of this charge, which can be one of `pending`, `succeeded`, or `failed`."},"customer":{"type":"expandable","description":"The associated customer."},"checkout":{"type":"expandable","description":"The associated checkout."},"payment_intent":{"type":"expandable","description":"The associated payment intent."},"payment_method":{"type":"expandable","description":"The associated payment method."},"refunds":{"type":"expandable","description":"A list of associated refunds."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"checkout_base":{"allOf":[{"properties":{"abandoned_checkout_enabled":{"type":"boolean","description":"If set to `true` abandonded checkout reminder emails will be sent to the customer."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. If not set, this value will fallback to the default `Account` currency."},"email":{"type":"string","nullable":true,"description":"The email of the customer. If customers exists with this email, the most recently active/updated customer will be associated. If no customers exist with this email, a new customer will be created."},"group_key":{"type":"string","nullable":true,"description":"A key used to retrieve groups of checkouts dynamically from a static string."},"live_mode":{"type":"boolean","description":"Set to `true` if this checkout is in live mode, and set to `false` if it is in test mode."},"name":{"type":"string","nullable":true,"description":"The name of the customer."}}},{"$ref":"#/components/schemas/model_metadata"}]},"checkout_body":{"allOf":[{"$ref":"#/components/schemas/checkout_base"},{"properties":{"billing_address":{"description":"The billing address for this checkout.","allOf":[{"$ref":"#/components/schemas/address_body"}]},"discount":{"description":"The parameters of the discount to be applied to this checkout.","allOf":[{"$ref":"#/components/schemas/discount_body"}]},"line_items":{"type":"array","description":"A list of this checkout\'s line items.","items":{"$ref":"#/components/schemas/line_item_body"}},"refresh_price_versions":{"type":"boolean","description":"When set to true the prices that are associated with each line item will be refreshed to reference the most recent version. (This should be used if you are receiving an error when trying to finalize a checkout that is referencing old price versions.)"},"shipping_address":{"description":"The shipping address for this checkout.","allOf":[{"$ref":"#/components/schemas/address_body"}]},"tax_identifier":{"description":"The tax identifier to set for this checkout.","allOf":[{"$ref":"#/components/schemas/tax_identifier_body"}]}}}]},"checkout_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"amount_due":{"type":"integer","description":"Total amount due after all adju
1stments (i.e. trials, credits, proration)."},"applied_balance_amount":{"type":"integer","description":"The customer balance amount that was applied to this checkout."},"billing_address":{"type":"expandable","description":"The associated billing address."},"credited_balance_amount":{"type":"integer","description":"The amount the customer\'s balance was credited from this checkout."},"customer":{"type":"expandable","description":"The associated customer. (This will only be set once the checkout has been finalized.)"},"discount":{"type":"expandable","description":"The associated discount."},"discount_amount":{"type":"integer","description":"Total discount amount of all line items."},"full_amount":{"type":"integer","description":"The full amount to be charged across all periods."},"line_items":{"type":"expandable","description":"A list of associated line items."},"order":{"type":"expandable","description":"The associated order."},"paid_at":{"type":"integer","nullable":true,"description":"Time at which the object was paid. Measured in seconds since the Unix epoch."},"payment_intent":{"type":"expandable","description":"The associated payment intent. (This will only be set once the checkout has been finalized.)"},"payment_method_required":{"type":"boolean","description":"Whether or not a payment method is required for this checkout. If false, the checkout will immediately transition to the `paid` state when finalized and staged payment intents will not be created or updated."},"processor_data":{"type":"object","description":"All of the additional data necessary to capture payment with each processor."},"proration_amount":{"type":"integer","description":"Total amount to be prorated from this checkout."},"purchases":{"type":"expandable","description":"The associated purchases."},"reusable_payment_method_required":{"type":"boolean","description":"Whether or not a reusable payment method is required for this checkout."},"shipping_address":{"type":"expandable","description":"The associated shipping address."},"shipping_enabled":{"type":"boolean","description":"Whether or not this checkout has products with `shipping_enabled=true`."},"staged_payment_intents":{"type":"expandable","description":"The associated payment intents that have been staged. (These will only be created if you\'ve passed `stage_processor_type` when creating or updating a checkout.)"},"status":{"type":"string","description":"The current status of this checkout, which can be one of `draft`, `finalized`, `paid`, `payment_intent_canceled`, `payment_failed`, or `processing`."},"subtotal_amount":{"type":"integer","description":"Total of all line items before discounts or taxes are applied."},"tax_amount":{"type":"integer","description":"Total tax amount of all line items."},"tax_exclusive_amount":{"type":"integer","description":"Total tax amount for all line items that have tax exclusive prices."},"tax_label":{"type":"string","nullable":true,"description":"The type of tax that is applied to this checkout. For example, in the EU this value will be `VAT` and in the US this value will be `Tax`."},"tax_inclusive_amount":{"type":"integer","description":"Total tax amount for all line items that have tax inclusive prices."},"tax_percent":{"type":"number","description":"The total effective tax rate for the checkout."},"tax_status":{"type":"string","description":"The status of tax calculations for this checkout. One of `address_invalid`, `calculated`, `disabled`, `estimated`, `reverse_charged`, or `tax_zone_not_found`."},"tax_identifier":{"type":"expandable","description":"The associated tax identifier."},"total_amount":{"type":"integer","description":"Total of all line items after discounts and taxes are applied."},"trial_amount":{"type":"integer","description":"Total of all line items that have `trial` set to `true`."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"coupon_base":{"allOf":[{"properties":{"amount_off":{"type":"integer","nullable":true,"description":"Amount (in the `currency` specified) that will be taken off the subtotal of any checkout."},"currency":{"type":"string","description":"If `amount_off` has been set, the three-letter ISO code for the currency of the amount to take off."},"duration":{"type":"string","description":"One of `forever`, `once`, and `repeating`. Describes how long a discount with this coupon will be applied. (The `repeating` and `forever` values only apply to subscriptions.)","default":"once"},"duration_in_months":{"type":"integer","nullable":true,"description":"If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`."},"max_redemptions":{"type":"integer","nullable":true,"description":"Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid."},"name":{"type":"string","description":"Name of the coupon displayed to customers."},"percent_off":{"type":"number","nullable":true,"description":"Percent that will be taken off the subtotal of any checkout. For example, a coupon with percent_off of 50 will make a $100 checkout $50 instead."},"redeem_by":{"type":"integer","nullable":true,"description":"Date after which the coupon can no longer be redeemed."}}},{"$ref":"#/components/schemas/model_metadata"}]},"coupon_body":{"allOf":[{"$ref":"#/components/schemas/coupon_base"},{"properties":{"promotions":{"type":"array","description":"A list of this product\'s promotions. (This can only be set when creating a new coupon.)","items":{"$ref":"#/components/schemas/promotion_body"}}}}]},"coupon_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/coupon_base"},{"properties":{"expired":{"type":"boolean","description":"Taking into account the above properties, whether this coupon can still be applied to a checkout."},"promotions":{"type":"expandable","description":"A list of associated promotions."},"times_redeemed":{"type":"integer","description":"Number of times this coupon has been applied to a checkout and/or subscription."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"customer_base":{"properties":{"billing_matches_shipping":{"type":"boolean","description":"If set to `true` the shipping address will be used for the billing address."},"email":{"type":"string","description":"The customer\u2019s email address."},"live_mode":{"type":"boolean","description":"Set to `true` if this customer is in live mode, and set to `false` if it is in test mode."},"name":{"type":"string","nullable":true,"description":"The customer\u2019s full name or business name."},"phone":{"type":"string","nullable":true,"description":"The customer\u2019s phone number."},"unsubscribed":{"type":"boolean","description":"Set to `true` if this customer has unsubscribed from from opt-in emails (i.e. abandoned cart emails)."}}},"customer_body":{"allOf":[{"$ref":"#/components/schemas/customer_base"},{"properties":{"billing_address":{"description":"The billing address for the customer.","allOf":[{"$ref":"#/components/schemas/address_body"}]},"default_payment_method":{"type":"string","description":"The UUID of the default payment method."},"shipping_address":{"description":"The shipping address for the customer.","allOf":[{"$ref":"#/components/schemas/address_body"}]},"tax_identifier":{"description":"The tax identifier to set for this customer.","allOf":[{"$ref":"#/components/schemas/tax_identifier_body"}]}}}]},"customer_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/customer_base"},{"properties":{"indexed":{"type":"boolean","description":"Whether or not this customer is included in the `/customers` list endpoint. Only customers that have been manually created or have a purchase are indexed."},"balances":{"type":"expandable","description":"A list of this customer\'s balances."},"billing_address":{"type":"expandable","description":"The billing address for the customer."},"default_payment_method":{"type":"expandable","description":"The default payment method for the customer."},"licenses":{"type":"expandable","description":"A list of this customer\'s licenses."},"purchases":{"type":"expandable","description":"A list of this customer\'s purchases."},"shipping_address":{"type":"expandable","description":"The shipping address for the customer."},"tax_identifier":{"type":"expandable","description":"The associated tax identifier."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"customer_link_base":{"properties":{"email":{"type":"string","description":"The email where the link should be sent. This does not need to match the customer\'s email if you provide a customer ID."}}},"customer_link_body":{"allOf":[{"$ref":"#/components/schemas/customer_link_base"},{"properties":{"customer":{"type":"string","description":"The UUID of the customer. (If not provided, we will attempt to find a customer based on the `email`.)"}}}]},"customer_link_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/customer_link_base"},{"properties":{"customer":{"type":"expandable","description":"The associated customer."},"expired":{"type":"boolean","description":"Whether or not this customer link is valid."},"first_used_at":{"type":"integer","nullable":true,"description":"Date when the customer link was first used."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"customer_notification_protocol_body":{"properties":{"abandoned_checkout_enabled":{"type":"boolean","description":"If set to `true` abandonded checkout reminder emails will be sent to customers."},"order_enabled":{"type":"boolean","description":"If set to `true` order confirmation emails will be sent to customers."},"payment_failure_enabled":{"type":"boolean","description":"If set to `true` subscription dunning emails will be sent to customers."},"purchase_enabled":{"type":"boolean","description":"If set to `true` product access emails will be sent to customers."},"refund_enabled":{"type":"boolean","description":"If set to `true` refund emails will be sent to customers."},"subscription_reminder_enabled":{"type":"boolean","description":"If set to `true` subscription reminder emails will be sent to customers."},"from_name":{"type":"string","nullable":true,"description":"The from name to use when sending emails to customers."},"locale":{"type":"string","description":"The language that will be used for all customer notifications. Current available locales are `de`, `en`, `es`, and `fr`."},"reply_to_email":{"type":"string","nullable":true,"description":"The reply-to email address to use when sending emails to customers."}}},"customer_notification_protocol_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/customer_notification_protocol_body"},{"$ref":"#/components/schemas/model_timestamps"}]},"discount_body":{"properties":{"coupon":{"type":"string","description":"The UUID of the coupon."},"promotion_code":{"type":"string","description":"The customer-facing code that will be used to lookup the promotion."}}},"discount_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"coupon":{"type":"expandable","description":"The associated coupon."},"promotion":{"type":"expandable","description":"The associated promotion."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"download_base":{"properties":{"archived":{"type":"boolean","description":"Whether or not this download is archived."}}},"download_body":{"allOf":[{"$ref":"#/components/schemas/download_base"},{"properties":{"media":{"type":"string","description":"The UUID of the media."},"product":{"type":"string","description":"The UUID of the product."}}}]},"download_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/download_base"},{"properties":{"archived_at":{"type":"integer","nullable":true,"description":"Time at which the object was archived. Measured in seconds since the Unix epoch."},"media":{"type":"expandable","description":"The associated media."},"product":{"type":"expandable","description":"The associated product."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"event_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"account":{"type":"expandable","description":"The associated account."},"created_at":{"type":"integer","description":"Time at which the object was created. Measured in seconds since the Unix epoch."},"type":{"type":"string","description":"Description of the event (e.g., subscription.updated or charge.updated)."}}}]},"license_base":{"properties":{"activation_limit":{"type":"integer","nullable":true,"description":"The max number of activations allowed. If set to `null` then unlimited activations are allowed."}}},"license_body":{"allOf":[{"$ref":"#/components/schemas/license_base"},{"properties":{"purchase":{"type":"string","description":"The UUID of the license."}}}]},"license_base_response":{"allOf":[{"$ref":"#/components/schemas/license_base"},{"properties":{"key":{"type":"string","description":"The unique identifier for this license."},"status":{"type":"string","description":"The status of this license which is one of `active`, `inactive`, or `revoked`. If the associated purchase is revoked then the license will be `revoked`. If the license has one or more activations then it will be `active`, otherwise it will be `inactive`."}}}]},"license_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/license_base_response"},{"properties":{"purchase":{"type":"expandable","description":"The associated purchase."},"activations":{"type":"expandable","description":"The associated activations."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"public_license_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/license_base_response"},{"properties":{"customer":{"type":"expandable","description":"The associated customer."},"product":{"type":"expandable","description":"The associated product."},"current_release":{"type":"expandable","description":"The current release media."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"line_item_base":{"properties":{"ad_hoc_amount":{"type":"integer","nullable":true,"description":"The amount to use for this line item when the associated price is `ad_hoc=true`."},"quantity":{"type":"integer","description":"The quantity of products being purchased."}}
1},"line_item_body":{"allOf":[{"$ref":"#/components/schemas/line_item_base"},{"properties":{"price":{"type":"string","description":"The UUID of the price."}}}]},"line_item_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/line_item_base"},{"properties":{"discount_amount":{"type":"integer","description":"Total discount amount."},"full_amount":{"type":"integer","description":"The full amount to be charged across all periods."},"price":{"type":"expandable","description":"The associated price."},"subtotal_amount":{"type":"integer","description":"Total before any discounts or taxes are applied."},"tax_amount":{"type":"integer","description":"Total tax amount."},"total_amount":{"type":"integer","description":"Total after discounts and taxes are applied."},"trial":{"type":"boolean","description":"Set to `true` if this line item is for a price that has a default trial."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"media_body":{"properties":{"direct_upload_signed_id":{"type":"string","description":"The signed_id from the direct upload."}}},"media_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"byte_size":{"type":"integer","description":"The size of the media in bytes."},"content_type":{"type":"string","description":"The content type (i.e. image/png, image/jpg, application/pdf)."},"extension":{"type":"string","description":"The extension (i.e. png, jpg, pdf)."},"filename":{"type":"string","description":"The full filename with extension."},"public_access":{"type":"boolean","description":"Whether or not this media is publicly accessible."},"release_json":{"type":"object","nullable":true,"description":"The JSON that was extracted from the `release.json` file within the ZIP file."},"url":{"type":"string","nullable":true,"description":"The URL for accessing this media. If the media is public, this will be a permanent URL. If the media is private, this will be a short-lived URL if the media has been exposed."},"url_expires_at":{"type":"integer","nullable":true,"description":"The time at which the URL expires. This will only be present if the media is private and has been exposed."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"order_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"live_mode":{"type":"boolean","description":"Set to `true` if this order is in live mode, and set to `false` if it is in test mode."},"number":{"type":"string","description":"The unique identifier for this order that is auto generated based on this account\'s order protocol."},"order_type":{"type":"string","description":"One of either `checkout` or `subscription`."},"statement_url":{"type":"string","nullable":true,"description":"The link to download the PDF invoice or receipt of this order. To generate the receipt variation of the PDF add the `receipt=true` parameter."},"status":{"type":"string","description":"The current status of this order, which can be one of `paid`, `payment_failed`, or `processing`."},"checkout":{"type":"expandable","description":"The associated checkout."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"order_protocol_body":{"properties":{"footer":{"type":"string","nullable":true,"description":"The default footer that is shown on all order statements (i.e. invoices and receipts)."},"memo":{"type":"string","nullable":true,"description":"The default memo that is shown on all order statements (i.e. invoices and receipts)."},"number_prefix":{"type":"string","nullable":true,"description":"The prefix that is added to all order numbers. Must be between 3-12 characters and only include letters."},"number_type":{"type":"string","description":"The type of number to use for orders \u2013 one of `sequential` or `token`."}}},"order_protocol_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/order_protocol_body"},{"$ref":"#/components/schemas/model_timestamps"}]},"payment_intent_base":{"properties":{"amount":{"type":"integer","description":"The amount intended to be collected by this payment intent."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. If not set, this value will fallback to the default `Account` currency."}}},"payment_intent_full_base":{"allOf":[{"$ref":"#/components/schemas/payment_intent_base"},{"properties":{"live_mode":{"type":"boolean","description":"Set to `true` if this checkout is in live mode, and set to `false` if it is in test mode."},"processor_type":{"type":"string","description":"The processor being used for this checkout. The only allowed processors right now are `stripe` and `paypal`."}}}]},"payment_intent_body":{"allOf":[{"$ref":"#/components/schemas/payment_intent_full_base"},{"properties":{"customer":{"type":"string","description":"The UUID of the customer."}}}]},"payment_intent_update_body":{"allOf":[{"$ref":"#/components/schemas/payment_intent_base"},{"properties":{"customer":{"type":"string","description":"The UUID of the customer."}}}]},"payment_intent_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/payment_intent_full_base"},{"properties":{"customer":{"type":"expandable","description":"The associated customer."},"external_intent_id":{"type":"string","description":"The external ID necessary to capture payment through this processor. For example, if processing through Stripe, the `external_intent_id` will be set to the `Stripe::PaymentIntent` ID."},"off_session":{"type":"boolean","description":"Set to true to indicate that the customer is not in the checkout flow during the payment attempt. When `off_session=true` payment collection will be attempted immediately."},"payment_method":{"type":"expandable","description":"The associated payment method."},"processor_data":{"type":"object","description":"All of the additional data necessary to capture payment with this processor."},"reusable":{"type":"boolean","description":"Whether or not the payment method that is generated from this payment intent should be reusable or not."},"status":{"type":"string","description":"The status of this payment intent, one of `pending`, `canceled`, `failed`, `processing`, `requires_action`, `requires_capture`, or `succeeded`."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"payment_method_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"external_payment_method_id":{"type":"string","description":"The external processor ID representing this payment method."},"live_mode":{"type":"boolean","description":"Set to `true` if this charge is in live mode, and set to `false` if it is in test mode."},"processor_type":{"type":"string","description":"The specific type of processor. The only allowed processors right now are `stripe` and `paypal`."},"reusable":{"type":"boolean","description":"Whether or not this payment method can be reused. Only reusable payment methods can be attached to subscriptions and set as a customer\'s default."},"type":{"type":"string","description":"The type of payment method. One of `bank_account, `card`, `payment_instrument`, or `paypal_account`."},"bank_account":{"type":"expandable","description":"The associated bank account."},"card":{"type":"expandable","description":"The associated card."},"customer":{"type":"expandable","description":"The associated customer."},"payment_instrument":{"type":"expandable","description":"The associated payment instrument."},"paypal_account":{"type":"expandable","description":"The associated paypal account."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"period_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"ad_hoc_amount":{"type":"integer","nullable":true,"description":"The amount to use for this period when the associated price is `ad_hoc=true`."},"end_at":{"type":"integer","nullable":true,"description":"End of the peri
1od. This will be `null` when the period is for a subscription with a one-time price."},"next_payment_retry_at":{"type":"integer","nullable":true,"description":"The time at which payment will be automatically retried."},"payment_retry_count":{"type":"integer","description":"Number of payment retries made for this period, from the perspective of the payment retry schedule. Only automatic retries increment the count."},"quantity":{"type":"integer","description":"The quantity of products being purchased."},"renewal":{"type":"boolean","description":"Whether or not this period has been generated automatically for a subscription renewal."},"skip_proration":{"type":"boolean","description":"Whether or not proration should be skipped when generating this period\'s checkout."},"start_at":{"type":"integer","nullable":true,"description":"Start of the period."},"status":{"type":"string","description":"The current status of this period, which can be one of `pending`, `payment_failed`, or `paid`."},"checkout":{"type":"expandable","description":"The associated checkout."},"price":{"type":"expandable","description":"The associated price."},"subscription":{"type":"expandable","description":"The associated subscription."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"portal_protocol_body":{"properties":{"privacy_url":{"type":"string","nullable":true,"description":"The privacy policy link that is shown to customers on the customer portal."},"subscription_cancellations_enabled":{"type":"boolean","description":"Whether or not customers can cancel subscriptions from the customer portal."},"subscription_updates_enabled":{"type":"boolean","description":"Whether or not customers can make subscription changes from the customer portal."},"subscription_quantity_updates_enabled":{"type":"boolean","description":"Whether or not customers can change subscription quantities from the customer portal."},"terms_url":{"type":"string","nullable":true,"description":"The terms of service link that is shown to customers on the customer portal."}}},"portal_protocol_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/portal_protocol_body"},{"$ref":"#/components/schemas/model_timestamps"}]},"price_base":{"allOf":[{"properties":{"ad_hoc":{"type":"boolean","default":false,"description":"Whether or not this price accepts ad hoc amounts \u2013 also known as custom or user-defined amounts."},"ad_hoc_max_amount":{"type":"integer","nullable":true,"description":"The maximum ad hoc amount in cents to be allowed, represented as a whole integer. For example `9900` is equivalent to `$99`."},"ad_hoc_min_amount":{"type":"integer","nullable":true,"description":"The minimum ad hoc amount in cents to be allowed, represented as a whole integer. For example `9900` is equivalent to `$99`. If left blank, this will be interpreted as `0`."},"amount":{"type":"integer","nullable":true,"description":"The amount in cents to be charged, represented as a whole integer. For example `9900` is equivalent to `$99`. If `ad_hoc=true` the `amount` is optional."},"archived":{"type":"boolean","description":"Whether or not this price is archived."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. If not set, this value will fallback to the default `Account` currency."},"recurring_interval":{"type":"string","nullable":true,"description":"The frequency at which a subscription is billed. One of `day`, `week`, `month`, or `year`."},"recurring_interval_count":{"type":"integer","nullable":true,"description":"The number of intervals (specified in the `recurring_interval` attribute) between subscription billings. For example, `recurring_interval=month` and `recurring_interval_count=3` bills every 3 months. The total duration of a billing cycle is not allowed to exceed 1 year."},"recurring_period_count":{"type":"integer","nullable":true,"description":"The number of periods a subscription with this price will renew for. After this amount of periods, the subscription will move to the `completed` state."},"recurring_end_behavior":{"type":"string","nullable":true,"description":"The behavior of a subscription after it\'s final renewal period. This is only applicable to prices that have `recurring_period_count` defined. One of `cancel` or `complete`."},"tax_behavior":{"type":"string","description":"Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive` or `exclusive`."},"trial_duration_days":{"type":"integer","nullable":true,"description":"The default number of trial days when subscribing a customer to this price."}}},{"$ref":"#/components/schemas/model_metadata"}]},"price_body":{"allOf":[{"$ref":"#/components/schemas/price_base"},{"properties":{"product":{"type":"string","description":"The UUID of the product."}}}]},"price_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/price_base"},{"properties":{"archived_at":{"type":"integer","nullable":true,"description":"Time at which the object was archived. Measured in seconds since the Unix epoch."},"full_amount":{"type":"integer","description":"The full amount to be charged across all periods, represented as a whole integer. For prices without a `recurring_period_count` defined this is the same as `amount`. For finite prices, this is equal to `amount` * `recurring_period_count`. For example, a price that has an amount of $25 and is set to recur over 4 periods, will have a `full_amount` of $100."},"current_version":{"type":"boolean","description":"Whether or not this object represents the current version of this Price. (This will only be `false` if this `Price` is associated with a `LineItem` prior to it being changed. In this case we will lookup the version of the `Price` at the time it was associated.)"},"product":{"type":"expandable","description":"The associated product."}}},{"$ref":"#/components/schemas/model_timestamps"}]}
1,"product_base":{"allOf":[{"properties":{"archived":{"type":"boolean","description":"Whether or not this product is archived."},"description":{"type":"string","nullable":true,"description":"The product\u2019s description, meant to be displayable to the customer."},"licensing_enabled":{"type":"boolean","description":"Whether or not licensing is enabled for this product."},"license_activation_limit":{"type":"integer","nullable":true,"description":"The max number of activations allowed per license. If set to `null` then unlimited activations are allowed."},"name":{"type":"string","description":"The product\u2019s name, meant to be displayable to the customer."},"recurring":{"type":"boolean","default":false,"description":"Whether the product is for a one-time purchase or a recurring (subscription) purchase."},"shipping_enabled":{"type":"boolean","description":"If set to `true` checkouts with this product will require a full shipping address."},"tax_category":{"type":"string","nullable":true,"description":"The tax category/code that matches this product \u2013 one of `digital`, `tangible`, `service`, or `saas`."},"tax_enabled":{"type":"boolean","description":"If set to `true` this product is considered taxable."}}},{"$ref":"#/components/schemas/model_metadata"}]},"product_body":{"allOf":[{"$ref":"#/components/schemas/product_base"},{"properties":{"current_release_download":{"type":"string","description":"The UUID of the current release download."},"image":{"type":"string","description":"The UUID of the media."},"prices":{"type":"array","description":"A list of this product\'s prices. (This can only be set when creating a new product.)","items":{"$ref":"#/components/schemas/price_body"}},"product_group":{"type":"string","description":"The UUID of the product group."}}}]},"product_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/product_base"},{"properties":{"archived_at":{"type":"integer","nullable":true,"description":"Time at which the object was archived. Measured in seconds since the Unix epoch."},"current_release_download":{"type":"expandable","description":"The associated current release download."},"image":{"type":"expandable","description":"The associated media."},"metrics":{"type":"object","properties":{"currency":{"type":"string","description":"The currency that was used to calculate these metrics. This will always be set to the account\'s currency."},"max_price_amount":{"type":"integer","nullable":true,"description":"The maximum `amount` from this products not archived prices."},"min_price_amount":{"type":"integer","nullable":true,"description":"The minimum `amount` from this products not archived prices."},"prices_count":{"type":"integer","nullable":true,"description":"The total number of not archived prices that belong to this product."}}},"downloads":{"type":"expandable","description":"A list of associated downloads."},"prices":{"type":"expandable","description":"A list of associated prices."},"product_group":{"type":"expandable","description":"The associated product group."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"product_group_body":{"allOf":[{"properties":{"archived":{"type":"boolean","description":"Whether or not this product group is archived."},"name":{"type":"string","description":"The product group\u2019s name, meant to be displayable to the customer."}}},{"$ref":"#/components/schemas/model_metadata"}]},"product_group_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/product_group_body"},{"properties":{"archived_at":{"type":"integer","nullable":true,"description":"Time at which the object was archived. Measured in seconds since the Unix epoch."},"products":{"type":"expandable","description":"A list of associated products."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"promotion_base":{"allOf":[{"properties":{"archived":{"type":"boolean","description":"Whether or not this promotion is archived."},"code":{"type":"string","description":"The customer-facing code. Regardless of case, this code must be unique across all promotion codes on your account. If left blank, we will generate one automatically."},"expired":{"type":"boolean","description":"Whether or not this promotion has expired."},"max_redemptions":{"type":"integer","nullable":true,"description":"Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid."},"redeem_by":{"type":"integer","nullable":true,"description":"Date after which the coupon can no longer be redeemed."}}},{"$ref":"#/components/schemas/model_metadata"}]},"promotion_body":{"allOf":[{"$ref":"#/components/schemas/promotion_base"},{"properties":{"coupon":{"type":"string","description":"The UUID of the coupon."}}}]},"promotion_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/promotion_base"},{"properties":{"archived_at":{"type":"integer","nullable":true,"description":"Time at which the object was archived. Measured in seconds since the Unix epoch."},"coupon":{"type":"expandable","description":"The associated coupon."},"expired":{"type":"boolean","description":"Taking into account the above properties, whether this promotion can still be used."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"purchase_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"live_mode":{"type":"boolean","description":"Set to `true` if this purchase is in live mode, and set to `false` if it is in test mode."},"quantity":{"type":"integer","description":"The quantity of products purchased."},"revoked":{"type":"boolean","description":"Whether or not this purchase is revoked."},"revoked_at":{"type":"integer","nullable":true,"description":"Time at which the purchase was revoked. Measured in seconds since the Unix epoch."},"customer":{"type":"expandable","description":"The associated customer."},"license":{"type":"expandable","description":"The associated license."},"line_items":{"type":"expandable","description":"The associated line items."},"product":{"type":"expandable","description":"The associated product."},"refund":{"type":"expandable","description":"The associated refund."},"subscription":{"type":"expandable","description":"The associated subscription."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"refund_base":{"allOf":[{"properties":{"amount":{"type":"integer","description":"The amount in cents that was refunded, represented as a whole integer. For example `9900` is equivalent to `$99`."},"reason":{"type":"string","description":"The reason for this refund, which can be one of `duplicate`, `fraudulent`, `requested_by_customer`, or `expired_uncaptured_charge`."}}},{"$ref":"#/components/schemas/model_metadata"}]},"refund_body":{"allOf":[{"$ref":"#/components/schemas/refund_base"},{"properties":{"charge":{"type":"string","description":"The UUID of the charge."},"revoked_purchases":{"type":"array","description":"An array of UUIDs of the purchases that should be revoked when this refund succeeds."}}}]},"refund_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/refund_base"},{"properties":{"charge":{"type":"expandable","description":"The associated charge."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase."},"customer":{"type":"expandable","description":"The associated customer."},"external_refund_id":{"type":"string","description":"The external processor ID representing this refund."},"failure_reason":{"type":"string","nullable":true,"description":"The reason this refund failed, which can currently only be `insufficient_funds`."},"live_mode":{"type":"boolean","description":"Set to `true` if this refund is in live mode, and set to `false` if it is in test mode."},"revoked_purchases":{"type":"expandable","description":"The associated purchases that will be revoked when this refund succeeds."},"status":{"type":"string","description":"The current status of this refund, which can be one of `pending`, `succeeded`, `failed`, or `canceled`."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"list_response":{"type":"object","properties":{"object":{"type":"string","description":"A str
1ing describing the object type returned."},"pagination":{"type":"object","properties":{"count":{"type":"integer","description":"The total number of items."},"limit":{"type":"integer","description":"The number of items per page. The default is `20` and the maximum is `100`."},"page":{"type":"integer","description":"The current page."}}},"data":{"type":"array","description":"An array of objects."}}},"model_destroy_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"deleted":{"type":"boolean","description":"Whether or not this object was succesfully deleted."}}}]},"model_identifiers":{"properties":{"id":{"type":"string","nullable":true,"description":"The UUID of the specific object."},"object":{"type":"string","description":"A string describing the object type returned."}}},"model_metadata":{"properties":{"metadata":{"type":"object","description":"Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format."}}},"model_timestamps":{"properties":{"created_at":{"type":"integer","nullable":true,"description":"Time at which the object was created. Measured in seconds since the Unix epoch."},"updated_at":{"type":"integer","nullable":true,"description":"Time at which the object was last updated. Measured in seconds since the Unix epoch."}}},"stats_response":{"type":"object","properties":{"object":{"type":"string","description":"A string describing the object type returned."},"query":{"type":"object","properties":{"currency":{"type":"string","description":"The currency that is set for the query."},"end_at":{"type":"integer","description":"The end of the date range for the query."},"interval":{"type":"string","description":"The interval that is set for the query."},"start_at":{"type":"integer","description":"The start of the date range for the query."}}},"data":{"type":"array","description":"An array of objects."}}},"subscription_base":{"allOf":[{"properties":{"ad_hoc_amount":{"type":"integer","nullable":true,"description":"The amount to use for this subscription when the associated price is `ad_hoc=true`."},"cancel_at_period_end":{"type":"boolean","description":"If the subscription is set to cancel at the end of the current period. You can use this attribute to determine whether a subscription that has a `status` of `active` is scheduled to be canceled at the end of the current period."},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. If not set, this value will fallback to the default `Account` currency."},"live_mode":{"type":"boolean","description":"Set to `true` if this subscription is in live mode, and set to `false` if it is in test mode."},"trial_end_at":{"type":"integer","nullable":true,"description":"If the subscription has a trial, the end of that trial."},"quantity":{"type":"integer","description":"The quantity of products being purchased."}}},{"$ref":"#/components/schemas/model_metadata"}]},"subscription_body":{"allOf":[{"$ref":"#/components/schemas/subscription_base"},{"properties":{"customer":{"type":"string","description":"The UUID of the customer."},"discount":{"description":"The parameters of the discount to be applied to this subscription.","allOf":[{"$ref":"#/components/schemas/discount_body"}]},"payment_method":{"type":"string","description":"The UUID of the payment method."},"price":{"type":"string","description":"The UUID of the price."},"purge_pending_update":{"type":"boolean","description":"When set to `true` the `pending_update` will be cleared."}}}]},"subscription_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/subscription_base"},{"properties":{"current_period_end_at":{"type":"integer","nullable":true,"description":"End of the current period that the subscription is in. At the end of this period, a new period will be created. This will be `null` when the subscription has a one-time price."},"current_period_start_at":{"type":"integer","nullable":true,"description":"Start of the current period that the subscription is in."},"end_behavior":{"type":"string","description":"The behavior after the subscription\'s final renewal period. One of `cancel` or `complete`."},"ended_at":{"type":"integer","nullable":true,"description":"If the subscription has ended, the date the subscription ended."},"pending_update":{"type":"object","properties":{"price":{"type":"string","description":"The UUID of the price this subscription will be updated to at the end of the current period."},"quantity":{"type":"integer","description":"The quantity of products being purchased at the end of the current period."}}},"remaining_period_count":{"type":"integer","nullable":true,"description":"The number of periods remaining before this subscription ends."},"status":{"type":"string","description":"The current status of this subscription, which can be one of `incomplete`, `trialing`, `active`, `past_due`, `canceled`, or `completed`."},"current_period":{"type":"expandable","description":"The associated current period."},"customer":{"type":"expandable","description":"The associated customer."},"discount":{"type":"expandable","description":"The associated discount."},"payment_method":{"type":"expandable","description":"The associated payment method."},"periods":{"type":"expandable","description":"The associated periods."},"price":{"type":"expandable","description":"The associated price."},"purchase":{"type":"expandable","description":"The associated purchase."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"subscription_protocol_body":{"properties":{"cancel_behavior":{"type":"string","description":"Controls how subscription cancellations should be handled \u2013 one of `immediate` or `pending`."},"downgrade_behavior":{"type":"string","description":"Controls how subscription changes should be handled when downgrading \u2013 one of `immediate` or `pending`."},"payment_retry_window_weeks":{"type":"integer","description":"The number of weeks to retry failed subscription payments before canceling the subscription."},"upgrade_behavior":{"type":"string","description":"Controls how subscription changes should be handled when upgrading \u2013 one of `immediate` or `pending`."}}},"subscription_protocol_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/subscription_protocol_body"},{"$ref":"#/components/schemas/model_timestamps"}]},"tax_identifier_body":{"properties":{"number":{"type":"string","nullable":true,"description":"The tax ID number."},"number_type":{"type":"string","description":"The type of tax ID number."}}},"tax_identifier_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/tax_identifier_body"},{"properties":{"eu_vat_verified":{"type":"boolean","description":"Whether or not this a verified EU VAT number based on regex validation and an attempted VIES check."}}
1},{"$ref":"#/components/schemas/model_timestamps"}]},"tax_protocol_base":{"properties":{"ca_tax_enabled":{"type":"boolean","description":"If set to `true` GST taxes will be calculated for all Canadian provinces."},"eu_micro_exemption_enabled":{"type":"boolean","description":"If set to `true` VAT taxes will be calculated using the account\'s home country VAT rate."},"eu_tax_enabled":{"type":"boolean","description":"If set to `true` VAT taxes will be calculated for all EU countries."},"tax_enabled":{"type":"boolean","description":"If set to `true` taxes will be automatically calculated."},"eu_vat_required":{"type":"boolean","description":"Whether or not an `eu_vat` tax identifier is required when a customer\'s address is in the EU."},"eu_vat_unverified_behavior":{"type":"string","description":"Determines how `eu_vat` tax identifiers will be handled when they are not verified against VIES. One of `apply_reverse_charge`, `error`, or `skip_reverse_charge`."},"eu_vat_local_reverse_charge":{"type":"boolean","description":"Whether or not reverse charge should be applied when the customer\'s address is in the same country as the tax protocol address."}}},"tax_protocol_body":{"allOf":[{"$ref":"#/components/schemas/tax_protocol_base"},{"properties":{"address":{"description":"The associated address used for tax calculations","allOf":[{"$ref":"#/components/schemas/address_body"}]},"ca_tax_identifier":{"description":"The tax identifier to be used for all Canadian provinces.","allOf":[{"$ref":"#/components/schemas/tax_identifier_body"}]},"eu_tax_identifier":{"description":"The tax identifier to be used for all EU countries.","allOf":[{"$ref":"#/components/schemas/tax_identifier_body"}]}}}]},"tax_protocol_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/tax_protocol_base"},{"properties":{"address":{"type":"expandable","description":"The associated address used for tax calculations."},"ca_tax_identifier":{"type":"expandable","description":"The associated Canadian tax identifier."},"eu_tax_identifier":{"type":"expandable","description":"The associated EU tax identifier."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"tax_registration_body":{"properties":{"tax_identifier":{"description":"The tax identifier to set for this tax registration.","allOf":[{"$ref":"#/components/schemas/tax_identifier_body"}]},"tax_zone":{"type":"string","description":"The UUID of the tax zone."}}},"tax_registration_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/tax_registration_body"},{"properties":{"tax_identifier":{"type":"expandable","description":"The associated tax identifier."},"tax_zone":{"type":"expandable","description":"The associated tax_zone."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"tax_zone_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"average_rate":{"type":"number","description":"The average tax rate for state/province and local tax across all postal codes in the tax zone."},"average_rate_label":{"type":"string","description":"The label used to describe the average tax rate."},"country":{"type":"string","description":"The country code."},"country_name":{"type":"string","description":"The full country name."},"minimum_rate":{"type":"number","description":"The state/province tax rate for the tax zone."},"minimum_rate_label":{"type":"string","description":"The label used to describe the minimum tax rate."},"state":{"type":"string","description":"The state/province code."},"state_name":{"type":"string","description":"The full state/province name."}}},{"$ref":"#/components/schemas/model_timestamps"}]},"user_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"properties":{"email":{"type":"string","description":"The email address of the user."},"first_name":{"type":"string","description":"The first name of the user."},"last_name":{"type":"string","description":"The last name of the user."}}},{"$ref":"#/components/schemas/model_timestamps"}]}
1,"webhook_endpoint_body":{"properties":{"description":{"type":"string","nullable":true,"description":"An optional description of what this webhook endpoint is used for."},"destination":{"type":"string","nullable":true,"description":"The integration that this webhook is pointed at \u2013 only acceptable value now is `wordpress`."},"enabled":{"type":"boolean","description":"Whether or not this webhook endpoint is active."},"url":{"type":"string","description":"The URL of this webhook endpoint."}}},"webhook_endpoint_response":{"allOf":[{"$ref":"#/components/schemas/model_identifiers"},{"$ref":"#/components/schemas/webhook_endpoint_body"},{"properties":{"signing_secret":{"type":"string","description":"The webhook endpoint\u2019s signing secret, used to generate webhook signatures."}}},{"$ref":"#/components/schemas/model_timestamps"}]}}},"tags":[{"name":"Abandonded Checkouts","description":"An abandonded checkout represents a customer\'s most recent incomplete checkout."},{"name":"Accounts","description":"This is an object representing a SureCart account. You can retrieve it to see properties on the account like it\'s current - name or default currency."},{"name":"Activations","description":"An activation represents a single use of a license."},{"name":"Activations (Public)","description":"These are activation endpoints which are publicly accessible - they do not require an API token."},{"name":"Balances","description":"Each customer has a balance value for each currency, which denotes a debit or credit that\'s automatically applied to their next invoice upon finalization."},{"name":"Balance Transactions","description":"You may modify a customer\'s balance by creating a balance transaction, which increments or decrements the customer\'s balance by the specified amount."},{"name":"Brands","description":"A brand represents the design and branding settings for an account."},{"name":"Charges","description":"A Charge represents a credit or debit card transaction that was captured through one of your processors. Only succesfully captured charges are recorded in SureCart."},{"name":"Checkouts","description":"A checkout represents a collection of one-time and/or subscription products that a customer intends to purchase."},{"name":"Coupons","description":"A coupon contains information about a percent-off or amount-off discount. \\n\\nThe coupon object can be used to discount either one-time payments or subscriptions. There are some additional parameters that apply to subscriptions, but are not applicable to one-time payments, such as duration. Regardless of what duration is set to, it only applies once for one-time payments."},{"name":"Customers","description":"Customer objects allow you to perform recurring charges, and to track multiple charges, that are associated with the same customer."},{"name":"Customer Links","description":"Customer links are temporary \\"magic links\\" that allow access to customers through email lookup. They provide a secure way of granting access to a customer without having the customer ID.\\n\\nEach customer link is valid for the greater of 1 hour after it\'s `created_at` time or 1 hour after it\'s `first_used_at` time. This means that if a customer link is not used within the first hour it expires. If a customer link is used within the first hour then it is valid for another hour starting from the time it was first used. So, a customer link that is used 30min after it\'s created will be valid for a total of 1hr 30min."},{"name":"Customer Notification Protocols","description":"A customer notification protocol represents the customer notification settings for an account."},{"name":"Downloads","description":"Downloads represent the medias that can be downloaded when a specific product is purchased."},{"name":"Events","description":"Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new `Event` object. For example, when a subscription updates, we create a `subscription.updated` event."},{"name":"Licenses","description":"A license represents permission for a customer to use a specific product. Each license has an auto-generated `key` which can be used with the public license endpoints."}
1,{"name":"Licenses (Public)","description":"These are license endpoints which are publicly accessible - they do not require an API token."},{"name":"Medias","description":"Medias represent files that are hosted on our servers. Medias are uploaded directly to the underlying hosting service. To learn more about how medias work, please contact support."},{"name":"Orders","description":"An order is a customer\u2019s completed request to purchase one or more products. An order is created when a checkout is paid."},{"name":"Order Protocols","description":"A order protocol represents the order settings for an account."},{"name":"Payment Intents","description":"A payment intent represents the process of collecting a payment method from your customer."},{"name":"Payment Methods","description":"Payment method objects represent your customer\'s payment instruments."},{"name":"Portal Protocols","description":"A portal protocol represents the customer portal settings for an account."},{"name":"Prices","description":"Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. \\n\\nThis approach lets you change prices without having to change your provisioning scheme. For example, you might have a single \\\\\\"gold\\\\\\" product that has prices for $10/month, $100/year, and \u20ac9 once."},{"name":"Processors","description":"A processor represents a connection to a third-party payment processor like Stripe."},{"name":"Product Groups","description":"A group of related products \u2013 used to configure which products a customer can switch between when updating a subscription."},{"name":"Products","description":"Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. They can be used in conjunction with Prices to configure pricing and Subscriptions."},{"name":"Promotions","description":"A Promotion represents a customer-redeemable code for a coupon. It can be used to create multiple codes for a single coupon."},{"name":"Purchases","description":"A purchase represents a specific product that a customer has paid for (one-time products), or is currently paying for (recurring products via a subscription). The purchase model is a summary of all products that a customer current should have \\"access\\" to."},{"name":"Refunds","description":"Refund objects allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged."},{"name":"Statistics","description":"A group of endpoints that provide high level statistics on resources."},{"name":"Subscriptions","description":"A Subscription represents a recurring schedule to charge a customer on one of your processors."},{"name":"Subscription Protocols","description":"A subscription protocol represents the subscription settings for an account."},{"name":"Tax Registrations","description":"A tax registration represents a tax zone that is enabled for an account. Taxes will not be calculated for checkouts within a tax zone unless a matching tax registration exists."},{"name":"Tax Protocols","description":"A tax protocol represents the tax settings for an account."},{"name":"Tax Zones","description":"A tax zone represents a geographic area (country and state combinations) that taxes can be calculated for."},{"name":"Webhook Endpoints","description":"You can configure webhook endpoints via the API to be notified about events that happen in your SureCart account.\\n\\nMost users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints."}],"paths":{"/v1/abandoned_checkouts":{"get":{"summary":"List","tags":["Abandonded Checkouts"],"operationId":"list_abandonded_checkout","description":"Returns a list of your abandonded checkouts.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"status[]","in":"query","description":"Only return objects with the given status.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/abandoned_checkouts"},"data":[{"id":"c783d76b-cc3f-4066-b9ea-19ea428e2dd3","object":"abandoned_checkout","notification_status":"not_sent","status":"not_notified","customer":"474ab453-5237-4a92-98ef-eb2949be9c36","latest_recoverable_checkout":"7e0d7952-822d-4301-be9d-4065002b8ae6","created_at":1660688548,"updated_at":1660689448}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/abandoned_checkouts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Abandonded Checkouts"],"operationId":"retrieve_abandonded_checkout","description":"Retrieves details of a specific abandonded checkout.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"4b572a24-cf45-4e6e-8954-7413213663c3","object":"abandoned_checkout","notification_status":"not_sent","status":"not_notified","customer":"75a26a19-6b90-4d61-b270-0e2640a7eb41","latest_recoverable_checkout":"d93f2038-dd42-4122-91ee-355334d7a2a7","created_at":1660688548,"updated_at":1660689448},"schema":{"$ref":"#/components/schemas/abandoned_checkout_response"}}}}}}},"/v1/account":{"get":{"summary":"Retrieve","tags":["Accounts"],"operationId":"retrieve_account","description":"Retrieves details of the current account.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"7d8e85f7-180f-4cee-a11e-0fa976bdec91","object":"account","currency":"usd","medias_byte_size":0,"name":"Test Account","time_zone":"Etc/UTC","url":null,"entitlements":{"abandoned_checkouts":false,"licensing":false,"payment_failure_notifications":false,"subscription_reminder_notifications":false,"webhook_endpoint_creation":false},"brand":"b812bbd2-d4cb-49e3-962c-495fe2f33131","customer_notification_protocol":"4fb16e50-bc7d-4404-82e0-4d830fa8cb7a","owner":"8a8dbe14-d907-4eb6-990b-20cf87f0389d","order_protocol":"c05ea780-50b3-4743-b5c7-ff8c68fc432e","portal_protocol":"d633e19f-ac92-4b2e-95ff-eb4a22d5b67f","processors":[{"live_mode":true,"processor_data":{"account_id":"external_account_3","publishable_key":"pk_test_123"},"processor_type":"stripe","recurring_enabled":true},{"live_mode":false,"processor_data":{"account_id":"external_account_3","publishable_key":"pk_test_123"},"processor_type":"stripe","recurring_enabled":true}],"subscription_protocol":"ac882fa3-657c-4073-b337-4fe9a9434fdf","tax_protocol":"85b7a128-762b-49b5-99dd-02f2a545d942","coupons_updated_at":1660689449,"products_updated_at":1660689449,"created_at":1660689449,"updated_at":1660689449},"schema":{"$ref":"#/components/schemas/account_response"}}}}}},"patch":{"summary":"Update","tags":["Accounts"],"operationId":"update_account","description":"Updates the current account.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"00a026fb-1375-47b2-ac80-6973551fad66","object":"account","currency":"aud","medias_byte_size":0,"name":"New Account Name","time_zone":"Etc/UTC","url":null,"entitlements":{"abandoned_checkouts":false,"licensing":false,"payment_failure_notifications":false,"subscription_reminder_notifications":false,"webhook_endpoint_creation":false},"brand":"8c0b720a-0b58-461d-995c-5cdf4cb72fab","customer_notification_protocol":"34dd1a63-0af0-4ab7-b6a3-96e65e973232","owner":"16eb526d-a59f-44fc-8ab6-dcb09c777b30","order_protocol":"30f42f0d-0efb-4e9d-a969-92846aeb977d","portal_protocol":"413b86da-4dfc-415c-ae22-3fdfb30c6b55","processors":[{"live_mode":true,"processor_data":{"account_id":"external_account_4","publishable_key":"pk_test_123"},"processor_type":"stripe","recurring_enabled":true},{"live_mode":false,"processor_data":{"account_id":"external_account_4","publishable_key":"pk_test_123"},"processor_type":"stripe","recurring_enabled":true}
1],"subscription_protocol":"db29354b-f6ab-4a71-a01b-9f6aa155a17a","tax_protocol":"be492d81-7621-41e6-add5-e04f8c19d139","coupons_updated_at":1660689449,"products_updated_at":1660689449,"created_at":1660689449,"updated_at":1660689449},"schema":{"$ref":"#/components/schemas/account_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"allOf":[{"$ref":"#/components/schemas/account_body"}]}},"example":{"account":{"name":"New Account Name","currency":"aud"}}}}}}}},"/v1/activations":{"get":{"summary":"List","tags":["Activations"],"operationId":"list_activation","description":"Returns a list of your activations.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"license_ids[]","in":"query","description":"Only return objects that belong to the given licenses.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/activations"},"data":[{"id":"84e80b34-ec99-451b-be67-a9b1ef945d77","object":"activation","name":null,"fingerprint":"example.com","license":"83fc8fa1-54a1-4f54-a400-566cea11ac76","created_at":1660689449,"updated_at":1660689449}
1]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Activations"],"operationId":"create_activation","description":"Creates a new activation.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"10fa8017-6061-4ae4-8f5b-4c3813672cda","object":"activation","name":"My Site","fingerprint":"mysite.com","license":"b16b311d-42bc-42a9-b443-0e43bb0d4b16","created_at":1660689450,"updated_at":1660689450},"schema":{"$ref":"#/components/schemas/activation_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"activation":{"allOf":[{"$ref":"#/components/schemas/activation_body"}]}},"example":{"activation":{"name":"My Site","fingerprint":"mysite.com","license_id":"b16b311d-42bc-42a9-b443-0e43bb0d4b16"}}}}}}}},"/v1/activations/{id}":{"get":{"summary":"Retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations"],"operationId":"retrieve_activation","description":"Retrieves details of a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"e2d3d92a-0ec0-4c3c-a77c-417b4491dbc2","object":"activation","name":null,"fingerprint":"example.com","license":"58d9930d-70d6-4d9f-80ff-abbca724f127","created_at":1660689450,"updated_at":1660689450},"schema":{"$ref":"#/components/schemas/activation_response"}}}}}},"patch":{"summary":"Update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations"],"operationId":"update_activation","description":"Updates a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"d7547205-5749-401d-8e9d-3a80682ec4ae","object":"activation","name":"New Activation Name","fingerprint":"example.com","license":"8dbb1897-4d86-45b1-a3e0-2f6cd7372ea9","created_at":1660689451,"updated_at":1660689451},"schema":{"$ref":"#/components/schemas/activation_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"activation":{"allOf":[{"$ref":"#/components/schemas/activation_body"}]}},"example":{"activation":{"name":"New Activation Name"}}}}}}},"delete":{"summary":"Delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations"],"operationId":"delete_activation","description":"Deletes a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"7bd5886b-2199-43ee-9c1f-7020abe9cb7f","object":"activation","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/balance_transactions":{"get":{"summary":"List","tags":["Balance Transactions"],"operationId":"list_balance_transaction","description":"Returns a list of your balance transactions.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/balance_transactions"},"data":[{"id":"5bc5c27d-8a1a-4bed-9aad-4c81cf5f99c6","object":"balance_transaction","amount":2000,"currency":"usd","ending_balance_amount":0,"transaction_type":"adjustment","balance":"35c49835-9b89-46d8-b70b-9eb8b44845ff","customer":"ca124abe-4ba4-466d-a756-475358bdbf0d","checkout":null,"created_at":1660689451,"updated_at":1660689451}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Balance Transactions"],"operationId":"create_balance_transaction","description":"Creates a new balance transaction.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"49d28215-ab33-4ec4-9360-80a92b48c4c0","object":"balance_transaction","amount":5000,"currency":"usd","ending_balance_amount":5000,"transaction_type":"adjustment","balance":"3b896b76-f66f-4f91-b6ac-392e57345119","customer":"09f03e40-cc03-4db1-9e4d-51cde2e9e45b","checkout":null,"created_at":1660689451,"updated_at":1660689451},"schema":{"$ref":"#/components/schemas/balance_transaction_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"balance_transaction":{"allOf":[{"$ref":"#/components/schemas/balance_transaction_body"}]}},"example":{"balance_transaction":{"amount":5000,"currency":"usd","customer":"09f03e40-cc03-4db1-9e4d-51cde2e9e45b"}}}}}}}},"/v1/balance_transactions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Balance Transactions"],"operationId":"retrieve_balance_transaction","description":"Retrieves details of a specific balance transaction.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"0bef7b0f-6e39-46e3-b5ed-5dbb4af615de","object":"balance_transaction","amount":2000,"currency":"usd","ending_balance_amount":0,"transaction_type":"adjustment","balance":"43c8fcd4-bef3-475c-81b5-92a5f92fd94a","customer":"225c2fdd-f09b-435b-9068-52a2675e8a25","checkout":null,"created_at":1660689451,"updated_at":1660689451},"schema":{"$ref":"#/components/schemas/balance_transaction_response"}}}}}}},"/v1/balances":{"get":{"summary":"List","tags":["Balances"],"operationId":"list_balance","description":"Returns a list of your balances.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"currency[]","in":"query","description":"Only return objects that have the given currencies.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/balances"},"data":[{"id":"2b13fef3-473d-47a7-8253-b9264c5e6414","object":"balance","amount":0,"currency":"usd","customer":"d3b52fb0-fd59-4dc4-ab86-488440865fb1","created_at":1660689452,"updated_at":1660689452}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/brand":{"get":{"summary":"Retrieve","tags":["Brands"],"operationId":"retrieve_brand","description":"Retrieves details of the current account\'s brand.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"bc3bed59-174c-44ce-8aed-37a9bb2eb925","object":"brand","color":"1e40af","email":null,"phone":null,"website":null,"address":null,"logo":null,"logo_url":null,"created_at":1660689452,"updated_at":1660689452},"schema":{"$ref":"#/components/schemas/brand_response"}}}}}},"patch":{"summary":"Update","tags":["Brands"],"operationId":"update_brand","description":"Updates the current account\'s brand.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"68f2ba52-42c9-42c9-b1d7-94887994e358","object":"brand","color":"1D2B39","email":null,"phone":null,"website":null,"address":null,"logo":null,"logo_url":null,"created_at":1660689452,"updated_at":1660689452},"schema":{"$ref":"#/components/schemas/brand_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"allOf":[{"$ref":"#/components/schemas/brand_body"}]}},"example":{"brand":{"color":"1D2B39"}}}}}}}},"/v1/charges":{"get":{"summary":"List","tags":["Charges"],"operationId":"list_charge","description":"Returns a list of your charges.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/charges"},"data":[{"id":"3480597f-56ea-4ee5-b065-db02afe06ca6","object":"charge","amount":2900,"currency":"usd","external_charge_id":"ch_1_JHbBH2fs4LLhxzS5hiaHRLN","fully_refunded":false,"live_mode":true,"refunded_amount":0,"status":"pending","customer":"7b6c3005-e4cc-476c-8e16-587dabbcedee","checkout":null,"payment_intent":"076f720d-282a-430a-953a-9ff0cf65857c","payment_method":null,"created_at":1660689452,"updated_at":1660689452}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/charges/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Charges"],"operationId":"retrieve_charge","description":"Retrieves details of a specific charge.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"5efdc8e1-90e5-46f3-a0d4-f122faa036fb","object":"charge","amount":2900,"currency":"usd","external_charge_id":"ch_2_JHbBH2fs4LLhxzS5hiaHRLN","fully_refunded":false,"live_mode":true,"refunded_amount":0,"status":"pending","customer":"0a859a06-f6b2-4d2b-a4f1-5fff87e5e711","checkout":null,"payment_intent":"7256de51-c053-43ee-a88c-a0d622264aa1","payment_method":null,"created_at":1660689452,"updated_at":1660689452},"schema":{"$ref":"#/components/schemas/charge_response"}}}}}}}
1,"/v1/checkouts":{"get":{"summary":"List","tags":["Checkouts"],"operationId":"list_checkout","description":"Returns a list of your checkouts.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"status[]","in":"query","description":"Only return objects with the given status.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"group_keys[]","in":"query","description":"Only return objects with the given group keys.","required":false,"schema":{"type":"array"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/checkouts"},"data":[{"id":"f810183e-d9d4-4014-b3e4-f5ce223116ce","object":"checkout","abandoned_checkout_enabled":true,"amount_due":2900,"applied_balance_amount":0,"credited_balance_amount":0,"currency":"usd","discount_amount":0,"email":"[email protected]","full_amount":2900,"group_key":null,"live_mode":true,"metadata":{},"name":null,"paid_at":null,"payment_method_required":true,"processor_data":{"paypal":null,"stripe":null},"proration_amount":0,"reusable_payment_method_required":false,"shipping_enabled":false,"status":"draft","subtotal_amount":2900,"tax_amount":0,"tax_exclusive_amount":0,"tax_label":null,"tax_inclusive_amount":0,"tax_percent":0,"tax_status":"disabled","total_amount":2900,"trial_amount":0,"billing_address":null,"charge":null,"customer":"2cbef0fb-8c85-4a0d-8d6d-e6e6ef68a587","discount":null,"order":null,"payment_intent":null,"payment_method":null,"shipping_address":null,"tax_identifier":null,"number":null,"statement_url":null,"created_at":1660689452,"updated_at":1660689452}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Checkouts"],"operationId":"create_checkout","description":"Creates a new checkout.","parameters":[{"name":"stage_processor_type","in":"query","description":"The processor to use when staging a payment intent for this object. The only allowed processors right now are `stripe` and `paypal`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"1599da60-0941-4989-94f6-eca595bc4a89","object":"checkout","abandoned_checkout_enabled":true,"amount_due":0,"applied_balance_amount":0,"credited_balance_amount":0,"currency":"usd","discount_amount":0,"email":"[email protected]","full_amount":0,"group_key":null,"live_mode":true,"metadata":{},"name":null,"paid_at":null,"payment_method_required":false,"processor_data":{"paypal":null,"stripe":null},"proration_amount":0,"reusable_payment_method_required":false,"shipping_enabled":false,"status":"draft","subtotal_amount":0,"tax_amount":0,"tax_exclusive_amount":0,"tax_label":null,"tax_inclusive_amount":0,"tax_percent":0,"tax_status":"disabled","total_amount":0,"trial_amount":0,"billing_address":null,"charge":null,"customer":"46a43d6d-48ba-4e46-a73c-0edb4e2a1f9f","discount":null,"order":null,"payment_intent":null,"payment_method":null,"shipping_address":null,"tax_identifier":null,"number":null,"statement_url":null,"created_at":1660689452,"updated_at":1660689452},"schema":{"$ref":"#/components/schemas/checkout_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"checkout":{"allOf":[{"$ref":"#/components/schemas/checkout_body"}]}},"example":{"checkout":{"email":"[email protected]"}}}}}}}}
1,"/v1/checkouts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","parameters":[{"name":"refresh_status","in":"query","description":"If true, the server will check the associated payment processor to see if a status change has occured. This is only applicable when the checkout is in the `finalized` state. (This should be used when retrieving a checkout immediately after it has been paid through the processor. In this scenario, it\'s possible that you\'ll request the checkout before the server has received the webhook from the processor. Setting this pararmeter to `true` prevents this scenario.)","required":false,"schema":{"type":"boolean"}}],"tags":["Checkouts"],"operationId":"retrieve_checkout","description":"Retrieves details of a specific checkout.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"9dfa80f4-6c8c-4162-8796-ffe4ad7e8d97","object":"checkout","abandoned_checkout_enabled":true,"amount_due":2900,"applied_balance_amount":0,"credited_balance_amount":0,"currency":"usd","discount_amount":0,"email":"[email protected]","full_amount":2900,"group_key":null,"live_mode":true,"metadata":{},"name":null,"paid_at":null,"payment_method_required":true,"processor_data":{"paypal":null,"stripe":null},"proration_amount":0,"reusable_payment_method_required":false,"shipping_enabled":false,"status":"draft","subtotal_amount":2900,"tax_amount":0,"tax_exclusive_amount":0,"tax_label":null,"tax_inclusive_amount":0,"tax_percent":0,"tax_status":"disabled","total_amount":2900,"trial_amount":0,"billing_address":null,"charge":null,"customer":"c6a58c2b-4881-482b-a8cc-1c27eb70908f","discount":null,"order":null,"payment_intent":null,"payment_method":null,"shipping_address":null,"tax_identifier":null,"number":null,"statement_url":null,"created_at":1660689452,"updated_at":1660689452},"schema":{"$ref":"#/components/schemas/checkout_response"}}}}}},"patch":{"summary":"Update","tags":["Checkouts"],"operationId":"update_checkout","description":"Updates a specific checkout.","parameters":[{"name":"stage_processor_type","in":"query","description":"The processor to use when staging a payment intent for this object. The only allowed processors right now are `stripe` and `paypal`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"dfbb7898-2858-41bf-b24a-3e1d2a451808","object":"checkout","abandoned_checkout_enabled":true,"amount_due":2900,"applied_balance_amount":0,"credited_balance_amount":0,"currency":"usd","discount_amount":0,"email":"[email protected]","full_amount":2900,"group_key":null,"live_mode":true,"metadata":{},"name":null,"paid_at":null,"payment_method_required":true,"processor_data":{"paypal":null,"stripe":null},"proration_amount":0,"reusable_payment_method_required":false,"shipping_enabled":false,"status":"draft","subtotal_amount":2900,"tax_amount":0,"tax_exclusive_amount":0,"tax_label":null,"tax_inclusive_amount":0,"tax_percent":0,"tax_status":"disabled","total_amount":2900,"trial_amount":0,"billing_address":null,"charge":null,"customer":"cdda3b9d-d65a-46d3-b55a-c02ef8a27cea","discount":null,"order":null,"payment_intent":null,"payment_method":null,"shipping_address":null,"tax_identifier":null,"number":null,"statement_url":null,"created_at":1660689453,"updated_at":1660689453},"schema":{"$ref":"#/components/schemas/checkout_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"checkout":{"allOf":[{"$ref":"#/components/schemas/checkout_body"}]}},"example":{"checkout":{"email":"[email protected]","line_items":[{"price_id":"1d8afa32-5084-4d69-aaa0-81be72665276","quantity":1}]}}}}}}}},"/v1/checkouts/{id}/finalize":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Finalize","parameters":[{"name":"payment_intent_id","in":"query","description":"The payment intent to use when finalizing this object. If set, this will take priority over the `processor_type` parameter.","required":false,"schema":{"type":"string"}},{"name":"processor_type","in":"query","description":"The processor to use when finalizing this object. The only allowed processors right now are `stripe` and `paypal`.","required":false,"schema":{"type":"string"}}],"tags":["Checkouts"],"operationId":"finalize_checkout","description":"Finalizes a specific checkout before it can be paid. If succesfull, this will return an associated `PaymentIntent` with the necessary information to capture the payment via the specific processor.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"43ac9235-d08a-4022-821f-30068c27891f","object":"checkout","abandoned_checkout_enabled":true,"amount_due":2900,"applied_balance_amount":0,"credited_balance_amount":0,"currency":"usd","discount_amount":0,"email":"[email protected]","full_amount":2900,"group_key":null,"live_mode":true,"metadata":{},"name":null,"paid_at":null,"payment_method_required":true,"processor_data":{"paypal":null,"stripe":{"account_id":"external_account_14","publishable_key":"pk_test_123"}},"proration_amount":0,"reusable_payment_method_required":false,"shipping_enabled":false,"status":"finalized","subtotal_amount":2900,"tax_amount":0,"tax_exclusive_amount":0,"tax_label":null,"tax_inclusive_amount":0,"tax_percent":0,"tax_status":"disabled","total_amount":2900,"trial_amount":0,"billing_address":null,"charge":null,"customer":"e6c3ed04-eb8c-41b7-be0d-76b7d8bde160","discount":null,"order":null,"payment_intent":"017b6eb9-26a1-4b29-b53d-9bb6ce9352bc","payment_method":null,"shipping_address":null,"tax_identifier":null,"number":null,"statement_url":null,"created_at":1660689453,"updated_at":1660689453},"schema":{"$ref":"#/components/schemas/checkout_response"}}}}}}},"/v1/coupons":{"get":{"summary":"List","tags":["Coupons"],"operationId":"list_coupon","description":"Returns a list of your coupons.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/coupons"},"data":[{"id":"1fa7012b-9a30-413e-8cae-90d42b8aa2cd","object":"coupon","amount_off":500,"currency":"usd","duration":"once","duration_in_months":null,"expired":false,"metadata":{},"max_redemptions":null,"name":"Test Coupon","percent_off":null,"redeem_by":null,"times_redeemed":0,"created_at":1660689453,"updated_at":1660689453}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Coupons"],"operationId":"create_coupon","description":"Creates a new coupon.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"c3eb2231-94a1-4889-bd51-c8e36b22ca76","object":"coupon","amount_off":500,"currency":"usd","duration":"once","duration_in_months":null,"expired":false,"metadata":{},"max_redemptions":null,"name":"Test Coupon","percent_off":null,"redeem_by":null,"times_redeemed":0,"created_at":1660689453,"updated_at":1660689453},"schema":{"$ref":"#/components/schemas/coupon_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"coupon":{"allOf":[{"$ref":"#/components/schemas/coupon_body"}]}},"example":{"coupon":{"name":"Test Coupon","amount_off":500}}}}}}}},"/v1/coupons/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Coupons"],"operationId":"retrieve_coupon","description":"Retrieves details of a specific coupon.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"8d999c5c-52e0-4f77-9816-955bf43c84c7","object":"coupon","amount_off":500,"currency":"usd","duration":"once","duration_in_months":null,"expired":false,"metadata":{},"max_redemptions":null,"name":"Test Coupon","percent_off":null,"redeem_by":null,"times_redeemed":0,"created_at":1660689453,"updated_at":1660689453},"schema":{"$ref":"#/components/schemas/coupon_response"}}}}}},"patch":{"summary":"Update","tags":["Coupons"],"operationId":"update_coupon","description":"Updates a specific coupon.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"af76ba18-b57a-43a9-9a04-30fd01496ccb","object":"coupon","amount_off":500,"currency":"usd","duration":"once","duration_in_months":null,"expired":false,"metadata":{},"max_redemptions":null,"name":"Updated Coupon","percent_off":null,"redeem_by":null,"times_redeemed":0,"created_at":1660689453,"updated_at":1660689453},"schema":{"$ref":"#/components/schemas/coupon_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"coupon":{"allOf":[{"$ref":"#/components/schemas/coupon_body"}]}},"example":{"coupon":{"name":"Updated Coupon"}}}}}}},"delete":{"summary":"Delete","tags":["Coupons"],"operationId":"delete_coupon","description":"Deletes a specific coupon.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"3c5b1ec4-58f1-4b1f-b2d9-85eb0dfbd25b","object":"coupon","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/customer_links":{"post":{"summary":"Create","tags":["Customer Links"],"operationId":"create_customer_link","description":"Creates a new customer link.","parameters":[],"responses":{"200":{"description":"Success"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_link":{"allOf":[{"$ref":"#/components/schemas/customer_link_body"}]}}}}}}}},"/v1/customer_links/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Customer Links"],"operationId":"retrieve_customer_link","description":"Retrieves details of a specific customer link.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"a81efc9e-796c-4671-aea4-a85fe0bfa4e3","object":"customer_link","email":"[email protected]","expired":false,"first_used_at":1660689454,"customer":"644ce077-00dc-4977-9535-5f417796ec30","created_at":1660689454,"updated_at":1660689454},"schema":{"$ref":"#/components/schemas/customer_link_response"}}}}}}},"/v1/customer_notification_protocol":{"get":{"summary":"Retrieve","tags":["Customer Notification Protocols"],"operationId":"retrieve_customer_notification_protocol","description":"Retrieves details of the current account\'s customer notification protocol.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"bfcb2436-84f3-46d3-bdc7-eae7301ea14d","object":"customer_notification_protocol","abandoned_checkout_enabled":false,"order_enabled":true,"payment_failure_enabled":true,"purchase_enabled":true,"refund_enabled":true,"subscription_reminder_enabled":false,"from_name":null,"locale":"en","reply_to_email":null,"created_at":1660689454,"updated_at":1660689454},"schema":{"$ref":"#/components/schemas/customer_notification_protocol_response"}}}}}},"patch":{"summary":"Update","tags":["Customer Notification Protocols"],"operationId":"update_customer_notification_protocol","description":"Updates the current account\'s customer notification protocol.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"0346df83-b794-4d54-857f-e689b97b8335","object":"customer_notification_protocol","abandoned_checkout_enabled":false,"order_enabled":true,"payment_failure_enabled":true,"purchase_enabled":true,"refund_enabled":true,"subscription_reminder_enabled":false,"from_name":"Support Team","locale":"en","reply_to_email":"[email protected]","created_at":1660689454,"updated_at":1660689454},"schema":{"$ref":"#/components/schemas/customer_notification_protocol_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_notification_protocol":{"allOf":[{"$ref":"#/components/schemas/customer_notification_protocol_body"}]}},"example":{"customer_notification_protocol":{"from_name":"Support Team","reply_to_email":"[email protected]"}}}}}}}},"/v1/customers":{"get":{"summary":"List","tags":["Customers"],"operationId":"list_customer","description":"Returns a list of your customers.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}},{"name":"license_ids[]","in":"query","description":"Only return objects that belong to the given licenses.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/customers"},"data":[{"id":"b68fd487-6792-45f8-8ec1-cfdbf5b96496","object":"customer","billing_matches_shipping":true,"email":"[email protected]","indexed":true,"live_mode":true,"name":null,"phone":null,"unsubscribed":false,"billing_address":null,"default_payment_method":null,"shipping_address":null,"tax_identifier":null,"created_at":1660689454,"updated_at":1660689454}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Customers"],"operationId":"create_customer","description":"Creates a new customer.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"dc21ed4d-f962-4f6d-9ea7-db44f3a5bf6f","object":"customer","billing_matches_shipping":true,"email":"[email protected]","indexed":true,"live_mode":true,"name":"Test Customer","phone":null,"unsubscribed":false,"billing_address":null,"default_payment_method":null,"shipping_address":null,"tax_identifier":null,"created_at":1660689454,"updated_at":1660689454},"schema":{"$ref":"#/components/schemas/customer_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/customer_body"}]}},"example":{"customer":{"name":"Test Customer","email":"[email protected]"}}}}}}}},"/v1/customers/{id}":{"get":{"summary":"Retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Customers"],"operationId":"retrieve_customer","description":"Retrieves details of a specific customer.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"51465c12-e7e1-4d56-bb6e-3cee0345d605","object":"customer","billing_matches_shipping":true,"email":"[email protected]","indexed":true,"live_mode":true,"name":null,"phone":null,"unsubscribed":false,"billing_address":null,"default_payment_method":null,"shipping_address":null,"tax_identifier":null,"created_at":1660689454,"updated_at":1660689455},"schema":{"$ref":"#/components/schemas/customer_response"}}}}}},"patch":{"summary":"Update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Customers"],"operationId":"update_customer","description":"Updates a specific customer.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"24b6c807-6ae3-480c-bda1-82357bd61666","object":"customer","billing_matches_shipping":true,"email":"[email protected]","indexed":true,"live_mode":true,"name":"Updated Customer","phone":null,"unsubscribed":false,"billing_address":null,"default_payment_method":null,"shipping_address":null,"tax_identifier":null,"created_at":1660689455,"updated_at":1660689455},"schema":{"$ref":"#/components/schemas/customer_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/customer_body"}]}},"example":{"customer":{"name":"Updated Customer"}}}}}}},"delete":{"summary":"Delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Customers"],"operationId":"delete_customer","description":"Deletes a specific customer.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f7dea34c-de68-4848-8f58-52ebefd35d9a","object":"customer","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}}
1,"/v1/customers/{id}/expose/{media_id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Expose Media","parameters":[{"name":"expose_for","in":"query","description":"Sets how long a private media URL should be valid for, in seconds. The max value allowed is `86400` or 24 hours. When exposing a media through a purchase or license the default value is `900` or 15 minutes.","required":false,"schema":{"type":"integer"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Customers"],"operationId":"expose_media_customer","description":"Exposes a specific media that the customer has access to via a purchase.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"63370a69-4cf0-4a1f-9e25-0ece927b31e5","object":"media","byte_size":4091,"content_type":"image/png","extension":"png","filename":"logo.png","public_access":false,"release_json":null,"url":"http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhabmgwTm1adGVqbDBlWFpxYlRFNU1HVTJkMmQ0WW1obk9XNTNlUVk2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpUDJGMGRHRmphRzFsYm5RN0lHWnBiR1Z1WVcxbFBTSnNiMmR2TG5CdVp5STdJR1pwYkdWdVlXMWxLajFWVkVZdE9DY25iRzluYnk1d2JtY0dPd1pVT2hGamIyNTBaVzUwWDNSNWNHVkpJZzVwYldGblpTOXdibWNHT3daVU9oRnpaWEoyYVdObFgyNWhiV1U2Q1hSbGMzUT0iLCJleHAiOiIyMDIyLTA4LTE2VDIyOjUyOjM2LjY5OVoiLCJwdXIiOiJibG9iX2tleSJ9fQ==--f0bffa0269d910f935bac9615996e1c47fbab1c2/logo.png","url_expires_at":1660690356,"created_at":1660689456,"updated_at":1660689456},"schema":{"$ref":"#/components/schemas/media_response"}}}}}}},"/v1/downloads":{"get":{"summary":"List","tags":["Downloads"],"operationId":"list_download","description":"Returns a list of your downloads.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"product_ids[]","in":"query","description":"Only return objects that belong to the given products.","required":false,"schema":{"type":"array"}},{"name":"archived","in":"query","description":"Only return objects that are archived or not archived.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/downloads"},"data":[{"id":"3aadafb3-e61a-48c6-a87e-8a3037c0c346","object":"download","archived":false,"archived_at":null,"media":"8543c92d-18b0-45dc-8f76-0dd7a4ed2d07","product":"fa94da06-12e3-43fb-81ec-a56d928543c3","created_at":1660689456,"updated_at":1660689456}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Downloads"],"operationId":"create_download","description":"Creates a new download.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"a6fc57ae-9d6b-48cb-a28b-858f8d2a3eea","object":"download","archived":false,"archived_at":null,"media":"25fa5c16-2764-4585-a8ea-c7464456116c","product":"f60c1795-66c6-4bae-9492-68f6adf94f70","created_at":1660689456,"updated_at":1660689456},"schema":{"$ref":"#/components/schemas/download_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"download":{"allOf":[{"$ref":"#/components/schemas/download_body"}]}},"example":{"download":{"media":"25fa5c16-2764-4585-a8ea-c7464456116c","product":"f60c1795-66c6-4bae-9492-68f6adf94f70"}}}}}}}},"/v1/downloads/{id}":{"get":{"summary":"Retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Downloads"],"operationId":"retrieve_download","description":"Retrieves details of a specific download.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f7ce3acf-137f-43b2-a436-cd0d8507305f","object":"download","archived":false,"archived_at":null,"media":"67918ed2-cb16-4d0c-be83-55cbdb88f5a2","product":"a23a5491-92ac-4ad0-b511-78eb41e89f13","created_at":1660689457,"updated_at":1660689457},"schema":{"$ref":"#/components/schemas/download_response"}}}}}},"patch":{"summary":"Update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Downloads"],"operationId":"update_download","description":"Updates a specific download.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"3f138fda-bce9-4c2f-b045-c914b12535f0","object":"download","archived":false,"archived_at":null,"media":"3d1c8641-e3a6-485a-a7a0-ce7d2d59b65d","product":"2e573d25-87f6-41b7-bbf5-ceb5404e49ea","created_at":1660689457,"updated_at":1660689457},"schema":{"$ref":"#/components/schemas/download_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"download":{"allOf":[{"$ref":"#/components/schemas/download_body"}]}},"example":{"download":{"enabled":false}}}}}}},"delete":{"summary":"Delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Downloads"],"operationId":"delete_download","description":"Deletes a specific download.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"eb0084ff-3b1e-4b84-aa36-4e31de60ee63","object":"download","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/events":{"get":{"summary":"List","tags":["Events"],"operationId":"list_event","description":"Returns a list of your events.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":3,"limit":20,"page":1,"url":"/v1/events"},"data":[{"id":"2793f34b-18ba-4c0c-9492-7e61cc4cf5ae","object":"event","data":{"object":{"id":"4472dab0-99dd-4647-85e2-661855798adf","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"adce3add-4a69-4615-b845-ca496d940b53","license":null,"product":"00690697-0846-41e3-9cb7-e620990d03ff","refund":null,"subscription":null,"created_at":1660689457,"updated_at":1660689457}},"type":"purchase.created","account":"e2cedcf0-563a-4d29-9729-6920ed6ae15a","created_at":1660689457},{"id":"50f7a0bb-94bc-4618-af90-3254722b39e3","object":"event","data":{"object":{"id":"faa05a84-2745-442c-bfa8-501adcfcba03","object":"order","live_mode":true,"number":"0001","order_type":"checkout","statement_url":"http://localhost:5000/pdf/orders/faa05a84-2745-442c-bfa8-501adcfcba03","status":"paid","checkout":"73058412-4502-4a4c-8a2e-1dfe9269f172","created_at":1660689457,"updated_at":1660689457}},"type":"order.created","account":"e2cedcf0-563a-4d29-9729-6920ed6ae15a","created_at":1660689457},{"id":"a7b0c2b0-b121-4651-8624-53aa98e5c5c2","object":"event","data":{"object":{"id":"8c6b287c-7a89-431e-8949-2dac7e9fa85e","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"adce3add-4a69-4615-b845-ca496d940b53","license":null,"product":"00690697-0846-41e3-9cb7-e620990d03ff","refund":null,"subscription":null,"created_at":1660689457,"updated_at":1660689457}},"type":"purchase.created","account":"e2cedcf0-563a-4d29-9729-6920ed6ae15a","created_at":1660689457}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/events/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Events"],"operationId":"retrieve_event","description":"Retrieves details of a specific event.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"7564e5b9-a17e-459a-befb-9b8d21f88ae2","object":"event","data":{"object":{"id":"6e99232c-55ab-40d7-961f-698456b96638","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"a94e33b1-9e89-4a15-aace-18e7296a7f50","license":null,"product":"e95b18b3-97f4-42b3-a92f-7b88545b1cd6","refund":null,"subscription":null,"created_at":1660689458,"updated_at":1660689458}},"type":"purchase.created","account":"50e76d9b-63c6-46d9-9f02-1e2716e9a09c","created_at":1660689458},"schema":{"$ref":"#/components/schemas/event_response"}}}}}}},"/v1/licenses":{"get":{"summary":"List","tags":["Licenses"],"operationId":"list_license","description":"Returns a list of your licenses.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"purchase_ids[]","in":"query","description":"Only return objects that belong to the given purchases.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"product_ids[]","in":"query","description":"Only return objects that belong to the given products.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/licenses"},"data":[{"id":"4ea4673f-ff7e-4d75-a250-e562229a41f2","object":"license","activation_limit":null,"key":"bfdc8726-232f-4d46-a797-6daade7b2137","status":"inactive","customer":"d0b42c68-99c7-4820-943d-5b79e85955e7","purchase":"97701071-fa01-4767-8e23-0cd957e15d6b","created_at":1660689458,"updated_at":1660689458}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Licenses"],"operationId":"create_license","description":"Creates a new license.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"70f0e559-34f0-41f8-9176-bf94d474e2eb","object":"license","activation_limit":null,"key":"258859b3-4b50-4141-86b9-3d5166fbafb6","status":"inactive","customer":"434cae92-d426-42ad-9b16-85f39dda85c9","purchase":"841d34b2-a3c6-4d15-9dcd-f03cff773942","created_at":1660689459,"updated_at":1660689459},"schema":{"$ref":"#/components/schemas/license_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"license":{"allOf":[{"$ref":"#/components/schemas/license_body"}]}},"example":{"license":{"purchase":"841d34b2-a3c6-4d15-9dcd-f03cff773942"}}}}}}}},"/v1/licenses/{id}":{"get":{"summary":"Retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Licenses"],"operationId":"retrieve_license","description":"Retrieves details of a specific license.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"fe5e355b-b8c7-4b42-a720-15588bddb20e","object":"license","activation_limit":null,"key":"6598cf03-c026-4c99-8f9e-aa20a264a101","status":"inactive","customer":"4ea26780-1706-4d66-a5e3-6c55a3cf7f22","purchase":"e22d74eb-e751-40fe-9c40-ec5d8bf9114c","created_at":1660689459,"updated_at":1660689459},"schema":{"$ref":"#/components/schemas/license_response"}}}}}},"patch":{"summary":"Update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Licenses"],"operationId":"update_license","description":"Updates a specific license.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"411e7ef5-3225-405b-b914-7717064dbc29","object":"license","activation_limit":10,"key":"6a6fcf99-407b-4a02-a981-e85208d01d7a","status":"inactive","customer":"22d9bc68-b981-4a7a-8bd9-8ccf562fad18","purchase":"72026a07-308a-4af9-95b3-d04c3488b1d0","created_at":1660689460,"updated_at":1660689460},"schema":{"$ref":"#/components/schemas/license_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/customer_body"}]}},"example":{"license":{"activation_limit":10}}}}}}},"delete":{"summary":"Delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Licenses"],"operationId":"delete_license","description":"Deletes a specific license.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"dc680ebf-57a3-4f0b-a2aa-b7367efbc986","object":"license","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/medias":{"get":{"summary":"List","tags":["Medias"],"operationId":"list_media","de
1scription":"Returns a list of your medias.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"public_access","in":"query","description":"Only return objects that have public access or private access.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/medias"},"data":[{"id":"5af4f43b-284f-47e2-bfe6-63e8cd4a3573","object":"media","byte_size":4091,"content_type":"image/png","extension":"png","filename":"logo.png","public_access":false,"release_json":null,"url":null,"url_expires_at":null,"created_at":1660689461,"updated_at":1660689461}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Medias"],"operationId":"create_media","description":"Creates a new media.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"64862712-2a96-4fc3-9081-9fb55bbd8ab2","object":"media","byte_size":4091,"content_type":"image/png","extension":"png","filename":"logo.png","public_access":false,"release_json":null,"url":null,"url_expires_at":null,"created_at":1660689461,"updated_at":1660689461},"schema":{"$ref":"#/components/schemas/media_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"media":{"allOf":[{"$ref":"#/components/schemas/media_body"}]}},"example":{"media":{"direct_upload_signed_id":"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWs0TURKak5UY3lOeTB4WTJZd0xUUTFZMlV0T1RWall5MDVObUl5T1Roa1lXVXlZVGdHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6ImJsb2JfaWQifX0=--f30ef448b52dce627d70759d869c40bbd9fdc82e"}}}}}}}},"/v1/medias/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","parameters":[{"name":"expose_for","in":"query","description":"Sets how long a private media URL should be valid for, in seconds. The max value allowed is `86400` or 24 hours. When exposing a media through a purchase or license the default value is `900` or 15 minutes.","required":false,"schema":{"type":"integer"}}],"tags":["Medias"],"operationId":"retrieve_media","description":"Retrieves details of a specific media.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"ed686a1b-23d0-4c17-b458-82e0329b3da9","object":"media","byte_size":4091,"content_type":"image/png","extension":"png","filename":"logo.png","public_access":false,"release_json":null,"url":null,"url_expires_at":null,"created_at":1660689461,"updated_at":1660689461},"schema":{"$ref":"#/components/schemas/media_response"}}}}}},"delete":{"summary":"Delete","tags":["Medias"],"operationId":"delete_media","description":"Deletes a specific media.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"4db13b5f-562e-42fc-acce-b6611037a28c","object":"media","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/order_protocol":{"get":{"summary":"Retrieve","tags":["Order Protocols"],"operationId":"retrieve_order_protocol","description":"Retrieves details of the current account\'s order protocol.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"71bf360c-2145-4982-8669-fad1c250b7a3","object":"order_protocol","footer":null,"memo":null,"number_type":"sequential","number_prefix":null,"created_at":1660689461,"updated_at":1660689461},"schema":{"$ref":"#/components/schemas/order_protocol_response"}}}}}},"patch":{"summary":"Update","tags":["Order Protocols"],"operationId":"update_order_protocol","description":"Updates the current account\'s order protocol.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"b0bbdfec-a69e-4066-bc13-07f695b730a6","object":"order_protocol","footer":"This is some customer footer text...","memo":null,"number_type":"sequential","number_prefix":null,"created_at":1660689461,"updated_at":1660689461},"schema":{"$ref":"#/components/schemas/order_protocol_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"order_protocol":{"allOf":[{"$ref":"#/components/schemas/order_protocol_body"}]}},"example":{"order_protocol":{"footer":"This is some customer footer text..."}}}}}}}},"/v1/orders":{"get":{"summary":"List","tags":["Orders"],"operationId":"list_order","description":"Returns a list of your orders.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"status[]","in":"query","description":"Only return objects with the given status.","required":false,"schema":{"type":"array"}},{"name":"order_type[]","in":"query","description":"Only return orders with the given types.","required":false,"schema":{"type":"array"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":2,"limit":20,"page":1,"url":"/v1/orders"},"data":[{"id":"78133920-38a5-4dfa-889b-4608e73f4671","object":"order","live_mode":true,"number":"0002","order_type":"checkout","statement_url":"http://localhost:5000/pdf/orders/78133920-38a5-4dfa-889b-4608e73f4671","status":"processing","checkout":"509e639f-ac9c-4600-a249-c27f4597421e","created_at":1660689461,"updated_at":1660689461},{"id":"a2418a10-ad3c-48a0-be60-a3aa425e466f","object":"order","live_mode":true,"number":"0001","order_type":"checkout","statement_url":"http://localhost:5000/pdf/orders/a2418a10-ad3c-48a0-be60-a3aa425e466f","status":"paid","checkout":"509e639f-ac9c-4600-a249-c27f4597421e","created_at":1660689461,"updated_at":1660689461}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Orders"],"operationId":"retrieve_order","description":"Retrieves details of a specific order.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"e0994e95-5d1f-477f-9091-6327f5e426b8","object":"order","live_mode":true,"number":"0002","order_type":"checkout","statement_url":"http://localhost:5000/pdf/orders/e0994e95-5d1f-477f-9091-6327f5e426b8","status":"processing","checkout":"98aab23e-1ddb-497f-b4a7-dde1afca2152","created_at":1660689462,"updated_at":1660689462},"schema":{"$ref":"#/components/schemas/order_response"}}}}}}},"/v1/payment_intents":{"get":{"summary":"List","tags":["Payment Intents"],"operationId":"list_payment_intent","description":"Returns a list of your payment intents.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"status[]","in":"query","description":"Only return objects with the given status.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}},{"name":"staged_checkout_ids[]","in":"query","description":"Only return objects that belong to the given staged checkouts.","required":false,"schema":{"type":"array"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/payment_intents"},"data":[{"id":"0867a27a-a077-46a0-8424-7d3aa230248d","object":"payment_intent","amount":500,"currency":"usd","external_intent_id":"pi_3JhDzG2f
1s4LLhxzS06L7dgBR","live_mode":true,"off_session":false,"processor_data":{"stripe":{"account_id":"external_account_30","publishable_key":"pk_test_123","client_secret":"pi_3K6NFo2fs4LLhxzS1leftxKh_secret_qoy2TA8XJEYKTp4bbF8hT3clV","payment_method_id":null,"type":"payment"}},"processor_type":"stripe","reusable":false,"status":"pending","checkout":null,"customer":"200e74ba-1476-4ccf-99cf-9a1c033d3144","payment_method":null,"staged_checkout":null,"created_at":1660689462,"updated_at":1660689462}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Payment Intents"],"operationId":"create_payment_intent","description":"Creates a new payment intent.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"aac9ca99-1642-4226-bb36-d427b9e15084","object":"payment_intent","amount":0,"currency":"usd","external_intent_id":"seti_JBxXF8r9s04KBpd","live_mode":true,"off_session":false,"processor_data":{"stripe":{"account_id":"external_account_31","publishable_key":"pk_test_123","client_secret":"seti_1LQwFgFbg3yvFC5rY3oEA0eZ_secret_M9Ejhz6PeGIhGpUKNdoqV9XTqtiNv1w","payment_method_id":null,"type":"setup"}},"processor_type":"stripe","reusable":true,"status":"pending","checkout":null,"customer":"d78e181b-7109-48c6-8ccb-8f6a6baa44ca","payment_method":null,"staged_checkout":null,"created_at":1660689462,"updated_at":1660689462},"schema":{"$ref":"#/components/schemas/payment_intent_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_intent":{"allOf":[{"$ref":"#/components/schemas/payment_intent_body"}]}},"example":{"payment_intent":{"customer":"d78e181b-7109-48c6-8ccb-8f6a6baa44ca","processor_type":"stripe"}}}}}}}},"/v1/payment_intents/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Payment Intents"],"operationId":"retrieve_payment_intent","description":"Retrieves details of a specific payment intent.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"7f5adc8f-e936-4d58-a926-6a7afae4b6df","object":"payment_intent","amount":500,"currency":"usd","external_intent_id":"pi_3JhDzG2fs4LLhxzS06L7dgBR","live_mode":true,"off_session":false,"processor_data":{"stripe":{"account_id":"external_account_32","publishable_key":"pk_test_123","client_secret":"pi_3K6NFo2fs4LLhxzS1leftxKh_secret_qoy2TA8XJEYKTp4bbF8hT3clV","payment_method_id":null,"type":"payment"}},"processor_type":"stripe","reusable":false,"status":"pending","checkout":null,"customer":"d0c39ab6-897c-4fd6-9799-b101337ee2e8","payment_method":null,"staged_checkout":null,"created_at":1660689462,"updated_at":1660689462},"schema":{"$ref":"#/components/schemas/payment_intent_response"}}}}}},"patch":{"summary":"Update","tags":["Payment Intents"],"operationId":"update_payment_intent","description":"Updates a specific payment intent.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"d4868bcf-87fe-42d0-9f01-478ba9cbebc4","object":"payment_intent","amount":4900,"currency":"usd","external_intent_id":"pi_3JhDzG2fs4LLhxzS06L7dgBR","live_mode":true,"off_session":false,"processor_data":{"stripe":{"account_id":"external_account_33","publishable_key":"pk_test_123","client_secret":"pi_3K6NFo2fs4LLhxzS1leftxKh_secret_qoy2TA8XJEYKTp4bbF8hT3clV","payment_method_id":null,"type":"payment"}},"processor_type":"stripe","reusable":false,"status":"pending","checkout":null,"customer":"89b78dde-0870-4273-a11c-8476810bc1e3","payment_method":null,"staged_checkout":null,"created_at":1660689462,"updated_at":1660689462},"schema":{"$ref":"#/components/schemas/payment_intent_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_intent":{"allOf":[{"$ref":"#/components/schemas/payment_intent_update_body"}]}},"example":{"payment_intent":{"amount":4900}}}}}}}},"/v1/payment_intents/{id}/capture":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Capture","tags":["Payment Intents"],"operationId":"capture_payment_intent","description":"Capture a specific payment intent.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"b0b21139-ad05-4a4c-8f77-0fe075c08780","object":"payment_intent","amount":500,"currency":"usd","external_intent_id":"8HV68613WA006590K","live_mode":true,"off_session":false,"processor_data":{"paypal":{"account_id":"external_account_34","client_id":"AcvWgKnWqxsUIo9VdwKFOMWxlNGElh2i5NX0MsMgqcFc_6UTds2tezGVS6ssem
102RqW-tF6gasFEnw4K","payer_email":"[email protected]","payer_name":"Ben Bartling","type":"order"}},"processor_type":"paypal","reusable":false,"status":"succeeded","checkout":null,"customer":"58f37a11-0822-4b81-a59a-59bed9bb47a0","payment_method":"798e1bc0-eb74-4e29-814d-79abcdb37658","staged_checkout":null,"created_at":1660689462,"updated_at":1660689462},"schema":{"$ref":"#/components/schemas/payment_intent_response"}}}}}}},"/v1/payment_methods":{"get":{"summary":"List","tags":["Payment Methods"],"operationId":"list_payment_method","description":"Returns a list of your payment methods.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"reusable","in":"query","description":"Only return payment methods that are reusable or not.","required":false,"schema":{"type":"boolean"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/payment_methods"},"data":[{"id":"d2d3c153-1c4f-4fc0-a6ee-17f9844bdc5f","object":"payment_method","external_payment_method_id":"pm_1_Ju1BB2fs4LLhxzSoekOTDo3","live_mode":true,"processor_type":"stripe","reusable":true,"type":"card","bank_account":null,"card":"dfbad371-c324-433d-88d6-9592544eaa66","customer":"1b26a3f9-8fc3-49ff-8d14-34f0be095660","payment_instrument":null,"paypal_account":null,"created_at":1660689462,"updated_at":1660689462}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/payment_methods/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Payment Methods"],"operationId":"retrieve_payment_method","description":"Retrieves details of a specific payment method.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"94d1ce00-7182-4640-9e14-38d9bd18009e","object":"payment_method","external_payment_method_id":"pm_2_Ju1BB2fs4LLhxzSoekOTDo3","live_mode":true,"processor_type":"stripe","reusable":true,"type":"card","bank_account":null,"card":"51d43f4b-5a58-452c-913e-8fae1f025ca9","customer":"478bd1ec-f1dc-4065-8151-3c02c869b57a","payment_instrument":null,"paypal_account":null,"created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/payment_method_response"}}}}}}},"/v1/payment_methods/{id}/detach":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Detach","tags":["Payment Methods"],"operationId":"detach_payment_method","description":"Detaches a payment method from the associated customer.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"0e63b6f2-d71c-446f-9ab7-643e20ab7591","object":"payment_method","external_payment_method_id":"pm_3_Ju1BB2fs4LLhxzSoekOTDo3","live_mode":true,"processor_type":"stripe","reusable":true,"type":"card","bank_account":null,"card":"d70b92ba-e8b7-4565-be95-9c7d144c8cd6","customer":null,"payment_instrument":null,"paypal_account":null,"created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/payment_method_response"}}}}}}},"/v1/portal_protocol":{"get":{"summary":"Retrieve","tags":["Portal Protocols"],"operationId":"retrieve_portal_protocol","description":"Retrieves details of the current account\'s portal protocol.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"d8d1a0aa-64f5-4452-a361-6ba5fc4bd518","object":"portal_protocol","privacy_url":null,"subscription_cancellations_enabled":true,"subscription_updates_enabled":true,"subscription_quantity_updates_enabled":true,"terms_url":null,"created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/portal_protocol_response"}}}}}},"patch":{"summary":"Update","tags":["Portal Protocols"],"operationId":"update_portal_protocol","description":"Updates the current account\'s portal protocol.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"d07082e5-6589-4de2-8331-b34b1804aec9","object":"portal_protocol","privacy_url":null,"subscription_cancellations_enabled":false,"subscription_updates_enabled":true,"subscription_quantity_updates_enabled":true,"terms_url":null,"created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/portal_protocol_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portal_protocol":{"allOf":[{"$ref":"#/components/schemas/portal_protocol_body"}]}},"example":{"portal_protocol":{"subscription_cancellations_enabled":false}}}}}}}},"/v1/prices":{"get":{"summary":"List","tags":["Prices"],"operationId":"list_price","description":"Returns a list of your prices.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"archived","in":"query","description":"Only return objects that are archived or not archived.","required":false,"schema":{"type":"boolean"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}},{"name":"product_ids[]","in":"query","description":"Only return objects that belong to the given products.","required":false,"schema":{"type":"array"}},{"name":"ad_hoc","in":"query","description":"Only return prices that allow ad hoc amounts or not.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/prices"},"data":[{"id":"
1182ab83e-be60-4185-8825-2b3608be9107","object":"price","ad_hoc":false,"ad_hoc_max_amount":null,"ad_hoc_min_amount":0,"amount":2900,"archived":false,"archived_at":null,"currency":"usd","current_version":true,"full_amount":2900,"metadata":{},"recurring_interval":null,"recurring_interval_count":null,"recurring_period_count":null,"recurring_end_behavior":null,"tax_behavior":"exclusive","trial_duration_days":null,"product":"9c49ac87-fbc9-4b5e-8412-ef67621f4067","created_at":1660689463,"updated_at":1660689463}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Prices"],"operationId":"create_price","description":"Creates a new price.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"64b3fe54-17d3-468c-b7a4-2b783b4296a2","object":"price","ad_hoc":false,"ad_hoc_max_amount":null,"ad_hoc_min_amount":0,"amount":2900,"archived":false,"archived_at":null,"currency":"usd","current_version":true,"full_amount":2900,"metadata":{},"recurring_interval":null,"recurring_interval_count":null,"recurring_period_count":null,"recurring_end_behavior":null,"tax_behavior":"exclusive","trial_duration_days":null,"product":"233c5c31-9266-4731-af15-6c5dcecab909","created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/price_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/price_body"}]}},"example":{"price":{"name":"Test Price","amount":2900,"product_id":"233c5c31-9266-4731-af15-6c5dcecab909"}}}}}}}},"/v1/prices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Prices"],"operationId":"retrieve_price","description":"Retrieves details of a specific price.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"003c47e2-c94c-46f0-982a-28a81e0cb876","object":"price","ad_hoc":false,"ad_hoc_max_amount":null,"ad_hoc_min_amount":0,"amount":2900,"archived":false,"archived_at":null,"currency":"usd","current_version":true,"full_amount":2900,"metadata":{},"recurring_interval":null,"recurring_interval_count":null,"recurring_period_count":null,"recurring_end_behavior":null,"tax_behavior":"exclusive","trial_duration_days":null,"product":"22d4e6a9-7bd5-4311-a789-d1b82377bd1f","created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/price_response"}}}}}},"patch":{"summary":"Update","tags":["Prices"],"operationId":"update_price","description":"Updates a specific price.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"2fb2b804-8d33-430c-aa4b-a3abdd2c7baf","object":"price","ad_hoc":false,"ad_hoc_max_amount":null,"ad_hoc_min_amount":0,"amount":2900,"archived":false,"archived_at":null,"currency":"usd","current_version":true,"full_amount":2900,"metadata":{},"recurring_interval":null,"recurring_interval_count":null,"recurring_period_count":null,"recurring_end_behavior":null,"tax_behavior":"exclusive","trial_duration_days":null,"product":"74631677-a08e-4a7c-bf17-04f067b48c4f","created_at":1660689463,"updated_at":1660689463},"schema":{"$ref":"#/components/schemas/price_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/price_body"}]}},"example":{"price":{"name":"Updated Price"}}}}}}},"delete":{"summary":"Delete","tags":["Prices"],"operationId":"delete_price","description":"Deletes a specific price.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f230189d-2c2a-48f0-9839-c5d74ee10f87","object":"price","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/product_groups":{"get":{"summary":"List","tags":["Product Groups"],"operationId":"list_product_group","description":"Returns a list of your product groups.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"archived","in":"query","description":"Only return objects that are archived or not archived.","required":false,"schema":{"type":"boolean"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/product_groups"},"data":[{"id":"0c51d140-3b0d-45d6-86c1-353685d505cf","object":"product_group","archived":false,"archived_at":null,"metadata":{},"name":"Membership - V1","created_at":1660689463,"updated_at":1660689463}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Product Groups"],"operationId":"create_product_group","description":"Creates a new product group.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"4f93ead0-9c8f-4433-a5a5-84e4538b9d51","object":"product_group","archived":false,"archived_at":null,"metadata":{},"name":"Membership \u2013 V2","created_at":1660689464,"updated_at":1660689464},"schema":{"$ref":"#/components/schemas/product_group_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_group":{"allOf":[{"$ref":"#/components/schemas/product_group_body"}]}},"example":{"product_group":{"name":"Membership \u2013 V2"}}}}}}}},"/v1/product_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Product Groups"],"operationId":"retrieve_product_group","description":"Retrieves details of a specific product group.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"55a828ad-1f9c-402a-942c-01a55176da13","object":"product_group","archived":false,"archived_at":null,"metadata":{},"name":"Membership - V1","created_at":1660689464,"updated_at":1660689464},"schema":{"$ref":"#/components/schemas/product_group_response"}}}}}},"patch":{"summary":"Update","tags":["Product Groups"],"operationId":"update_product_group","description":"Updates a specific product group.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"c58c03a6-70ba-4285-9312-fb91f9fa7a53","object":"product_group","archived":false,"archived_at":null,"metadata":{},"name":"Membership \u2013 V1 (Legacy)","created_at":1660689464,"updated_at":1660689464},"schema":{"$ref":"#/components/schemas/product_group_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_group":{"allOf":[{"$ref":"#/components/schemas/product_group_body"}]}},"example":{"product_group":{"name":"Membership \u2013 V1 (Legacy)"}}}}}}},"delete":{"summary":"Delete","tags":["Product Groups"],"operationId":"delete_product_group","description":"Deletes a specific product group.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"6b2010ea-b651-447a-a4b4-063623d917fc","object":"product_group","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/products":{"get":{"summary":"List","tags":["Products"],"operationId":"list_product","description":"Returns a list of your products.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"archived","in":"query","description":"Only return objects that are archived or not archived.","required":false,"schema":{"type":"boolean"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}},{"name":"product_group_ids[]","in":"query","description":"Only return objects that belong to the given product groups.","required":false,"schema":{"type":"array"}},{"name":"recurring","in":"query","description":"Only return products that are recurring or not recurring (one time).","required":false,"schema":{"type":"boolean"}},{"name":"ad_hoc","in":"query","description":"Only return prices that allow ad hoc amounts or not.","required":false,"schema":{"type":"boolean"}},{"name":"downloadable","in":"query","description":"Only return objects that have associated downloads.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/products"},"data":[{"id":"815dc17a-0174-4ac2-bc2f-d4b6ae492217","object":"product","archived":false,"archived_at":null,"description":null,"licensing_enabled":false,"license_activation_limit":null,"metadata":{},"metrics":{"currency":"usd","max_price_amount":2900,"min_price_amount":2900,"prices_count":1},"name":"Test Product","recurring":true,"shipping_enabled":false,"tax_enabled":true,"tax_category":"tangible","image":null,"product_group":null,"current_release_download":null,"image_url":null,"created_at":1660689464,"updated_at":1660689464}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Products"],"operationId":"create_product","description":"Creates a new product.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"346aef10-bd98-4e5e-83c3-93088f389032","object":"product","archived":false,"archived_at":null,"description":null,"licensing_enabled":false,"license_activation_limit":null,"metadata":{},"metrics":{"currency":"usd","max_price_amount":null,"min_price_amount":null,"prices_count":0},"name":"Test Product","recurring":false,"shipping_enabled":false,"tax_enabled":true,"tax_category":"tangible","image":null,"product_group":null,"current_release_download":null,"image_url":null,"created_at":1660689465,"updated_at":1660689465},"schema":{"$ref":"#/components/schemas/product_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"allOf":[{"$ref":"#/components/schemas/product_body"}]}},"example":{"product":{"name":"Test Product"}}}}}}}},"/v1/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Products"],"operationId":"retrieve_product","description":"Retrieves details of a specific product.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"5039622f-d9d4-403f-b9de-124972952475","object":"product","archived":false,"archived_at":null,"description":null,"licensing_enabled":false,"license_activation_limit":null,"metadata":{},"metrics":{"currency":"usd","max_price_amount":2900,"min_price_amount":2900,"prices_count":1},"name":"Test Product","recurring":true,"shipping_enabled":false,"tax_enabled":true,"tax_category":"tangible","image":null,"product_group":null,"current_release_download":null,"image_url":null,"created_at":1660689465,"updated_at":1660689465},"schema":{"$ref":"#/components/schemas/product_response"}}}}}},"patch":{"summary":"Update","tags":["Products"],"operationId":"update_product","description":"Updates a specific product.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"3be78697-219c-4860-bfdd-7d02da8fa3e1","object":"product","archived":false,"archived_at":null,"description":null,"licensing_enabled":false,"license_activation_limit":null,"metadata":{},"metrics":{"currency":"usd","max_price_amount":2900,"min_price_amount":2900,"prices_count":1},"name":"Updated Product","recurring":true,"shipping_enabled":false,"tax_enabled":true,"tax_category":"tangible","image":null,"product_group":null,"current_release_download":null,"image_url":null,"created_at":1660689466,"updated_at":1660689466},"schema":{"$ref":"#/components/schemas/product_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"allOf":[{"$ref":"#/components/schemas/product_body"}]}},"example":{"product":{"name":"Updated Product"}}}}}}},"delete":{"summary":"Delete","tags":["Products"],"operationId":"delete_product","description":"Deletes a specific product.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"aaec17b9-c0cb-4c26-80af-3c2532bdd172","object":"product","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/promotions":{"get":{"summary":"List","tags":["Promotions"],"operationId":"list_promotion","description":"Returns a list of your promotions.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"coupon_ids[]","in":"query","description":"Only return objects with the given coupon IDs.","required":false,"schema":{"type":"array"}},{"name":"archived","in":"query","description":"Only return objects that are archived or not archived.","required":false,"schema":{"type":"boolean"}},{"name":"query","in":"query","description":"The query to be used for full text search of this collection.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/promotions"},"data":[{"id":"059d1616-2aa7-4206-ae9b-42bbfe2c47af","object":"promotion","archived":false,"archived_at":null,"code":"TESTCODE","expired":false,"max_redemptions":null,"metadata":{},"redeem_by":null,"times_redeemed":0,"coupon":"50fc0bd6-a972-477e-add3-1463f79753bd","created_at":1660689466,"updated_at":1660689466}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Promotions"],"operationId":"create_promotion","description":"Creates a new promotion.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"453e57d1-eead-4c09-9145-617417000339","object":"promotion","archived":false,"archived_at":null,"code":"TESTCODE","expired":false,"max_redemptions":null,"metadata":{},"redeem_by":null,"times_redeemed":0,"coupon":"480ba9d9-023a-4ec9-b4d5-d3f591eef5c9","created_at":1660689466,"updated_at":1660689466},"schema":{"$ref":"#/components/schemas/promotion_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"promotion":{"allOf":[{"$ref":"#/components/schemas/promotion_body"}]}},"example":{"promotion":{"code":"TESTCODE","coupon_id":"480ba9d9-023a-4ec9-b4d5-d3f591eef5c9"}}}}}}}},"/v1/promotions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Promotions"],"operationId":"retrieve_promotion","description":"Retrieves details of a specific promotion.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"58f11a02-14c2-4d0b-9de2-59a766f87dde","object":"promotion","archived":false,"archived_at":null,"code":"TESTCODE","expired":false,"max_redemptions":null,"metadata":{},"redeem_by":null,"times_redeemed":0,"coupon":"58344a31-ab83-4134-94a4-70ab1e26fbf5","created_at":1660689466,"updated_at":1660689466},"schema":{"$ref":"#/components/schemas/promotion_response"}}}}}},"patch":{"summary":"Update","tags":["Promotions"],"operationId":"update_promotion","description":"Updates a specific promotion.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"32663d7a-a6ca-4711-9d9b-ce8ce61da02e","object":"promotion","archived":false,"archived_at":null,"code":"UPDATEDCODE","expired":false,"max_redemptions":null,"metadata":{},"redeem_by":null,"times_redeemed":0,"coupon":"566fe41f-1672-47f3-bd29-fb6ea1c7579d","created_at":1660689467,"updated_at":1660689467},"schema":{"$ref":"#/components/schemas/promotion_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"promotion":{"allOf":[{"$ref":"#/components/schemas/promotion_body"}]}},"example":{"promotion":{"code":"UPDATEDCODE"}}}}}}},"delete":{"summary":"Delete","tags":["Promotions"],"operationId":"delete_promotion","description":"Deletes a specific promotion.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"5499f4a0-33ba-4bd6-9e73-668b5ec31bd4","object":"promotion","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/public/activations":{"post":{"summary":"Create","tags":["Activations (Public)"],"operationId":"create_activations(public)","de
1scription":"Creates a new activation.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"e08b0bc4-1fd4-43a8-b744-2a215babb001","object":"activation","name":"My Site","fingerprint":"mysite.com","license":"65126776-c54a-4343-a170-e3baef95dd92","created_at":1660689468,"updated_at":1660689468},"schema":{"$ref":"#/components/schemas/public_activation_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"activation":{"allOf":[{"$ref":"#/components/schemas/activation_body"}]}},"example":{"activation":{"name":"My Site","fingerprint":"mysite.com","license_id":"65126776-c54a-4343-a170-e3baef95dd92"}}}}}}}},"/v1/public/activations/{id}":{"get":{"summary":"Retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations (Public)"],"operationId":"retrieve_activations(public)","description":"Retrieves details of a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f4b212f4-9141-465f-b009-fe6823241f82","object":"activation","name":null,"fingerprint":"example.com","license":"3ef9e2e1-a091-4c7c-9012-1979911fc9c3","created_at":1660689468,"updated_at":1660689468},"schema":{"$ref":"#/components/schemas/public_activation_response"}}}}}},"patch":{"summary":"Update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations (Public)"],"operationId":"update_activations(public)","de
1scription":"Updates a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"05a971c9-47a9-43bf-9fe3-f006229aac15","object":"activation","name":"New Activation Name","fingerprint":"example.com","license":"860d8f47-16ac-4eb0-a71a-0f0091fb60b3","created_at":1660689469,"updated_at":1660689469},"schema":{"$ref":"#/components/schemas/public_activation_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"activation":{"allOf":[{"$ref":"#/components/schemas/activation_body"}]}},"example":{"activation":{"name":"New Activation Name"}}}}}}},"delete":{"summary":"Delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Activations (Public)"],"operationId":"delete_activations(public)","description":"Deletes a specific activation.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"775da7ec-9137-4557-b9ad-f51de4318224","object":"activation","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/public/licenses/{key}":{"get":{"summary":"Retrieve","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Licenses (Public)"],"operationId":"retrieve_licenses(public)","de
1scription":"Retrieves a license by it\'s key.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"87e8f39b-f998-4988-9c76-0d22b4a89739","object":"license","key":"7b6e936f-ae48-4e44-badc-50dda38e7c2c","status":"inactive","product":"febdfe55-4367-425b-9b9a-8b5cc54c7b0d","current_release":null,"created_at":1660689470,"updated_at":1660689470},"schema":{"$ref":"#/components/schemas/public_license_response"}}}}}}},"/v1/public/licenses/{key}/expose_current_release":{"get":{"summary":"Expose Current Release","parameters":[{"name":"expose_for","in":"query","description":"Sets how long a private media URL should be valid for, in seconds. The max value allowed is `86400` or 24 hours. When exposing a media through a purchase or license the default value is `900` or 15 minutes.","required":false,"schema":{"type":"integer"}},{"name":"activation_id","in":"query","description":"The ID of an activation associated with this license. This is required to expose the current release if the license has an activation limit.","required":false,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Licenses (Public)"],"operationId":"expose_current_release_licenses(public)","de
1scription":"Exposes the current release media for the license.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"d976b96b-548f-4244-8c01-2c813893354a","object":"media","byte_size":4091,"content_type":"image/png","extension":"png","filename":"logo.png","public_access":false,"release_json":null,"url":"http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhOV0Y1Y0hwNU1HaHphSFozT1cxcU0yNTNhV1JoYzJSM2VYQnRkUVk2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpUDJGMGRHRmphRzFsYm5RN0lHWnBiR1Z1WVcxbFBTSnNiMmR2TG5CdVp5STdJR1pwYkdWdVlXMWxLajFWVkVZdE9DY25iRzluYnk1d2JtY0dPd1pVT2hGamIyNTBaVzUwWDNSNWNHVkpJZzVwYldGblpTOXdibWNHT3daVU9oRnpaWEoyYVdObFgyNWhiV1U2Q1hSbGMzUT0iLCJleHAiOiIyMDIyLTA4LTE2VDIyOjUyOjUwLjkyMloiLCJwdXIiOiJibG9iX2tleSJ9fQ==--2639cdae15a92d556407cf7c9aaff494fdb29634/logo.png","url_expires_at":1660690370,"created_at":1660689470,"updated_at":1660689470},"schema":{"$ref":"#/components/schemas/media_response"}}}}}}},"/v1/purchases":{"get":{"summary":"List","tags":["Purchases"],"operationId":"list_purchase","description":"Returns a list of purchases.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"license_ids[]","in":"query","description":"Only return objects that belong to the given licenses.","required":false,"schema":{"type":"array"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}},{"name":"product_ids[]","in":"query","description":"Only return objects that belong to the given products.","required":false,"schema":{"type":"array"}},{"name":"revoked","in":"query","description":"Only return objects that are revoked or not revoked.","required":false,"schema":{"type":"boolean"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}},{"name":"subscription_ids[]","in":"query","description":"Only return objects that belong to the given subscriptions.","required":false,"schema":{"type":"array"}},{"name":"downloadable","in":"query","description":"Only return objects that have associated downloads.","required":false,"schema":{"type":"boolean"}},{"name":"order_ids[]","in":"query","description":"Only return objects that belong to the given orders.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":2,"limit":20,"page":1,"url":"/v1/purchases"},"data":[{"id":"28a20919-7c6e-4f6f-b4f2-541bc2405bdc","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"fcf8ed5e-2d6b-40da-890a-332bba5edc8b","license":null,"product":"f84e41b1-8057-473e-aeed-0254ac3ecf31","refund":null,"subscription":null,"created_at":1660689471,"updated_at":1660689471},{"id":"063a25f6-77a2-4424-8ef0-9d4b08010920","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"fcf8ed5e-2d6b-40da-890a-332bba5edc8b","license":null,"product":"f84e41b1-8057-473e-aeed-0254ac3ecf31","refund":null,"subscription":null,"created_at":1660689471,"updated_at":1660689471}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/purchases/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Purchases"],"operationId":"retrieve_purchase","description":"Retrieves details of a specific purchase.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"fa2c2862-71e9-4700-8e47-fa470ddd8a21","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"1a160b45-fae5-4ea7-a29f-833842692d78","license":null,"product":"dc2a98e1-0182-45c0-aee7-c03e2bb7f08b","refund":null,"subscription":null,"created_at":1660689471,"updated_at":1660689471},"schema":{"$ref":"#/components/schemas/purchase_response"}}}}}}},"/v1/purchases/{id}/invoke":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Invoke","tags":["Purchases"],"operationId":"invoke_purchase","description":"Invokes a specific purchase.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"35a0fe28-1f88-405d-84b3-1622ff933283","object":"purchase","live_mode":true,"quantity":1,"revoked":false,"revoked_at":null,"customer":"6f658ebc-249d-432b-b9c7-15cca7a772a9","license":null,"product":"de69f955-20e1-41af-a57f-f019e8be2e63","refund":null,"subscription":null,"created_at":1660689472,"updated_at":1660689472},"schema":{"$ref":"#/components/schemas/purchase_response"}}}}}}},"/v1/purchases/{id}/revoke":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Revoke","tags":["Purchases"],"operationId":"revoke_purchase","description":"Revokes a specific purchase.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"e534c053-4c47-4bd3-bf7e-c7e65860b7d0","object":"purchase","live_mode":true,"quantity":1,"revoked":true,"revoked_at":1660689472,"customer":"a89b7c49-3101-47e8-a988-c24a13950dad","license":null,"product":"b0c1c923-dbc7-4e31-88c9-efd09e0dabec","refund":null,"subscription":null,"created_at":1660689472,"updated_at":1660689472},"schema":{"$ref":"#/components/schemas/purchase_response"}}}}}}},"/v1/refunds":{"get":{"summary":"List","tags":["Refunds"],"operationId":"list_refund","description":"Returns a list of your refunds.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}},{"name":"charge_ids[]","in":"query","description":"Only return objects with the given charge IDs.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/refunds"},"data":[{"id":"1f34cbf4-fe88-419e-8ea5-0c1305347eac","object":"refund","amount":1450,"currency":"usd","external_refund_id":"re_1JQGuM2fs4LLhxzSPxv6VJJ3","failure_reason":null,"live_mode":true,"metadata":{},"reason":"requested_by_customer","status":"pending","charge":"befaaf28-26a4-4946-b515-a04529a66d7f","customer":"b57c8415-341d-4930-89a1-d489ad3dc673","created_at":1660689472,"updated_at":1660689472}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Refunds"],"operationId":"create_refund","description":"Creates a new refund.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"bcb2e3db-9c30-4e5c-af03-d25910b4b4ce","object":"refund","amount":500,"currency":"usd","external_refund_id":"re_JBxXQYSB3G0V18x","failure_reason":null,"live_mode":true,"metadata":{},"reason":"requested_by_customer","status":"succeeded","charge":"865a5a28-fc11-4009-b0be-5929e1266d6c","customer":"e92163a1-1b9a-44dc-84b4-5c1482a46954","created_at":1660689473,"updated_at":1660689473},"schema":{"$ref":"#/components/schemas/refund_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refund":{"allOf":[{"$ref":"#/components/schemas/refund_body"}]}},"example":{"refund":{"amount":500,"reason":"requested_by_customer","charge_id":"865a5a28-fc11-4009-b0be-5929e1266d6c"}}}}}}}},"/v1/refunds/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Refunds"],"operationId":"retrieve_refund","description":"Retrieves details of a specific refund.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"fc5392a6-db9e-4c2d-9a7b-ed61c4282bef","object":"refund","amount":1450,"currency":"usd","external_refund_id":"re_1JQGuM2fs4LLhxzSPxv6VJJ3","failure_reason":null,"live_mode":true,"metadata":{},"reason":"requested_by_customer","status":"pending","charge":"2df2a5e4-8b9b-44f8-aae6-e64768a5b7bc","customer":"07061121-b65e-419f-a106-e3e50ae072db","created_at":1660689473,"updated_at":1660689473},"schema":{"$ref":"#/components/schemas/refund_response"}}}}}}},"/v1/stats/orders":{"get":{"summary":"Orders","tags":["Statistics"],"operationId":"orders_statistic","description":"Returns order statistics.","parameters":[{"name":"currency[]","in":"query","description":"Only return objects that have the given currencies.","required":false,"schema":{"type":"array"}},{"name":"end_at","in":"query","description":"The end of the date range to query.","required":true,"schema":{"type":"string"}},{"name":"interval","in":"query","description":"The interval to group statistics on \u2013 one of `hour`, `day`, `week`, `month`, or `year`.","required":true,"schema":{"type":"string"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}},{"name":"start_at","in":"query","description":"The start of the date range to query.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"stats","query":{"currency":"usd","end_at":1660689474,"interval":"day","live_mode":true,"start_at":1660084674},"data":[{"amount":17400,"average_amount":2900,"currency":"usd","count":6,"live_mode":true,"interval_at":1660608000}]},"schema":{"$ref":"#/components/schemas/stats_response"}}}}}}},"/v1/subscription_protocol":{"get":{"summary":"Retrieve","tags":["Subscription Protocols"],"operationId":"retrieve_subscription_protocol","description":"Retrieves details of the current account\'s subscription protocol.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"ab36f55c-0d04-44df-9526-59895ed47be3","object":"subscription_protocol","cancel_behavior":"pending","downgrade_behavior":"pending","payment_retry_window_weeks":1,"upgrade_behavior":"immediate","created_at":1660689474,"updated_at":1660689474},"schema":{"$ref":"#/components/schemas/subscription_protocol_response"}}}}}},"patch":{"summary":"Update","tags":["Subscription Protocols"],"operationId":"update_subscription_protocol","description":"Updates the current account\'s subscription protocol.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"8520610f-46f1-446b-b824
1-b79e4db44139","object":"subscription_protocol","cancel_behavior":"pending","downgrade_behavior":"immediate","payment_retry_window_weeks":1,"upgrade_behavior":"immediate","created_at":1660689474,"updated_at":1660689474},"schema":{"$ref":"#/components/schemas/subscription_protocol_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscription_protocol":{"allOf":[{"$ref":"#/components/schemas/subscription_protocol_body"}]}},"example":{"subscription_protocol":{"downgrade_behavior":"immediate"}}}}}}}},"/v1/subscriptions":{"get":{"summary":"List","tags":["Subscriptions"],"operationId":"list_subscription","description":"Returns a list of your subscriptions.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"ids[]","in":"query","description":"Only return objects with the given IDs.","required":false,"schema":{"type":"array"}},{"name":"status[]","in":"query","description":"Only return objects with the given status.","required":false,"schema":{"type":"array"}},{"name":"customer_ids[]","in":"query","description":"Only return objects that belong to the given customers.","required":false,"schema":{"type":"array"}},{"name":"checkout_ids[]","in":"query","description":"Only return objects that belong to the given checkouts.","required":false,"schema":{"type":"array"}},{"name":"live_mode","in":"query","description":"Only return objects that are live mode or not test mode.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/subscriptions"},"data":[{"id":"90fbe287-b8c2-4b12-aafb-79e3c9d2c933","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":false,"currency":"usd","current_period_end_at":null,"current_period_start_at":null,"end_behavior":"cancel","ended_at":null,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"active","trial_end_at":null,"trial_start_at":null,"quantity":1,"current_period":null,"customer":"b82c1a7c-68e5-4d6a-bed9-cf9ccbc08374","discount":null,"payment_method":"93e84805-e65d-4342-ae13-8e32fd49c153","price":"176cb541-95ed-49d4-b88c-88bc8e58b935","purchase":null,"created_at":1660689474,"updated_at":1660689474}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Subscriptions"],"operationId":"create_subscription","description":"Creates a new subscription.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"c61d323c-0019-4740-ad21-66edf2ea1e95","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":false,"currency":"usd","current_period_end_at":1663367874,"current_period_start_at":1660689474,"end_behavior":"cancel","ended_at":null,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"incomplete","trial_end_at":null,"trial_start_at":null,"quantity":1,"current_period":"884bf7dd-3e80-4745-b484-f76c46028747","customer":"3c1f269b-d08d-4edd-a014-b94006b033fb","discount":null,"payment_method":"93418909-17eb-4551-97a2-ee3f76096d75","price":"46eccda4-ceb2-4b86-b07e-28bbbdd34e91","purchase":null,"created_at":1660689474,"updated_at":1660689474},"schema":{"$ref":"#/components/schemas/subscription_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"allOf":[{"$ref":"#/components/schemas/subscription_body"}]}},"example":{"subscription":{"customer":"3c1f269b-d08d-4edd-a014-b94006b033fb","price":"46eccda4-ceb2-4b86-b07e-28bbbdd34e91","payment_method":"93418909-17eb-4551-97a2-ee3f76096d75"}}}}}}}},"/v1/subscriptions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Subscriptions"],"operationId":"retrieve_subscription","description":"Retrieves details of a specific subscription.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"62fda0dc-9019-4938-b13d-3735c5a235f5","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":false,"currency":"usd","current_period_end_at":null,"current_period_start_at":null,"end_behavior":"cancel","ended_at":null,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"active","trial_end_at":null,"trial_start_at":null,"quantity":1,"current_period":null,"customer":"3c0cf824-d3fb-4869-8a96-fe5bac2f3ec9","discount":null,"payment_method":"868504df-694c-46c5-99d9-ef855318bb44","price":"1833c4c9-47ea-4c69-bad0-2244588aedf9","purchase":null,"created_at":1660689475,"updated_at":1660689475},"schema":{"$ref":"#/components/schemas/subscription_response"}}}}}},"patch":{"summary":"Update","tags":["Subscriptions"],"operationId":"update_subscription","description":"Updates a specific subscription.","parameters":[{"name":"update_behavior","in":"query","description":"The strategy to use when updating this subscription \u2013 one of `immediate` or `pending`. If no value is provided, the corresponding subscription protocol `downgrade_behavior` or `upgrade_behavior` will be be used.","required":false,"schema":{"type":"string"}},{"name":"skip_product_group_validation","in":"query","description":"When set to `true` you can update a subscription\'s price regardless of the product group it belongs to.","required":false,"schema":{"type":"boolean"}},{"name":"skip_proration","in":"query","description":"When set to `true` the next period generated during an immediate update will not be prorated.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"8b772246-cff5-4907-9f8c-ec44790f81d1","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":false,"currency":"usd","current_period_end_at":16633
167875,"current_period_start_at":1660689475,"end_behavior":"cancel","ended_at":null,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"active","trial_end_at":null,"trial_start_at":null,"quantity":2,"current_period":"e62ad002-65c4-4056-b934-94191c45a070","customer":"a3a3c3fa-b3ad-43e5-864d-8e6c08b32c1c","discount":null,"payment_method":"c5f03754-397b-4c08-871c-9d7dd5f671b0","price":"e6cca910-bb48-48c9-bdb1-4a21f4db24d1","purchase":null,"created_at":1660689475,"updated_at":1660689475},"schema":{"$ref":"#/components/schemas/subscription_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"allOf":[{"$ref":"#/components/schemas/subscription_body"}]}},"example":{"subscription":{"quantity":2}}}}}}}},"/v1/subscriptions/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Cancel","tags":["Subscriptions"],"operationId":"cancel_subscription","description":"Cancels a specific subscription.","parameters":[{"name":"cancel_behavior","in":"query","description":"The strategy to use when canceling this subscription \u2013 one of `immediate` or `pending`. If no value is provided, the subscription protocol `cancel_behavior` will be be used.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"59242924-d56e-4ce2-915b-62e0b2f4740f","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":true,"currency":"usd","current_period_end_at":1663367875,"current_period_start_at":1660689475,"end_behavior":"cancel","ended_at":null,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"active","trial_end_at":null,"trial_start_at":null,"quantity":1,"current_period":"71cd0840-f1d8-4d2d-a5c2-a6f4fa545fcc","customer":"8dacdbb7-3e6f-4bb6-8e9f-cc983eae4a7b","discount":null,"payment_method":"b0d5cfe1-eeb3-4819-be7a-bd04a0f5a3b5","price":"97bf4a32-c4dc-44e9-b270-121d599d1f14","purchase":null,"created_at":1660689475,"updated_at":1660689475},"schema":{"$ref":"#/components/schemas/subscription_response"}}}}}}},"/v1/subscriptions/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Complete","tags":["Subscriptions"],"operationId":"complete_subscription","description":"Completes a specific subscription.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"2220fb89-9764-44f1-ab57-39f49c18c118","object":"subscription","ad_hoc_amount":null,"cancel_at_period_end":false,"currency":"usd","current_period_end_at":null,"current_period_start_at":null,"end_behavior":"cancel","ended_at":1660689476,"live_mode":true,"metadata":{},"pending_update":{},"remaining_period_count":null,"status":"completed","trial_end_at":null,"trial_start_at":null,"quantity":1,"current_period":null,"customer":"985385cc-3b99-4750-8290-dd5cacde8cc5","discount":null,"payment_method":"a05ad6d2-2262-41ad-aea0-76b922776a81","price":"f57e75a9-3150-4ada-8293-aa5a997b4fe0","purchase":null,"created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/subscription_response"}}}}}}},"/v1/subscriptions/{id}/upcoming_period":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}
1],"patch":{"summary":"Upcoming Period","tags":["Subscriptions"],"operationId":"upcoming_period_subscription","description":"Generates a preview of the upcoming period.","parameters":[{"name":"update_behavior","in":"query","description":"The strategy to use when updating this subscription \u2013 one of `immediate` or `pending`. If no value is provided, the corresponding subscription protocol `downgrade_behavior` or `upgrade_behavior` will be be used.","required":false,"schema":{"type":"string"}},{"name":"skip_product_group_validation","in":"query","description":"When set to `true` you can update a subscription\'s price regardless of the product group it belongs to.","required":false,"schema":{"type":"boolean"}},{"name":"skip_proration","in":"query","description":"When set to `true` the next period generated during an immediate update will not be prorated.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":null,"object":"period","ad_hoc_amount":null,"end_at":1663367876,"next_payment_retry_at":null,"payment_retry_count":0,"quantity":2,"renewal":false,"skip_proration":false,"start_at":1660689476,"status":"draft","checkout":null,"price":"73dd6a46-c26c-46a7-bf61-bff2cd5da412","subscription":"239a6560-ea6e-48bc-a95f-083b3fe78ac5","created_at":null,"updated_at":null},"schema":{"$ref":"#/components/schemas/period_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"allOf":[{"$ref":"#/components/schemas/subscription_body"}]}},"example":{"subscription":{"quantity":2}}}}}}}},"/v1/tax_protocol":{"get":{"summary":"Retrieve","tags":["Tax Protocols"],"operationId":"retrieve_tax_protocol","description":"Retrieves details of the current account\'s tax protocol.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"28beee78-c7c8-46c9-a473-a10abf3fbd3f","object":"tax_protocol","ca_tax_enabled":false,"eu_micro_exemption_enabled":false,"eu_tax_enabled":false,"eu_vat_required":false,"eu_vat_unverified_behavior":"error","eu_vat_local_reverse_charge":false,"tax_enabled":false,"address":"174787aa-53b4-433c-9f62-7c07107fd1d5","ca_tax_identifier":null,"eu_tax_identifier":null,"created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/tax_protocol_response"}}}}}},"patch":{"summary":"Update","tags":["Tax Protocols"],"operationId":"update_tax_protocol","description":"Updates the current account\'s tax protocol.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"a1eadb3b-43c2-4e6d-8044-968831f39d05","object":"tax_protocol","ca_tax_enabled":false,"eu_micro_exemption_enabled":false,"eu_tax_enabled":false,"eu_vat_required":false,"eu_vat_unverified_behavior":"error","eu_vat_local_reverse_charge":false,"tax_enabled":true,"address":"7ff33347-f6cb-4a35-9d64-8bef3ccbadf3","ca_tax_identifier":null,"eu_tax_identifier":null,"created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/tax_protocol_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tax_protocol":{"allOf":[{"$ref":"#/components/schemas/tax_protocol_body"}]}},"example":{"tax_protocol":{"tax_enabled":true}}}}}}}},"/v1/tax_registrations":{"get":{"summary":"List","tags":["Tax Registrations"],"operationId":"list_tax_registration","description":"Returns a list of your tax registrations.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/tax_registrations"},"data":[{"id":"21724319-473b-449a-8d0c-4f83cf69e900","object":"tax_registration","tax_identifier":null,"tax_zone":"d23e73cb-1dca-48fd-baa0-8082dd32d61f","created_at":1660689476,"updated_at":1660689476}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Tax Registrations"],"operationId":"create_tax_registration","description":"Creates a new tax registration.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f078240a-5c55-4641-9055-ea7c0281a851","object":"tax_registration","tax_identifier":null,"tax_zone":"626ebe92-b2df-462e-96e8-270ddecfd354","created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/tax_registration_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tax_registration":{"allOf":[{"$ref":"#/components/schemas/tax_registration_body"}]}},"example":{"tax_registration":{"tax_zone":"626ebe92-b2df-462e-96e8-270ddecfd354"}}}}}}}},"/v1/tax_registrations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Tax Registrations"],"operationId":"retrieve_tax_registration","description":"Retrieves details of a specific tax registration.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"89a97b30-c555-4f53-91c7-d7de4c3a6aaa","object":"tax_registration","tax_identifier":null,"tax_zone":"4ae3ee34-76d0-4d50-a2f3-cb8501f402ff","created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/tax_registration_response"}}}}}},"patch":{"summary":"Update","tags":["Tax Registrations"],"operationId":"update_tax_registration","description":"Updates a specific tax registration.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"ada7f000-14d5-4800-8174-90c0e763ec3c","object":"tax_registration","tax_identifier":"b9fa0999-038d-4592-b787-7fce10713d88","tax_zone":"8d71cfaa-3b5d-4fe2-881a-2e1ff159e69d","created_at":1660689476,"updated_at":1660689476},"schema":{"$ref":"#/components/schemas/tax_registration_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tax_registration":{"allOf":[{"$ref":"#/components/schemas/tax_registration_body"}]}},"example":{"tax_registration":{"tax_identifier":{"number_type":"au_abn","number":"51824753556"}}}}}}}},"delete":{"summary":"Delete","tags":["Tax Registrations"],"operationId":"delete_tax_registration","description":"Deletes a specific tax registration.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"38c79f73-f4cb-4db1-b3e2-b23f07679703","object":"tax_registration","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}},"/v1/tax_zones":{"get":{"summary":"List","tags":["Tax Zones"],"operationId":"list_tax_zone","description":"Returns a list of all available tax zones.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}}
1,{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}},{"name":"regions[]","in":"query","description":"Only return tax zones in the given regions.","required":false,"schema":{"type":"array"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":0,"limit":20,"page":1,"url":"/v1/tax_zones"},"data":[]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}}},"/v1/webhook_endpoints":{"get":{"summary":"List","tags":["Webhook Endpoints"],"operationId":"list_webhook_endpoint","description":"Returns a list of your webhook endpoints.","parameters":[{"name":"limit","in":"query","description":"A limit on the number of items to be returned, between 1 and 100.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"The page of items you want returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"object":"list","pagination":{"count":1,"limit":20,"page":1,"url":"/v1/webhook_endpoints"},"data":[{"id":"9b098f1b-dfd7-4905-8453-39e59d67cfee","object":"webhook_endpoint","description":null,"enabled":true,"signing_secret":"CJLUS1obNxH8LBD4iHDZHGiA","url":"https://example.com","created_at":1660689477,"updated_at":1660689477}]},"schema":{"$ref":"#/components/schemas/list_response"}}}}}},"post":{"summary":"Create","tags":["Webhook Endpoints"],"operationId":"create_webhook_endpoint","description":"Creates a new webhook endpoint.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"b327de41-b7d7-4883-a4fc-624bf0b569d2","object":"webhook_endpoint","description":null,"enabled":true,"signing_secret":"N31nDc8KxkNC2i61wPdqGLu4","url":"http://example.com","created_at":1660689477,"updated_at":1660689477},"schema":{"$ref":"#/components/schemas/webhook_endpoint_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_endpoint":{"allOf":[{"$ref":"#/components/schemas/webhook_endpoint_body"}]}},"example":{"webhook_endpoint":{"url":"http://example.com"}}}}}}}},"/v1/webhook_endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve","tags":["Webhook Endpoints"],"operationId":"retrieve_webhook_endpoint","description":"Retrieves details of a specific webhook endpoint.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"f218b823-88db-480e-9871-b156202c9ed1","object":"webhook_endpoint","description":null,"enabled":true,"signing_secret":"q3uXMoTLjMCQdHpbTH6ANaTZ","url":"https://example.com","created_at":1660689477,"updated_at":1660689477},"schema":{"$ref":"#/components/schemas/webhook_endpoint_response"}}}}}},"patch":{"summary":"Update","tags":["Webhook Endpoints"],"operationId":"update_webhook_endpoint","description":"Updates a specific webhook endpoint.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"0dce3e4f-6af6-4e5f-b573-54d8a7eea984","object":"webhook_endpoint","description":null,"enabled":false,"signing_secret":"uj3bnXB8JbNGg5sdgxTNkBSg","url":"https://example.com","created_at":1660689477,"updated_at":1660689477},"schema":{"$ref":"#/components/schemas/webhook_endpoint_response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_endpoint":{"allOf":[{"$ref":"#/components/schemas/webhook_endpoint_body"}]}},"example":{"webhook_endpoint":{"enabled":false}}}}}}},"delete":{"summary":"Delete","tags":["Webhook Endpoints"],"operationId":"delete_webhook_endpoint","description":"Deletes a specific webhook endpoint.","responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":"49b302d3-fefe-43b2-8434-f6055ca2d496","object":"webhook_endpoint","deleted":true},"schema":{"$ref":"#/components/schemas/model_destroy_response"}}}}}}}},"x-topics":[{"title":"Authentication","content":"The SureCart API uses API tokens to authenticate requests. You can view and manage your API tokens in your dashboard.\\n\\nYour API tokens carry many privileges, so be sure to keep them secure! Do not share your secret API tokens in publicly accessible areas such as GitHub, client-side code, and so forth.\\n\\nAuthentication to the API is performed via bearer auth, use `-H \\"Authorization: Bearer YOUR-API-KEY\\"` to authenticate.\\n\\nAll API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail."},{"title":"Errors","content":"SureCart uses conventional HTTP response codes to indicate the success or failure of an API request. In general: codes in the `2xx` range indicate success. Co
1des in the `4xx` range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the `5xx` range indicate an error with SureCart\'s servers (these are rare).\\n\\n# HTTP Status Code Summary\\n\\nThese are all of the status codes that the SureCart API will return.\\n- `200` OK - Everything worked as expected.\\n- `400` Bad Request - The request was unacceptable, often due to missing a required parameter.\\n- `401` Unauthorized - Invalid API token provided.\\n- `404` Not Found - The requested resource doesn\'t exist.\\n- `422` Unprocessable Entity - The request failed validation or was not allowed for another reason.\\n- `500` Server Error - Something went wrong on SureCart\'s end.\\n\\n# Error Responses\\n\\nAll error responses will be formatted like the example below, and they will have at least the following keys:\\n- `http_status` The HTTP status code \u2013 matching the HTTP response status.\\n- `type` The type of error \u2013 more specific than the `http_status`.\\n- `code` The unique code for the error \u2013 this should be used for translations.\\n- `message` The human readable error message.\\n\\n```json\\n{\\n  \\"http_status\\": \\"unprocessable_entity\\",\\n  \\"type\\": \\"not_found\\",\\n  \\"code\\": \\"product.not_found\\",\\n  \\"message\\": \\"Unable to find product with id=\'e0e92d34-aed9-4bb8-9107-89309370c4b\'\\",\\n  \\"validation_errors\\": {}\\n}\\n```\\n\\n# Validation Errors\\n\\nIf an error is due to object validation a `validation_errors` key will also be set within the error response. The validation errors response will be formatted like the example below, and each validation error will have the following keys:\\n- `attribute` The attribute the validation error is associated with.\\n- `type` The type of validation error.\\n- `code` The unique code for the validation error \u2013 this should be used for translations.\\n- `options` Any options that apply to this error \u2013 these can be used for translation interpolation. (For example, a numerical validation error might have options for `min` and `max`.)\\n- `message` The human readable validation error message.\\n\\n```json\\n{\\n  \\"type\\": \\"unprocessable_entity\\",\\n  \\"code\\": \\"product.invalid\\",\\n  \\"message\\": \\"Failed to save product\\",\\n  \\"validation_errors\\": [\\n    {\\n      \\"attribute\\": \\"name\\",\\n      \\"type\\": \\"blank\\",\\n      \\"code\\": \\"product.name.blank\\",\\n      \\"options\\": {},\\n      \\"message\\": \\"can\'t be blank\\"\\n    }\\n  ]\\n}\\n```"},{"title":"Expanding Responses","content":"Many objects allow you to request additional information as an expanded response by using the `expand` request parameter. This parameter is available on all API requests, and applies to the response of that request only. Responses can be expanded in two ways.\\n\\nIn many cases, an object contains the ID of a related object in its response properties. For example, a price has an associated product ID. Those objects can be expanded inline with the expand request parameter. ID fields that can be expanded into objects are noted in this documentation with the expandable label.\\n\\nIn some cases, such as a list of all prices for a product, there are available fields that are not included in responses by default. You can request these fields as an expanded response by using the expand request parameter. Fields that can be included in an expanded response are noted in this documentation with the expandable label.\\n\\nYou can expand recursively by specifying nested fields after a dot (.). For example, requesting `customer` and `customer.billing_address` on a checkout will expand the customer and the customer\'s billing_address.\\n\\nYou can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints.\\n\\nExpanding list requests are plural, but expanding objects within a list are singular. For example, if you wanted to retrieve a checkout\'s line items and each line item\'s price, you would pass `list_items` and `list_item.price` as expand parameters.\\n\\nYou can expand multiple objects at once by identifying multiple items in the exp
1and array. Expansions have a maximum depth of two levels, and you can expand up to 10 objects."},{"title":"Metadata","content":"Some updateable SureCart objects (i.e. `Checkout` and `Product`) have a metadata parameter. You can use this parameter to attach key-value data to these objects.\\n\\nYou can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.\\n\\nMetadata is useful for storing additional, structured information on an object. Metadata is not used by SureCart and won\'t be seen by your users unless you choose to show it to them.\\n\\nDo not store any sensitive information (bank account numbers, card details, etc.) as metadata."},{"title":"Live & Test Mode","content":"When creating `Checkout`, `PaymentIntent`, `Subscription`, etc. objects you can specify `live_mode`. If you set `live_mode=false` then all interactions with processors will be done in their respective live or sandbox modes. This allows you to create test charges, subscriptions, and run full checkout flows without charging real payment methods."},{"title":"Pagination","content":"SureCart utilizes offset-based pagination, and all top-level API resources have support for bulk fetches via \\"list\\" API methods. For instance, you can list products, prices, and customers. These list API methods share a common structure, taking at least these two parameters: `limit`, and `page`. The default pagination limit is `20` and the max is `100`."},{"title":"Webhooks","content":"SureCart uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a subscription is updated or a charge is refunded.\\n\\nYou can create and manage your webhook endpoints through the API endpoints or within your dashboard. From your dashboard you can also see a log of recent events that have been sent.\\n\\n# Events\\n\\nWebhooks are triggered based on events. Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new `Event` object. For example, when a subscription is updated, we create a `subscription.updated` event.\\n\\nThe request payload of each webhook will contain the `Event` object, which is structured like the example below. (Not all events will contain the `previous_attributes` data.)\\n\\n```json\\n  {\\n  \\"id\\": \\"7ec987a4-9ebd-418d-a763-6b4167cb08db\\",\\n  \\"object\\": \\"event\\",\\n  \\"data\\": {\\n    \\"object\\": {\\n      \\"id\\": \\"e22df482-bf17-444e-9059-a25d379ebe43\\",\\n      \\"object\\": \\"purchase\\",\\n      \\"live_mode\\": true,\\n      \\"quantity\\": 1,\\n      \\"revoked\\": false,\\n      \\"revoked_at\\": null,\\n      \\"customer\\": \\"50df3ce4-b7cf-4c34-a554-1ffbbccfd512\\",\\n      \\"line_item\\": null,\\n      \\"product\\": \\"0f932c41-30e5-427c-ba42-31eaf54928af\\",\\n      \\"refund\\": null,\\n      \\"subscription\\": \\"840e09c7-4b93-461c-a28d-986d270fc897\\",\\n      \\"created_at\\": 1643750644,\\n      \\"updated_at\\": 1643750708\\n    },\\n    \\"previous_attributes\\": {\\n      \\"product\\": \\"f1bd0689-31bb-4c23-a146-bbf84c7bc53f\\",\\n      \\"updated_at\\": 1643750674\\n    }\\n  },\\n  \\"type\\": \\"purchase.updated\\",\\n  \\"account\\": \\"6656e57d-6df7-4c97-87c6-50d602f98072\\",\\n  \\"created_at\\": 1643750708\\n}\\n```\\n\\n# Types of Events\\n\\nThe following is a list of all the events that trigger webhooks:\\n- `order.created` \u2013 Occurs when an order is created.\\n- `order.paid` \u2013 Occurs when an order is paid.\\n- `period.paid` \u2013 Occurs when a period is paid.\\n- `purchase.created` \u2013 Occurs whenever a purchase is created.\\n- `purchase.invoked` \u2013 Occurs whenever a purchase is invoked. (This can only occur if the purchase has been previously revoked.)\\n- `purchase.revoked` \u2013 Occurs whenever a purchase is revoked.\\n- `purchase.updated` \u2013 Occurs whenever a purchase is updated. (This only occurs when a subscription\'s product or quantity changes.)\\n- `refund.succeeded` \u2013 Occurs when a refund is successful.\\n\\n# Webhook Signatures\\n\\nAll webhooks include a signature in each request\u2019s `x-webhook-signature` header. This allows you to verify that the events were sent by us, and not by a third party. We generate signatures using a hash-based message authentication code (HMAC) with SHA-256.\\n\\nWe generate a unique signing secret key for each endpoint.  If you use multiple endpoints, you must use the unique signing secret for each one you want to verify signatures on. You can view the signing secret for each endpoint from within your dashboard, or you can retrive it from the API.\\n\\n# Preventing Replay Attacks\\n\\nA replay attack is when an attacker intercepts a valid payload and its signature, then re-transmits them. To mitigate such attacks, we include a timestamp in the `x-webhook-timestamp` header. This timestamp is also part of the signed payload and verified by the signature, so an attacker cannot change the timestamp without invalidating the signature. If the signature is valid but the timestamp is too old, you can have your application reject the payload.\\n\\nWe generate the timestamp and signature each time we send an event to your endpoint. If we retry an event (for example, your endpoint previously replied with a non-2xx status code), then we generate a new signature and timestamp for the new delivery attempt.\\n\\n# Verifying Signatures\\n\\n**Step 1: Extract Signature and Timestamp**\\n\\nThe `signature` is sent in the `x-webhook-signature` header, and the `timestamp` is sent in the `x-webhook-timestamp` header.\\n\\n```bash\\nx-webhook-signature = \\"287ace7f0267943970dca9e895be11a739b532b85dfed8a3d147ca2d08267f48\\"\\nx-webhook-timestamp = \\"1641873601\\"\\n```\\n\\n**Step 2: Prepare Signed Payload String**\\n\\nThe `signed_payload` string is created by concatenating the `timestamp` and the payload with the `.` character.\\n\\n**Step 3: Determine Expected Signature**\\n\\nCompute an HMAC with the SHA256 hash function. Use the endpoint\u2019s signing secret as the key, and use the `signed_payload` string as the message.\\n\\n**Step 4: Compare Signatures**\\n\\
1nCompare the signature in the header to the expected signature.  \\n"}]}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.