{"info":{"title":"Hyperline API","version":"0.0.0"},"servers":[{"url":"https://api.hyperline.co"},{"url":"https://sandbox.api.hyperline.co"}],"openapi":"3.1.0","components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomProperty":{"type":"object","properties":{"id":{"type":"string","description":"Custom property ID.","example":"cfi_efnjehRH304"},"name":{"type":"string","description":"Custom property name.","example":"Test custom property"},"slug":{"type":"string","description":"Custom property unique slug.","example":"test_custom_property"},"type":{"type":"string","enum":["date","boolean","number","text","email","select","multi_select"],"description":"Custom property type."},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription","invoice"]},"description":"Entities on which the custom property is available."},"authorized_values":{"type":["array","null"],"items":{"type":"string"},"description":"If the custom property is of type `select` this is the list of available values."},"api_only":{"type":"boolean","default":false,"description":"If true the custom property will not be displayed in the interface."},"required":{"type":"boolean","default":false,"description":"If true the custom property must be filled for every configured entity."},"default_value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies `required`. Must match the custom property type, and one of `authorized_values` for `select` and `multi_select` types. Dates are ISO 8601 strings. Email defaults must be valid email addresses. Null means no default value.","example":"standard"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the custom property.","example":"2024-01-01T22:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Update date of the custom property.","example":"2024-01-01T22:00:00Z"}},"required":["id","name","slug","type","entities","authorized_values","default_value","created_at","updated_at"]},"PaginatedCustomProperty":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomProperty"},"description":"List of CustomProperty."}},"required":["meta","data"]},"Address":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}},"description":"Customer billing address."},"InvoiceLineItem":{"type":"object","properties":{"id":{"type":"string","description":"Invoice line item ID.","example":"ili_0FACNpeoEFkGu3"},"name":{"type":"string","description":"Name of the line item, corresponding to the related product.","example":"Platform access"},"entry_type":{"type":"string","enum":["debit","credit"],"description":"Indicates whether the line item is a debit or credit.","example":"debit"},"product_id":{"type":["string","null"],"description":"Product ID related to the invoice line item.","example":"itm_KbLcWt2qm5p1S2"},"price_configuration_id":{"type":["string","null"],"description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes.","example":"pcf_monthly"},"product_type":{"type":["string","null"],"enum":["flat_fee","seat","dynamic","credit","bundle"],"description":"Product type related to the invoice line item.","example":"flat_fee"},"units_count":{"type":"number","description":"Count of units of the product related to the invoice line item.","example":1},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Expressed in currency's smallest unit.","example":24000},"amount":{"type":"number","description":"Total amount of the invoice line item. Debit or credit can be distinguished using the `entry_type` field. Expressed in currency's smallest unit.","example":24000},"amount_excluding_tax":{"type":"number","description":"Total amount without the taxes amount of the invoice line item. Expressed in currency's smallest unit.","example":20000},"tax_rate":{"type":"number","description":"Tax rate of the invoice line item.","example":20},"tax_rate_id":{"type":["string","null"],"description":"Custom tax rate ID applied to the invoice line item.","example":null},"tax_amount":{"type":"number","description":"Tax amount of the invoice line item. Expressed in currency's smallest unit.","example":4000},"discount_amount":{"type":"number","description":"Amount corresponding to the discounted part of the total amount of the invoice line item. Expressed in currency's smallest unit.","example":0},"discount_percent":{"type":["number","null"],"description":"Percentage applied to compute the discounted part of the invoice line amount. Only if coupons applied are percentage based."},"period_starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the line item's service period.","example":"2026-10-13T00:00:00.000Z"},"period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the line item's service period.","example":"2026-11-13T00:00:00.000Z"},"revenue_type":{"type":["string","null"],"enum":["recurring","variable","one_off"],"description":"Revenue type classification of the line item.\n\n- `recurring`: Recurring revenue (MRR) from subscription products billed at regular intervals.\n- `variable`: Variable revenue from usage-based products.\n- `one_off`: One-time revenue from single charges or products billed once.","example":"recurring"},"revenue_interval_count":{"type":["number","null"],"description":"Number of billing interval periods for recurring or variable revenue (e.g., 1 with months for monthly, 1 with years for annual). This is separate from the line service dates.","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years","once","all"],"description":"Billing interval unit for recurring or variable revenue (days, weeks, months, quarters, years). One-off revenue has no billing interval.","example":"months"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true},"subscription_id":{"type":["string","null"],"description":"ID of the subscription billed by this line. For consolidated lines, this is the subscription of the source invoice. Null for lines without a subscription.","example":"sub_amiaWZ3lzDIWaoT"},"original_line_item_id":{"type":["string","null"],"description":"ID of the original line item this line item is linked to (used for organisation-based billing).","example":null}},"required":["id","name","entry_type","product_id","price_configuration_id","product_type","units_count","unit_amount","amount","amount_excluding_tax","tax_rate","tax_rate_id","tax_amount","discount_amount","discount_percent","period_starts_at","period_ends_at","revenue_type","revenue_interval_count","revenue_interval_period","display_unit_amount","display_service_period","subscription_id","original_line_item_id"]},"InvoiceCoupon":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":["string","null"],"description":"ID of the subscription coupon the discount comes from, matching `subscription_coupon_id` on the subscription coupons. Null when the coupon was added directly to the invoice.","example":"coos_d9pVekhjoGppuX"},"discount_amount":{"type":["number","null"],"description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"discount_percent":{"type":["number","null"],"description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":null},"line_item_ids":{"type":["array","null"],"items":{"type":"string"},"description":"IDs of the line items to which the coupon applies. Null means all line items.","example":["ili_0FACNpeoEFkGu3"]}},"required":["id","name","subscription_coupon_id","discount_amount","discount_percent","line_item_ids"]},"PaymentMethod":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]}},"required":["id","status","type","last_4_digits","expiration_date","brand"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","type","account_number_ending"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","error_type","type","account_number_ending"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"}},"required":["id","status","type"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"}},"required":["id","status","error_type","type"],"title":"Stripe Link (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"}},"required":["id","status","type"],"title":"PayPal"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"}},"required":["id","status","error_type","type"],"title":"PayPal (errored)"},{"type":"null"}],"description":"Payment method used for a card or direct debit transaction."},"StandardBankAccount":{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"],"description":"Bank account type.\n\n- `standard`: Bank account not connected through open banking.\n- `connected`: Bank account connected through open banking.\n","example":"standard"}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"},"name":{"type":["string","null"],"description":"Bank account display name.","example":"Main account"},"country":{"type":["string","null"],"description":"Bank account country.","example":"FR"}},"required":["id","currency","bank_name","name","country"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"],"description":"Bank account details format.","example":"iban_bic_swift"},"iban":{"type":"string","description":"IBAN.","example":"FR7630006000011234567890189"},"bic_swift":{"type":["string","null"],"description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","iban","bic_swift"],"title":"IBAN / BIC / SWIFT"},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"],"description":"Bank account details format.","example":"sort_code_account_number"},"sort_code":{"type":"string","description":"Sort code.","example":"123456"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"}},"required":["format","sort_code","account_number"],"title":"Sort code / Account number"},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"],"description":"Bank account details format.","example":"account_number_routing_number"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"routing_number":{"type":"string","description":"Routing number.","example":"021000021"}},"required":["format","account_number","routing_number"],"title":"Account number / Routing number"},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"],"description":"Bank account details format.","example":"account_number_bic_swift"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"bic_swift":{"type":"string","description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","account_number","bic_swift"],"title":"Account number / BIC / SWIFT"}],"example":{"format":"iban_bic_swift","iban":"FR7630006000011234567890189","bic_swift":"BNPAFRPP"}}],"title":"Standard bank account"},"ConnectedBankAccount":{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["connected"],"description":"Bank account type.\n\n- `standard`: Bank account not connected through open banking.\n- `connected`: Bank account connected through open banking.\n","example":"connected"},"status":{"type":"string","enum":["active","error"],"description":"Bank account connection status.","example":"active"},"balance":{"type":["number","null"],"description":"Latest known balance for connected bank accounts, expressed in the currency's smallest unit.","example":120500},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date when the connected bank account was last refreshed.","example":"2026-01-15T10:30:00.000Z"},"last_error_type":{"type":["string","null"],"enum":["provider_error","invalid_credentials","unknown"],"description":"Latest connection error type, when the account is errored.","example":null}},"required":["type","status","balance","last_refreshed_at","last_error_type"]},{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"},"name":{"type":["string","null"],"description":"Bank account display name.","example":"Main account"},"country":{"type":["string","null"],"description":"Bank account country.","example":"FR"}},"required":["id","currency","bank_name","name","country"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"],"description":"Bank account details format.","example":"iban_bic_swift"},"iban":{"type":"string","description":"IBAN.","example":"FR7630006000011234567890189"},"bic_swift":{"type":["string","null"],"description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","iban","bic_swift"],"title":"IBAN / BIC / SWIFT"},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"],"description":"Bank account details format.","example":"sort_code_account_number"},"sort_code":{"type":"string","description":"Sort code.","example":"123456"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"}},"required":["format","sort_code","account_number"],"title":"Sort code / Account number"},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"],"description":"Bank account details format.","example":"account_number_routing_number"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"routing_number":{"type":"string","description":"Routing number.","example":"021000021"}},"required":["format","account_number","routing_number"],"title":"Account number / Routing number"},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"],"description":"Bank account details format.","example":"account_number_bic_swift"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"bic_swift":{"type":"string","description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","account_number","bic_swift"],"title":"Account number / BIC / SWIFT"}],"example":{"format":"iban_bic_swift","iban":"FR7630006000011234567890189","bic_swift":"BNPAFRPP"}}],"title":"Connected bank account"},"BankAccount":{"anyOf":[{"$ref":"#/components/schemas/StandardBankAccount"},{"$ref":"#/components/schemas/ConnectedBankAccount"},{"type":"null"}],"description":"Bank account used for a bank transfer transaction."},"InvoiceDeprecated":{"type":"object","properties":{"id":{"type":"string","description":"Invoice ID.","example":"inv_1eTaiytfA0i2Va"},"number":{"type":"string","description":"Invoice number. Generated by Hyperline using the sequential numbering and format defined in your settings.","example":"INV-35"},"type":{"type":"string","enum":["invoice","credit_note","document","child_invoice_ref","child_creditnote_ref"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":["string","null"],"description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF).","example":null},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","open","to_pay","grace_period","partially_paid","paid","voided","closed","error","missing_info","archived","charged_on_parent","pending_parent_concat","pending_consolidation","consolidated","uncollectible"],"description":"Current invoice status.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data).\n- `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment.\n- `to_pay`: Invoice is awaiting payment.\n- `partially_paid`: Invoice is partially paid.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice has been voided and is no longer valid.\n- `closed`: Invoice was not issued and has been discarded.\n- `error`: Invoice failed to be paid.\n- `archived`: A previous version of an invoice.\n- `charged_on_parent`: Invoice is charged on the parent customer.\n- `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped.\n- `uncollectible`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.\n","example":"paid"},"reference":{"type":["string","null"],"description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"source":{"type":"string","enum":["hyperline","api","pennylane","chargebee","stripe","lago","sequence","other"],"description":"Source of the invoice.\n    - `hyperline`: Invoice created by Hyperline.\n    - `api`: Invoice created through the API.\n    - `other`: Invoice created by an external source.\n","example":"hyperline"},"origin":{"type":["string","null"],"enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"],"description":"What generated the invoice, whatever the channel used to create it (see `source`). New values may be added.\n    - `subscription`: Generated by a subscription: renewal, update, transition, cancellation, reactivation or reinstatement.\n    - `quote`: Generated by a quote.\n    - `wallet`: Wallet top-up, free credits granted or expiration of the remaining balance.\n    - `customer_credits`: Purchase of customer credits.\n    - `invoice`: Built from other invoices: a credit note correcting an invoice, a consolidated invoice or an invoice re-billed to a parent organisation.\n    - `manual`: Standalone invoice or credit note created by a user, in the app or through the API.\n    - `import`: Imported from an external billing provider.\nNull for some invoices created before October 12, 2026.\n","example":"subscription"},"total_amount":{"type":"number","description":"Sum of the amount and taxes amount of all products on the invoice. Expressed in currency's smallest unit.","example":24000},"amount_due":{"type":"number","description":"Amount still need to be paid for the invoice. Expressed in currency's smallest unit.","example":0},"amount_paid":{"type":"number","description":"Amount already paid for the invoice. Expressed in currency's smallest unit.","example":24000},"amount_fixed":{"type":"number","description":"Amount corresponding to the recurring non-variable part of the total amount. Expressed in currency's smallest unit.","example":20000},"amount_excluding_tax":{"type":"number","description":"Total amount without the taxes amount. Expressed in currency's smallest unit.","example":20000},"tax_rate":{"type":"number","description":"Deprecated field, please use `line_items[].tax_rate`.","deprecated":true},"tax_amount":{"type":"number","description":"Tax amount of the invoice. Expressed in currency's smallest unit.","example":4000},"tax_scheme":{"type":"string","enum":["exempt","standard","reverse_charge","manual","not_eligible"],"description":"Tax scheme of the invoice.\n\n- `standard`: Tax rate is resolved depending on local tax regulations.\n- `exempt`: No tax rate applied because the customer country doesn't require it.\n- `reverse_charge`: No tax rate applied because the customer is eligible to EU reverse charge.\n- `manual`: Tax rate has been manually specified when creating the invoice.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"standard"},"discount_amount":{"type":"number","description":"Amount corresponding to the discounted part of the total amount. Expressed in currency's smallest unit.","example":0},"conversion_rate":{"type":["number","null"],"description":"Conversion rate used between the invoice currency and your accounting currency.","example":1},"converted_amount":{"type":["number","null"],"description":"Amount converted using the conversion rate. Expressed in currency's smallest unit.","example":24000},"converted_at":{"type":["string","null"],"format":"date-time","description":"Date of the conversion of the amount.","example":"2026-10-13T02:00:00.000Z"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"custom_note":{"type":["string","null"],"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":["string","null"],"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":["string","null"],"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"email":{"type":["string","null"],"description":"Email to which all communications will be sent.","example":"billing@acme.com"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID.","example":null},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_id`.","deprecated":true},"tax_id":{"type":["string","null"],"description":"Value of the customer tax ID.","example":"FR123456789"},"local_tax_number":{"type":["string","null"],"description":"Customer local tax number.","example":"12/345/67890"},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"address":{"$ref":"#/components/schemas/Address"}},"required":["id","name","email","external_id","vat_number","tax_id","local_tax_number","registration_number","address"]},"seller":{"type":"object","properties":{"id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"name":{"type":"string","description":"Name of the invoicing entity","example":"Name of the invoicing entity"},"tax_id":{"type":["string","null"],"description":"Tax identifier / VAT number of the invoicing entity","example":"FR5878986578"},"registration_number":{"type":["string","null"],"description":"Legal registration number of the invoicing entity, as it stood when the invoice was emitted.","example":"87898657800016"},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"description":"Seller address."}]}},"required":["id","name","tax_id","registration_number","address"]},"subscription_id":{"type":["string","null"],"description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"period_starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the billing period of the invoice.","example":"2026-10-13T00:00:00.000Z"},"period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the billing period of the invoice.","example":"2026-11-13T00:00:00.000Z"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2026-10-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2026-11-12T00:00:00.000Z"},"issuing_method":{"type":"string","enum":["manual","scheduled"],"description":"\nHow the invoice is issued.\n\n- `manual`: Issued when finalized, by a user or by the invoicing flow.\n- `scheduled`: Draft finalized automatically at the start of its issue date (`issued_at`), in the invoice timezone.\n","example":"manual"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the invoice, previously paid. A credit note exists with an original invoice ID equals to this invoice ID.","example":null},"grace_period_ended_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice grace period ended. This happens at the issue date + the grace period duration configured in your settings.","example":null},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice was fully paid.","example":"2026-10-15T14:01:56.000Z"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Date of the last update.","example":"2026-10-15T14:01:56.000Z"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Values for custom properties defined for the `invoice` entity, keyed by slug.","example":null},"additional_display_fields":{"type":["array","null"],"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"],"description":"Display a standard invoice field."},"field":{"type":"string","enum":["customer_id","subscription_id","quote_id"],"description":"Standard invoice field to display."}},"required":["type","field"],"title":"Standard field"},{"type":"object","properties":{"type":{"type":"string","enum":["custom_property"],"description":"Display an invoice or customer custom property."},"slug":{"type":"string","description":"Slug of the invoice or customer custom property to display."}},"required":["type","slug"],"title":"Custom property"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Display a custom label and value."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"Label displayed on the invoice."},"value":{"type":"string","maxLength":500,"description":"Value displayed on the invoice."}},"required":["type","label","value"],"title":"Custom text"}]},"maxItems":20,"description":"Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.","example":null},"original_invoice_id":{"type":["string","null"],"description":"ID of the reference invoice this entity is linked to. For credit notes, this is not necessarily an invoice receiving credit; use `allocations` for applications.","example":null},"original_invoice_number":{"type":["string","null"],"description":"Number of the original invoice this entity is linked to (only used for credit note).","example":null},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"},"description":"List of line items composing the invoice."},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the credit.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Credit amount applied to the invoice, in the currency's smallest unit.","example":780000}},"required":["invoice_id","amount"]},"description":"Current invoice applications made by this credit note. Only present for credit notes."},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCoupon"},"description":"List of coupons applied to the invoice."},"transactions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction External failed"}]},"description":"List of transactions related to the invoice."},"public_url":{"type":"string","format":"uri","description":"Public URL of the invoice page where the customer can pay the invoice."}},"required":["id","number","type","document_name","status","reference","purchase_order","currency","source","origin","total_amount","amount_due","amount_paid","amount_fixed","amount_excluding_tax","tax_rate","tax_amount","tax_scheme","discount_amount","conversion_rate","converted_amount","converted_at","payment_method_id","bank_account_id","custom_note","additional_info","footer","customer","seller","subscription_id","period_starts_at","period_ends_at","emitted_at","due_at","issuing_method","refunded_at","grace_period_ended_at","settled_at","updated_at","properties","custom_properties","additional_display_fields","original_invoice_id","original_invoice_number","line_items","coupons","transactions","public_url"]},"PaginatedInvoiceV1":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDeprecated"},"description":"List of InvoiceV1."}},"required":["meta","data"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"Invoice ID.","example":"inv_1eTaiytfA0i2Va"},"number":{"type":"string","description":"Invoice number. Generated by Hyperline using the sequential numbering and format defined in your settings.","example":"INV-35"},"type":{"type":"string","enum":["invoice","credit_note","document","child_invoice_ref","child_creditnote_ref"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":["string","null"],"description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF).","example":null},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","open","to_pay","grace_period","partially_paid","paid","voided","closed","error","missing_info","archived","charged_on_parent","pending_parent_concat","pending_consolidation","consolidated","uncollectible"],"description":"Current invoice status.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data).\n- `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment.\n- `to_pay`: Invoice is awaiting payment.\n- `partially_paid`: Invoice is partially paid.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice has been voided and is no longer valid.\n- `closed`: Invoice was not issued and has been discarded.\n- `error`: Invoice failed to be paid.\n- `archived`: A previous version of an invoice.\n- `charged_on_parent`: Invoice is charged on the parent customer.\n- `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped.\n- `uncollectible`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.\n","example":"paid"},"reference":{"type":["string","null"],"description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"source":{"type":"string","enum":["hyperline","api","pennylane","chargebee","stripe","lago","sequence","other"],"description":"Source of the invoice.\n    - `hyperline`: Invoice created by Hyperline.\n    - `api`: Invoice created through the API.\n    - `other`: Invoice created by an external source.\n","example":"hyperline"},"origin":{"type":["string","null"],"enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"],"description":"What generated the invoice, whatever the channel used to create it (see `source`). New values may be added.\n    - `subscription`: Generated by a subscription: renewal, update, transition, cancellation, reactivation or reinstatement.\n    - `quote`: Generated by a quote.\n    - `wallet`: Wallet top-up, free credits granted or expiration of the remaining balance.\n    - `customer_credits`: Purchase of customer credits.\n    - `invoice`: Built from other invoices: a credit note correcting an invoice, a consolidated invoice or an invoice re-billed to a parent organisation.\n    - `manual`: Standalone invoice or credit note created by a user, in the app or through the API.\n    - `import`: Imported from an external billing provider.\nNull for some invoices created before October 12, 2026.\n","example":"subscription"},"total_amount":{"type":"number","description":"Sum of the amount and taxes amount of all products on the invoice. Expressed in currency's smallest unit.","example":24000},"amount_due":{"type":"number","description":"Amount still need to be paid for the invoice. Expressed in currency's smallest unit.","example":0},"amount_paid":{"type":"number","description":"Amount already paid for the invoice. Expressed in currency's smallest unit.","example":24000},"amount_fixed":{"type":"number","description":"Amount corresponding to the recurring non-variable part of the total amount. Expressed in currency's smallest unit.","example":20000},"amount_excluding_tax":{"type":"number","description":"Total amount without the taxes amount. Expressed in currency's smallest unit.","example":20000},"tax_amount":{"type":"number","description":"Tax amount of the invoice. Expressed in currency's smallest unit.","example":4000},"tax_scheme":{"type":"string","enum":["exempt","standard","reverse_charge","manual","not_eligible"],"description":"Tax scheme of the invoice.\n\n- `standard`: Tax rate is resolved depending on local tax regulations.\n- `exempt`: No tax rate applied because the customer country doesn't require it.\n- `reverse_charge`: No tax rate applied because the customer is eligible to EU reverse charge.\n- `manual`: Tax rate has been manually specified when creating the invoice.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"standard"},"discount_amount":{"type":"number","description":"Amount corresponding to the discounted part of the total amount. Expressed in currency's smallest unit.","example":0},"conversion_rate":{"type":["number","null"],"description":"Conversion rate used between the invoice currency and your accounting currency.","example":1},"converted_amount":{"type":["number","null"],"description":"Amount converted using the conversion rate. Expressed in currency's smallest unit.","example":24000},"converted_at":{"type":["string","null"],"format":"date-time","description":"Date of the conversion of the amount.","example":"2026-10-13T02:00:00.000Z"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"custom_note":{"type":["string","null"],"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":["string","null"],"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":["string","null"],"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"email":{"type":["string","null"],"description":"Email to which all communications will be sent.","example":"billing@acme.com"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID.","example":null},"tax_id":{"type":["string","null"],"description":"Value of the customer tax ID.","example":"FR123456789"},"local_tax_number":{"type":["string","null"],"description":"Customer local tax number.","example":"12/345/67890"},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"address":{"$ref":"#/components/schemas/Address"}},"required":["id","name","email","external_id","tax_id","local_tax_number","registration_number","address"]},"seller":{"type":"object","properties":{"id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"name":{"type":"string","description":"Name of the invoicing entity","example":"Name of the invoicing entity"},"tax_id":{"type":["string","null"],"description":"Tax identifier / VAT number of the invoicing entity","example":"FR5878986578"},"registration_number":{"type":["string","null"],"description":"Legal registration number of the invoicing entity, as it stood when the invoice was emitted.","example":"87898657800016"},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"description":"Seller address."}]}},"required":["id","name","tax_id","registration_number","address"]},"subscription_id":{"type":["string","null"],"description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"period_starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the billing period of the invoice.","example":"2026-10-13T00:00:00.000Z"},"period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the billing period of the invoice.","example":"2026-11-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2026-11-12T00:00:00.000Z"},"issuing_method":{"type":"string","enum":["manual","scheduled"],"description":"\nHow the invoice is issued.\n\n- `manual`: Issued when finalized, by a user or by the invoicing flow.\n- `scheduled`: Draft finalized automatically at the start of its issue date (`issued_at`), in the invoice timezone.\n","example":"manual"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the invoice, previously paid. A credit note exists with an original invoice ID equals to this invoice ID.","example":null},"grace_period_ended_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice grace period ended. This happens at the issue date + the grace period duration configured in your settings.","example":null},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice was fully paid.","example":"2026-10-15T14:01:56.000Z"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Date of the last update.","example":"2026-10-15T14:01:56.000Z"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Values for custom properties defined for the `invoice` entity, keyed by slug.","example":null},"additional_display_fields":{"type":["array","null"],"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"],"description":"Display a standard invoice field."},"field":{"type":"string","enum":["customer_id","subscription_id","quote_id"],"description":"Standard invoice field to display."}},"required":["type","field"],"title":"Standard field"},{"type":"object","properties":{"type":{"type":"string","enum":["custom_property"],"description":"Display an invoice or customer custom property."},"slug":{"type":"string","description":"Slug of the invoice or customer custom property to display."}},"required":["type","slug"],"title":"Custom property"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Display a custom label and value."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"Label displayed on the invoice."},"value":{"type":"string","maxLength":500,"description":"Value displayed on the invoice."}},"required":["type","label","value"],"title":"Custom text"}]},"maxItems":20,"description":"Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.","example":null},"original_invoice_id":{"type":["string","null"],"description":"ID of the reference invoice this entity is linked to. For credit notes, this is not necessarily an invoice receiving credit; use `allocations` for applications.","example":null},"original_invoice_number":{"type":["string","null"],"description":"Number of the original invoice this entity is linked to (only used for credit note).","example":null},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"},"description":"List of line items composing the invoice."},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the credit.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Credit amount applied to the invoice, in the currency's smallest unit.","example":780000}},"required":["invoice_id","amount"]},"description":"Current invoice applications made by this credit note. Only present for credit notes."},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCoupon"},"description":"List of coupons applied to the invoice."},"transactions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction External failed"}]},"description":"List of transactions related to the invoice."},"public_url":{"type":"string","format":"uri","description":"Public URL of the invoice page where the customer can pay the invoice."},"issued_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2026-10-13T00:00:00.000Z"}},"required":["id","number","type","document_name","status","reference","purchase_order","currency","source","origin","total_amount","amount_due","amount_paid","amount_fixed","amount_excluding_tax","tax_amount","tax_scheme","discount_amount","conversion_rate","converted_amount","converted_at","payment_method_id","bank_account_id","custom_note","additional_info","footer","customer","seller","subscription_id","period_starts_at","period_ends_at","due_at","issuing_method","refunded_at","grace_period_ended_at","settled_at","updated_at","properties","custom_properties","additional_display_fields","original_invoice_id","original_invoice_number","line_items","coupons","transactions","public_url","issued_at"]},"CursorPaginatedInvoice":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"List of Invoice."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"InvoiceElectronicInvoicing":{"type":"object","properties":{"system":{"type":"string","enum":["sdi","invoice_xpress","ksef","factur_x","fr_pa","chorus_pro","zugferd","xrechnung","veri_factu","facturae","peppol"],"description":"Electronic invoicing system.\n\n- `sdi`: Italy's Sistema di Interscambio (SDI).\n- `invoice_xpress`: InvoiceXpress for Portugal.\n- `ksef`: Poland's KSeF system.\n- `factur_x`: Factur-X hybrid PDF and XML format for France.\n- `fr_pa`: France e-invoicing through an approved platform.\n- `chorus_pro`: Chorus Pro for French public-sector invoices.\n- `zugferd`: ZUGFeRD hybrid PDF and XML format for Germany.\n- `xrechnung`: XRechnung format for German public-sector invoices.\n- `veri_factu`: Spain's VERI*FACTU system.\n- `facturae`: FacturaE format for Spanish public-sector invoices.\n- `peppol`: Peppol electronic invoicing network.\n","example":"ksef"},"status":{"type":"string","enum":["none","pending","processing","completed","failed"],"description":"Electronic invoicing workflow status.\n\n- `none`: No transmission attempt has been recorded. Check `validation` for missing requirements or exclusions.\n- `pending`: A transmission attempt has been created and is awaiting processing.\n- `processing`: The transmission workflow is in progress.\n- `completed`: The workflow has completed. This does not necessarily mean the recipient or tax authority has accepted the invoice.\n- `failed`: The latest attempt failed, including failures detected before submission. Check `error` for failure details and `validation` for current requirements.\n","example":"completed"},"number":{"type":["string","null"],"description":"Fiscal document identifier returned by the system, such as the KSeF number. Null until available on a completed workflow."},"validation":{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["valid"],"description":"Invoice validation outcome.\n\n- `valid`: The invoice passes the checks performed by this endpoint. Provider registration and recipient acceptance are not verified.\n- `invalid`: Required invoice information is missing or invalid. Check `reason` for the requirement to address.\n- `ignored`: The invoice is excluded from this system's transmission scope. Check `reason` for the exclusion.\n"}},"required":["outcome"]},{"type":"object","properties":{"outcome":{"type":"string","enum":["invalid","ignored"],"description":"Invoice validation outcome.\n\n- `valid`: The invoice passes the checks performed by this endpoint. Provider registration and recipient acceptance are not verified.\n- `invalid`: Required invoice information is missing or invalid. Check `reason` for the requirement to address.\n- `ignored`: The invoice is excluded from this system's transmission scope. Check `reason` for the exclusion.\n"},"reason":{"type":"string","description":"Machine-readable reason for an `invalid` or `ignored` validation outcome. Absent when the outcome is `valid`."}},"required":["outcome","reason"]},{"type":"null"}],"description":"Current validation of the invoice billing snapshot. Present when status is `none` or `failed`; null when status is `pending`, `processing`, or `completed`. Provider registration is not checked by this read endpoint. A valid result does not guarantee provider acceptance."},"error":{"type":["object","null"],"properties":{"type":{"type":"string","description":"Machine-readable failure category."},"message":{"type":"string","description":"Human-readable reason for the failure."}},"required":["type","message"],"description":"Details of the latest failed attempt, including validation failures before submission. Null when status is not `failed` or no failure details were recorded."},"created_at":{"type":["string","null"],"format":"date-time","description":"Time the latest transmission attempt was created, including attempts that failed validation before submission. Null when status is `none`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"completed_at":{"type":["string","null"],"format":"date-time","description":"Time the workflow completed. Null unless status is `completed` and a completion time was recorded. This is not necessarily the recipient's or tax authority's acceptance time. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["system","status","number","validation","error","created_at","completed_at"]},"InvoiceDetailsV1":{"allOf":[{"$ref":"#/components/schemas/InvoiceDeprecated"},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"electronic_invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceElectronicInvoicing"},"description":"Electronic invoicing status for each applicable system. Empty for drafts or invoices without an applicable configuration."}},"required":["integrations","electronic_invoices"]}]},"CreateInvoiceLineItem":{"allOf":[{"type":"object","properties":{"description":{"type":"string","maxLength":5000,"description":"Description of the line item as it will appear on the invoice. Default to the product description.","example":"Access fee from October 13 to November 13, 2026"},"product_id":{"type":"string","description":"Product ID related to the invoice line item. Required for new manual invoice lines when the invoicing entity requires catalog products.","example":"itm_KbLcWt2qm5p1S2"},"price_configuration_id":{"type":["string","null"],"description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes.","example":"pcf_monthly"},"units_count":{"type":"number","default":1,"description":"Count of units of the product related to the invoice line item.","example":1},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Tax rate of the invoice line item.","example":20},"period_start":{"type":"string","format":"date-time","description":"Start date of the line item's service period.","example":"2026-10-13T00:00:00.000Z"},"period_end":{"type":"string","format":"date-time","description":"End date of the line item's service period.","example":"2026-11-13T00:00:00.000Z"},"revenue_type":{"type":"string","enum":["recurring","variable","one_off"],"description":"Revenue classification for custom or imported lines without resolvable subscription or catalog billing terms. Derived automatically when a source exists; conflicting explicit values are rejected. New lines without a source or explicit classification default to one_off. Existing lines retain their classification unless corrected.","example":"recurring"},"revenue_interval_count":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Number of billing interval periods for recurring or variable revenue (e.g., 1 with months for monthly, 1 with years for annual). This is separate from the line service dates.","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years"],"description":"Billing interval unit for recurring or variable revenue (days, weeks, months, quarters, years). One-off revenue has no billing interval.","example":"months"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true}}},{"anyOf":[{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["product_id"],"title":"Catalog product"},{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000},"price_configuration_id":{"type":"string","description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes."}},"required":["price_configuration_id"],"title":"Catalog price"},{"type":"object","properties":{"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["name","unit_amount"],"title":"Custom"}]}]},"CreditNoteAllocationInput":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the credit.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"integer","exclusiveMinimum":0,"description":"Credit amount applied to the invoice, in the currency's smallest unit.","example":1000}},"required":["invoice_id","amount"],"additionalProperties":false},"CreateInvoice":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code of the invoice. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"status":{"type":"string","enum":["to_pay","paid","draft"],"default":"paid","description":"Current invoice status.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data).\n- `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment.\n- `to_pay`: Invoice is awaiting payment.\n- `partially_paid`: Invoice is partially paid.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice has been voided and is no longer valid.\n- `closed`: Invoice was not issued and has been discarded.\n- `error`: Invoice failed to be paid.\n- `archived`: A previous version of an invoice.\n- `charged_on_parent`: Invoice is charged on the parent customer.\n- `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped.\n- `uncollectible`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.\n","example":"paid"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"number":{"type":"string","description":"Invoice number. If specified, the invoice will be considered as imported from an external source and the number will not be generated by Hyperline. You are responsible for avoiding duplicates and ensuring it does not impact the numbering sequence in Hyperline.","example":"INV-35"},"type":{"type":"string","enum":["invoice","credit_note","document"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":"string","description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF)."},"reference":{"type":"string","description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":"string","description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"custom_note":{"type":"string","maxLength":20000,"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":"string","maxLength":20000,"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":"string","maxLength":20000,"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Deprecated field, please use `line_items[].tax_rate`.","deprecated":true},"tax_scheme":{"type":"string","enum":["auto","not_eligible"],"default":"auto","description":"Tax scheme of the invoice.\n\n- `auto`: Tax is automatically computed and applied.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"auto"},"payment_method_strategy":{"type":"string","enum":["current","external"],"description":"\nPayment method strategy used to charge the invoice. Only applies to `to_pay` status.\n\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payment of the invoice outside of Hyperline.\n","example":"external"},"payment_method_id":{"type":"string","description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"subscription_id":{"type":"string","description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2026-10-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2026-11-12T00:00:00.000Z"},"settled_at":{"type":"string","format":"date-time","description":"Date the invoice was fully paid.","example":"2026-10-15T14:01:56.000Z"},"issuing_method":{"type":"string","enum":["manual","scheduled"],"description":"Set to `scheduled` to finalize the draft invoice automatically on its issue date (`emitted_at`), resolved to the start of that day in the customer timezone. Requires `status` to be `draft` and an issue date after today. Default to `manual`.","example":"manual"},"send_email":{"type":"boolean","default":true,"description":"Whether to send the paid invoice or credit note email when creating with `status: paid` (the default status). Defaults to true and respects existing email settings. Set to false to suppress this email without suppressing lifecycle events or webhooks. Does not affect invoices created as `draft` or `to_pay`, or later email requests.","example":false},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Values for custom properties defined for the `invoice` entity, keyed by slug."},"additional_display_fields":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"],"description":"Display a standard invoice field."},"field":{"type":"string","enum":["customer_id","subscription_id","quote_id"],"description":"Standard invoice field to display."}},"required":["type","field"],"title":"Standard field"},{"type":"object","properties":{"type":{"type":"string","enum":["custom_property"],"description":"Display an invoice or customer custom property."},"slug":{"type":"string","description":"Slug of the invoice or customer custom property to display."}},"required":["type","slug"],"title":"Custom property"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Display a custom label and value."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"Label displayed on the invoice."},"value":{"type":"string","maxLength":500,"description":"Value displayed on the invoice."}},"required":["type","label","value"],"title":"Custom text"}]},"maxItems":20,"description":"Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug."},"original_invoice_id":{"type":["string","null"],"description":"Reference invoice for a credit note, including an imported invoice. Must belong to the same customer, currency and invoicing entity. This reference does not apply credit; use `allocations` separately.","example":"inv_2QdJDDUej969ev"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceLineItem"},"minItems":1},"allocations":{"type":"array","items":{"$ref":"#/components/schemas/CreditNoteAllocationInput"},"maxItems":100,"description":"Invoice applications for a credit note, independent of `original_invoice_id`. Omit or send an empty array to apply no credit. Created atomically with the credit note. Amounts must fit the available credit and target balances. For `paid` credit notes, non-empty allocations and explicit transactions must settle the full amount; no refund transaction is inferred."},"transactions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_id":{"type":"string","description":"Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.","example":"pm_1xMpj5bwRqN7LM"}},"required":["amount","process_at","payment_method_id"],"title":"Payment method"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer"]},"bank_account_id":{"type":"string","description":"Bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"}},"required":["amount","process_at","payment_method_type"],"title":"Bank transfer"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_transaction_id":{"type":"string","description":"ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the `amount` and `process_at` fields may be overridden by the transaction data."}},"required":["provider_name","provider_transaction_id"],"title":"Provider transaction"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["external"]}},"required":["amount","process_at"],"title":"External transaction"}]}},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage overriding the catalog coupon value, applied to the eligible line items amount (excluding tax), between 0 (excluded) and 100. Cannot be combined with `discount_amount`.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_amount","line_item_indexes"],"title":"Inline coupon"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage of the eligible line items amount (excluding tax) to discount, between 0 (excluded) and 100.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_percent"],"additionalProperties":false,"title":"Inline percent coupon"}]}}},"required":["customer_id","line_items"]},"CreateCreditNote":{"type":"object","properties":{"amount_including_tax":{"type":"number","description":"Amount of the credit note. If not specified, the amount will be computed from the original invoice.","example":24000},"status":{"type":"string","enum":["to_pay","draft"],"description":"Status of the credit note.\n\n- `to_pay`: Credit note is awaiting payment.\n- `draft`: Credit note is in draft mode (not finalized yet).\n","example":"to_pay"},"trigger_refund":{"type":"boolean","description":"Whether to trigger a refund for the credit note amount. Defaults to `false`. When `true`, the refund is issued using `refund_method`.","example":true},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"How the refund should be settled. Only used when `trigger_refund` is `true`. Defaults to `original_payment_method`.\n\n- `wallet`: Credit the customer's wallet with the refunded amount.\n- `original_payment_method`: Refund to the payment method used on the original invoice.\n- `external`: Mark the refund as settled externally (no automatic transfer).\n","example":"wallet"}}},"InvoiceDetails":{"allOf":[{"$ref":"#/components/schemas/Invoice"},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"electronic_invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceElectronicInvoicing"},"description":"Electronic invoicing status for each applicable system. Empty for drafts or invoices without an applicable configuration."}},"required":["integrations","electronic_invoices"]}]},"UpdateCreditNoteAllocations":{"type":"object","properties":{"allocations":{"type":"array","items":{"$ref":"#/components/schemas/CreditNoteAllocationInput"},"maxItems":100,"description":"Complete replacement of this credit note's invoice applications. An empty array removes all applications, preserving the original invoice reference. Targets must share the customer, currency and invoicing entity. Amounts exceeding available credit or invoice balances are rejected."}},"required":["allocations"],"additionalProperties":false},"UpdateFinalizedInvoiceLineItem":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing line item of this invoice. Send it back to keep the line linked to its subscription, with its revenue type and tax. A line item without an ID is created as a new one-off line.","example":"ili_0FACNpeoEFkGu3"},"product_id":{"type":"string","description":"Product ID related to the invoice line item. Required for new manual invoice lines when the invoicing entity requires catalog products.","example":"itm_KbLcWt2qm5p1S2"},"price_configuration_id":{"type":["string","null"],"description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes.","example":"pcf_monthly"},"revenue_type":{"type":"string","enum":["recurring","variable","one_off"],"description":"Revenue classification for custom or imported lines without resolvable subscription or catalog billing terms. Derived automatically when a source exists; conflicting explicit values are rejected. New lines without a source or explicit classification default to one_off. Existing lines retain their classification unless corrected.","example":"recurring"},"revenue_interval_count":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Number of billing interval periods for recurring or variable revenue (e.g., 1 with months for monthly, 1 with years for annual). This is separate from the line service dates.","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years"],"description":"Billing interval unit for recurring or variable revenue (days, weeks, months, quarters, years). One-off revenue has no billing interval.","example":"months"}},"required":["id"],"additionalProperties":false,"title":"Finalized line item"},"UpdateInvoiceLineItem":{"allOf":[{"type":"object","properties":{"description":{"type":"string","maxLength":5000,"description":"Description of the line item as it will appear on the invoice. Default to the product description.","example":"Access fee from October 13 to November 13, 2026"},"product_id":{"type":"string","description":"Product ID related to the invoice line item. Required for new manual invoice lines when the invoicing entity requires catalog products.","example":"itm_KbLcWt2qm5p1S2"},"price_configuration_id":{"type":["string","null"],"description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes.","example":"pcf_monthly"},"units_count":{"type":"number","default":1,"description":"Count of units of the product related to the invoice line item.","example":1},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Tax rate of the invoice line item.","example":20},"period_start":{"type":"string","format":"date-time","description":"Start date of the line item's service period.","example":"2026-10-13T00:00:00.000Z"},"period_end":{"type":"string","format":"date-time","description":"End date of the line item's service period.","example":"2026-11-13T00:00:00.000Z"},"revenue_type":{"type":"string","enum":["recurring","variable","one_off"],"description":"Revenue classification for custom or imported lines without resolvable subscription or catalog billing terms. Derived automatically when a source exists; conflicting explicit values are rejected. New lines without a source or explicit classification default to one_off. Existing lines retain their classification unless corrected.","example":"recurring"},"revenue_interval_count":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Number of billing interval periods for recurring or variable revenue (e.g., 1 with months for monthly, 1 with years for annual). This is separate from the line service dates.","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years"],"description":"Billing interval unit for recurring or variable revenue (days, weeks, months, quarters, years). One-off revenue has no billing interval.","example":"months"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true}}},{"anyOf":[{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["product_id"],"title":"Catalog product"},{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000},"price_configuration_id":{"type":"string","description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes."}},"required":["price_configuration_id"],"title":"Catalog price"},{"type":"object","properties":{"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["name","unit_amount"],"title":"Custom"}]},{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing line item of this invoice. Send it back to keep the line linked to its subscription, with its revenue type and tax. A line item without an ID is created as a new one-off line.","example":"ili_0FACNpeoEFkGu3"}}}]},"UpdateInvoice":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","credit_note","document"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":["string","null"],"description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF)."},"reference":{"type":["string","null"],"description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"custom_note":{"type":["string","null"],"maxLength":20000,"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":["string","null"],"maxLength":20000,"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":["string","null"],"maxLength":20000,"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"tax_scheme":{"type":"string","enum":["auto","not_eligible"],"default":"auto","description":"Tax scheme of the invoice.\n\n- `auto`: Tax is automatically computed and applied.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"auto"},"issuing_method":{"type":"string","enum":["manual","scheduled"],"description":"Set to `scheduled` to finalize the draft invoice automatically on its issue date (`emitted_at`), in the invoice timezone. The issue date must be after today. Set to `manual` to unschedule the invoice.","example":"manual"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the draft invoice. For a scheduled invoice, the day on which it is automatically finalized.","example":"2026-10-13T00:00:00.000Z"},"line_items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/UpdateFinalizedInvoiceLineItem"},{"$ref":"#/components/schemas/UpdateInvoiceLineItem"}]},"minItems":1,"description":"Draft edits replace the line list. Finalized invoice line updates accept up to 100 lines per request and update only the specified existing line IDs and allow product and price links and revenue classification; amounts and taxes stay unchanged. Accounting postings are rebuilt atomically; updates affecting closed accounting periods are rejected."},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage overriding the catalog coupon value, applied to the eligible line items amount (excluding tax), between 0 (excluded) and 100. Cannot be combined with `discount_amount`.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_amount","line_item_indexes"],"title":"Inline coupon"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage of the eligible line items amount (excluding tax) to discount, between 0 (excluded) and 100.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_percent"],"additionalProperties":false,"title":"Inline percent coupon"}]}},"payment_method_type":{"type":["string","null"],"enum":["external"]},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"subscription_id":{"type":["string","null"],"description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"original_invoice_id":{"type":"string","description":"Fill a missing reference invoice on an imported credit note. Cannot replace or clear an existing reference. Does not change allocations. Send this field alone.","example":"inv_2QdJDDUej969ev"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Values for custom properties defined for the `invoice` entity, keyed by slug."},"additional_display_fields":{"type":["array","null"],"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"],"description":"Display a standard invoice field."},"field":{"type":"string","enum":["customer_id","subscription_id","quote_id"],"description":"Standard invoice field to display."}},"required":["type","field"],"title":"Standard field"},{"type":"object","properties":{"type":{"type":"string","enum":["custom_property"],"description":"Display an invoice or customer custom property."},"slug":{"type":"string","description":"Slug of the invoice or customer custom property to display."}},"required":["type","slug"],"title":"Custom property"},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Display a custom label and value."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"Label displayed on the invoice."},"value":{"type":"string","maxLength":500,"description":"Value displayed on the invoice."}},"required":["type","label","value"],"title":"Custom text"}]},"maxItems":20,"description":"Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug."},"customer":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"local_tax_number":{"type":["string","null"]},"address":{"$ref":"#/components/schemas/Address"}},"description":"Override customer details on the invoice. Only allowed for draft or grace period invoices."}}},"InvoiceEventBilling":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice the event is attached to.","example":"inv_1eTaiytfA0i2Va"},"invoice_line_item_id":{"type":["string","null"],"description":"ID of the invoice line item the event is attributed to. `null` for events not bound to a specific line item.","example":"ili_0FACNpeoEFkGu3"},"product_id":{"type":["string","null"],"description":"ID of the product the event is attributed to. `null` for events not bound to a specific product.","example":"itm_KbLcWt2qm5p1S2"},"price_name":{"type":["string","null"],"description":"Name of the price group (aggregator filter) the event was charged against. `null` if the product has a single price.","example":null},"amount":{"type":["number","null"],"description":"Amount billed for this event, including tax, in the invoice currency. Expressed in currency's smallest unit.","example":12},"amount_excluding_tax":{"type":["number","null"],"description":"Amount billed for this event, excluding tax, in the invoice currency. Expressed in currency's smallest unit.","example":10},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency of the invoice (and of the event amounts).","example":"EUR"}},"required":["invoice_id","invoice_line_item_id","product_id","price_name","amount","amount_excluding_tax","currency"],"description":"Billing attribution and pricing data for the event on this invoice."},"InvoiceEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event record ID (unique identifier of the billable event).","example":"evt_01HW8R3K2N9YV5Z7TQXJ4M2GHD"},"name":{"type":["string","null"],"description":"Display name rendered from the product's event-name template. `null` when no template is configured.","example":"API call from europe-west1"},"event_type":{"type":"string","description":"Raw event type as ingested.","example":"api_call"},"timestamp":{"type":"string","format":"date-time","description":"Date the event occurred.","example":"2026-10-20T14:32:11.000Z"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Raw event properties as ingested.","example":{"region":"europe-west1","endpoint":"/v1/customers"}},"billing":{"$ref":"#/components/schemas/InvoiceEventBilling"}},"required":["id","name","event_type","timestamp","properties","billing"]},"PaginatedInvoiceEvent":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEvent"},"description":"List of InvoiceEvent."}},"required":["meta","data"]},"AccountingPaginationMeta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of matching resources."},"taken":{"type":"number","description":"Number of resources returned."},"skipped":{"type":"number","description":"Number of resources skipped."}},"required":["total","taken","skipped"],"description":"Pagination metadata."},"AccountingJournalEntryLine":{"type":"object","properties":{"id":{"type":"string","description":"Unique journal-entry line identifier."},"line_number":{"type":"number","description":"Sequential line number in the ledger."},"date":{"type":["string","null"],"format":"date","description":"Accounting date of the line."},"description":{"type":["string","null"],"description":"Optional line description."},"type":{"type":"string","enum":["debit","credit"],"description":"Debit or credit line type."},"amount":{"type":"number","description":"Amount in ledger currency. Expressed in currency's smallest unit."},"amount_in_original_currency":{"type":"number","description":"Amount in the original currency. Expressed in currency's smallest unit."},"original_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 original currency.","example":"EUR"},"original_currency_exchange_rate":{"type":"string","description":"Exchange rate into ledger currency."},"original_currency_exchange_rate_date":{"type":["string","null"],"format":"date","description":"Date of the exchange rate."},"entry_id":{"type":"string","description":"Parent journal-entry identifier."},"entry_status":{"type":"string","enum":["draft","posted"],"description":"Status of the parent entry when included."},"entry_posted_at":{"type":["string","null"],"format":"date","description":"Posting timestamp of the parent entry when included."},"entry_number":{"type":["string","null"],"description":"Number of the parent entry when included."},"customer_id":{"type":["string","null"],"description":"Customer of the parent entry when included."},"customer_name":{"type":["string","null"],"description":"Customer name of the parent entry when included."},"ledger_account_id":{"type":"string","description":"Ledger account identifier."},"account_code_snapshot":{"type":["string","null"],"description":"Account code captured when the entry was posted."},"account_name_snapshot":{"type":["string","null"],"description":"Account name captured when the entry was posted."},"invoice_line_item_id":{"type":["string","null"],"description":"Related invoice line-item identifier."},"rule_id":{"type":["string","null"],"description":"Applied accounting-rule identifier."},"rule_code":{"type":["string","null"],"description":"Applied accounting-rule code."},"rule_name":{"type":["string","null"],"description":"Applied accounting-rule name."},"product_id":{"type":["string","null"],"description":"Related product identifier."},"invoicing_entity_id":{"type":"string","description":"Owning invoicing entity identifier."},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp when the line was created."},"updated_at":{"type":["string","null"],"format":"date","description":"Timestamp when the line was last updated."}},"required":["id","line_number","date","description","type","amount","amount_in_original_currency","original_currency","original_currency_exchange_rate","original_currency_exchange_rate_date","entry_id","ledger_account_id","invoice_line_item_id","rule_id","rule_code","rule_name","product_id","invoicing_entity_id","created_at","updated_at"]},"AccountingJournalEntry":{"type":"object","properties":{"id":{"type":"string","description":"Unique journal-entry identifier."},"entry_number":{"type":"string","description":"Human-readable journal-entry number."},"posted_at":{"type":["string","null"],"format":"date","description":"Timestamp when the entry was posted."},"entry_date_at":{"type":["string","null"],"format":"date","description":"Accounting timestamp of the entry."},"original_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 original currency.","example":"EUR"},"original_currency_exchange_rate":{"type":"string","description":"Exchange rate into ledger currency."},"original_currency_exchange_rate_date":{"type":["string","null"],"format":"date","description":"Date of the exchange rate."},"amount":{"type":"number","description":"Total amount in ledger currency. Expressed in currency's smallest unit."},"amount_in_original_currency":{"type":"number","description":"Total amount in the original currency. Expressed in currency's smallest unit."},"description":{"type":["string","null"],"description":"Optional journal-entry description."},"status":{"type":"string","enum":["draft","posted"],"description":"Journal-entry status."},"origin":{"type":"string","enum":["auto","manual"],"description":"Automatic or manual entry origin."},"invoicing_entity_id":{"type":"string","description":"Owning invoicing entity identifier."},"ledger_id":{"type":"string","description":"Owning ledger identifier."},"invoice_id":{"type":["string","null"],"description":"Related invoice identifier."},"customer_id":{"type":["string","null"],"description":"Related customer identifier."},"invoice_line_item_id":{"type":["string","null"],"description":"Related invoice line-item identifier."},"subscription_id":{"type":["string","null"],"description":"Related subscription identifier."},"transaction_id":{"type":["string","null"],"description":"Related payment transaction identifier."},"reversal_for_entry_id":{"type":["string","null"],"description":"Original entry identifier when this is a reversal."},"schedule_id":{"type":["string","null"],"description":"Revenue-recognition schedule created with a manual entry."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/AccountingJournalEntryLine"},"description":"Debit and credit lines in the entry."},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp when the entry was created."},"updated_at":{"type":["string","null"],"format":"date","description":"Timestamp when the entry was last updated."}},"required":["id","entry_number","posted_at","entry_date_at","original_currency","original_currency_exchange_rate","original_currency_exchange_rate_date","amount","amount_in_original_currency","description","status","origin","invoicing_entity_id","ledger_id","invoice_id","customer_id","invoice_line_item_id","subscription_id","transaction_id","reversal_for_entry_id","lines","created_at","updated_at"]},"AccountingJournalEntryPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingJournalEntry"},"description":"Journal entries returned by the request."}},"required":["meta","data"]},"AccountingManualRecognitionPreview":{"type":"object","properties":{"slices":{"type":"array","items":{"type":"object","properties":{"start_date":{"type":["string","null"],"format":"date","description":"Inclusive slice start timestamp."},"end_date":{"type":["string","null"],"format":"date","description":"Inclusive slice end timestamp."},"amount":{"type":"number","description":"Amount recognized by this slice. Expressed in currency's smallest unit."}},"required":["start_date","end_date","amount"]},"description":"Recognition slices in the preview."},"total":{"type":"number","description":"Total amount covered by the preview. Expressed in currency's smallest unit."}},"required":["slices","total"]},"AccountingJournalEntryLinePaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingJournalEntryLine"},"description":"Journal-entry lines returned by the request."}},"required":["meta","data"]},"AccountingLedger":{"type":"object","properties":{"id":{"type":"string","description":"Unique ledger identifier."},"name":{"type":"string","description":"Display name of the ledger."},"code":{"type":["string","null"],"description":"Accounting code of the ledger."},"description":{"type":["string","null"],"description":"Optional ledger description."},"type":{"type":"string","enum":["IFRS","US_GAAP","FR_GAAP","UK_GAAP","LOCAL_GAAP","MANAGEMENT","CONSOLIDATION","AUDIT_ADJUSTMENT"],"description":"Type of ledger."},"invoicing_entity_id":{"type":"string","description":"Owning invoicing entity identifier."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 ledger currency.","example":"EUR"},"fiscal_year_end_month":{"type":"integer","minimum":1,"maximum":12,"description":"Last month of the ledger's fiscal year, from 1 (January) to 12 (December). Reports split profit between past fiscal years and the current one from it.","example":12},"entry_number_pattern":{"type":"string","description":"Pattern used to number journal entries."},"next_entry_number":{"type":"number","description":"Next journal-entry sequence number."},"is_primary":{"type":["boolean","null"],"description":"Whether this is the entity's primary ledger."},"is_inactive":{"type":["boolean","null"],"description":"Whether the ledger is inactive."},"closed_through_date":{"type":["string","null"],"format":"date","description":"Last day of the last closed month, formatted YYYY-MM-DD. No entry can be dated on or before the end of that day in the invoicing entity timezone. Null when no month is closed.","example":"2026-09-30"},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp when the ledger was created."},"updated_at":{"type":["string","null"],"format":"date","description":"Timestamp when the ledger was last updated."}},"required":["id","name","code","description","type","invoicing_entity_id","currency","fiscal_year_end_month","entry_number_pattern","next_entry_number","is_primary","is_inactive","closed_through_date","created_at","updated_at"]},"AccountingLedgerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingLedger"},"description":"Ledgers returned by the request."}},"required":["data"]},"AccountingLedgerCloseState":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"closed_through_date":{"type":["string","null"],"format":"date","description":"Last day of the last closed month, formatted YYYY-MM-DD. The ledger is closed through the end of that day in the invoicing entity timezone. Null when no month is closed.","example":"2026-09-30"},"closed_through_month":{"type":["string","null"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Last closed month, formatted YYYY-MM. Null when no month is closed.","example":"2026-09"},"latest_closable_month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Latest month that can be closed: the month before the current month in the invoicing entity timezone, formatted YYYY-MM.","example":"2026-09"}},"required":["ledger_id","closed_through_date","closed_through_month","latest_closable_month"]},"AccountingLedgerCloseUserActor":{"type":"object","properties":{"type":{"type":"string","enum":["user"],"description":"A user of the Hyperline app."},"user_id":{"type":["string","null"],"description":"Identifier of the user who acted."}},"required":["type","user_id"],"additionalProperties":false,"title":"User"},"AccountingLedgerCloseApiActor":{"type":"object","properties":{"type":{"type":"string","enum":["api"],"description":"A public API call."},"api_credential_id":{"type":["string","null"],"description":"Identifier of the API key used."},"app_id":{"type":["string","null"],"description":"Identifier of the third-party app that called the API."},"user_id":{"type":["string","null"],"description":"Identifier of the user who acted."}},"required":["type","api_credential_id","app_id","user_id"],"additionalProperties":false,"title":"API"},"AccountingLedgerCloseMcpOrCliActor":{"type":"object","properties":{"type":{"type":"string","enum":["mcp","cli"],"description":"A call from the Hyperline MCP server or CLI."},"user_id":{"type":["string","null"],"description":"Identifier of the user who acted."},"api_credential_id":{"type":["string","null"],"description":"Identifier of the API key used."}},"required":["type","user_id","api_credential_id"],"additionalProperties":false,"title":"MCP or CLI"},"AccountingLedgerCloseActor":{"oneOf":[{"$ref":"#/components/schemas/AccountingLedgerCloseUserActor"},{"$ref":"#/components/schemas/AccountingLedgerCloseApiActor"},{"$ref":"#/components/schemas/AccountingLedgerCloseMcpOrCliActor"}],"discriminator":{"propertyName":"type","mapping":{"user":"#/components/schemas/AccountingLedgerCloseUserActor","api":"#/components/schemas/AccountingLedgerCloseApiActor","mcp":"#/components/schemas/AccountingLedgerCloseMcpOrCliActor","cli":"#/components/schemas/AccountingLedgerCloseMcpOrCliActor"}},"description":"Who closed or reopened the months."},"AccountingLedgerCloseEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique close event identifier."},"ledger_id":{"type":"string","description":"Ledger identifier."},"action":{"type":"string","enum":["close","reopen"],"description":"Whether months were closed or reopened."},"from_date":{"type":["string","null"],"format":"date","description":"Closed-through date before the event, formatted YYYY-MM-DD. Null when no month was closed.","example":"2026-08-31"},"to_date":{"type":["string","null"],"format":"date","description":"Closed-through date after the event, formatted YYYY-MM-DD.","example":"2026-09-30"},"reason":{"type":["string","null"],"description":"Why the months were closed or reopened."},"actor":{"$ref":"#/components/schemas/AccountingLedgerCloseActor"},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp of the close or reopen."}},"required":["id","ledger_id","action","from_date","to_date","reason","actor","created_at"]},"AccountingLedgerCloseEventPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingLedgerCloseEvent"},"description":"Close events of the ledger, newest first."}},"required":["meta","data"]},"AccountingCloseLedgerPeriodCommand":{"type":"object","properties":{"through_month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Last month to close, formatted YYYY-MM: an ended month after the last closed month. Every earlier month is closed too.","example":"2026-09"},"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why the months are closed, 1 to 500 characters."}},"required":["through_month"]},"AccountingReopenLedgerPeriodCommand":{"type":"object","properties":{"from_month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"First month to reopen, formatted YYYY-MM: a closed month. Every later month is reopened too.","example":"2026-08"},"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why the months are reopened, 1 to 500 characters."}},"required":["from_month","reason"]},"AccountingLedgerAccount":{"type":"object","properties":{"id":{"type":"string","description":"Unique ledger account identifier."},"ledger_id":{"type":"string","description":"Owning ledger identifier."},"code":{"type":"string","description":"Accounting code of the account."},"type":{"type":"string","enum":["asset","contra_asset","liability","contra_liability","equity","revenue","contra_revenue","expense"],"description":"Accounting type of the account."},"is_default":{"type":"boolean","description":"Whether the account is a system default."},"name":{"type":"string","description":"Display name of the account."},"description":{"type":["string","null"],"description":"Optional account description."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 account currency.","example":"EUR"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this account in external providers."},"last_refreshed_at":{"type":["string","null"],"format":"date","description":"Timestamp of the last provider refresh."},"balance":{"type":"number","description":"Lifetime account balance when requested by a list endpoint. Expressed in currency's smallest unit."},"period_balance":{"type":["number","null"],"description":"Quarter balance when a year and quarter are supplied. Expressed in currency's smallest unit."},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp when the account was created."},"updated_at":{"type":["string","null"],"format":"date","description":"Timestamp when the account was last updated."}},"required":["id","ledger_id","code","type","is_default","name","description","currency","integrations","last_refreshed_at","created_at","updated_at"]},"AccountingLedgerAccountPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingLedgerAccount"},"description":"Ledger accounts returned by the request."}},"required":["meta","data"]},"AccountingExport":{"type":"object","properties":{"id":{"type":"string","description":"Unique export identifier."},"name":{"type":"string","enum":["revenue_recognition_waterfall","revenue_recognition_summary","income_statement","general_ledger"],"description":"Accounting export template."},"status":{"type":"string","enum":["pending","processing","done","error"],"description":"Current export processing status."},"file_type":{"type":"string","enum":["csv","xlsx","json","zip","pdf","doc","docx","xls","txt","jpeg","jpg","png"],"description":"Generated file type."},"created_at":{"type":["string","null"],"format":"date","description":"Time at which the export was requested."},"updated_at":{"type":["string","null"],"format":"date","description":"Time at which the export was last updated."}},"required":["id","name","status","file_type","created_at","updated_at"]},"AccountingRevRecWaterfall":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 ledger currency.","example":"EUR"},"columns":{"type":"array","items":{"type":"string"},"description":"Recognition months displayed by the waterfall."},"rows":{"type":"array","items":{"type":"object","properties":{"booked_total":{"type":"number","description":"Total amount booked in the row. Expressed in currency's smallest unit."},"by_month":{"type":"object","additionalProperties":{"type":"object","properties":{"recognized":{"type":"number","description":"Amount already recognized. Expressed in currency's smallest unit."},"remaining":{"type":"number","description":"Amount remaining to recognize. Expressed in currency's smallest unit."}},"required":["recognized","remaining"]},"description":"Recognition values keyed by month."},"recognized_total":{"type":"number","description":"Total amount recognized in the row. Expressed in currency's smallest unit."},"remaining":{"type":"number","description":"Total amount remaining in the row. Expressed in currency's smallest unit."},"booked_month":{"type":"string","description":"Month in which revenue was booked."}},"required":["booked_total","by_month","recognized_total","remaining","booked_month"]},"description":"Waterfall rows grouped by booked month."},"totals":{"type":"object","properties":{"booked_total":{"type":"number","description":"Total amount booked in the row. Expressed in currency's smallest unit."},"by_month":{"type":"object","additionalProperties":{"type":"object","properties":{"recognized":{"type":"number","description":"Amount already recognized. Expressed in currency's smallest unit."},"remaining":{"type":"number","description":"Amount remaining to recognize. Expressed in currency's smallest unit."}},"required":["recognized","remaining"]},"description":"Recognition values keyed by month."},"recognized_total":{"type":"number","description":"Total amount recognized in the row. Expressed in currency's smallest unit."},"remaining":{"type":"number","description":"Total amount remaining in the row. Expressed in currency's smallest unit."}},"required":["booked_total","by_month","recognized_total","remaining"],"description":"Totals across all waterfall rows."}},"required":["currency","columns","rows","totals"]},"AccountingRevRecWaterfallCellItem":{"type":"object","properties":{"customer_id":{"type":["string","null"],"description":"Related customer identifier."},"customer_name":{"type":["string","null"],"description":"Related customer name."},"invoice_id":{"type":["string","null"],"description":"Related invoice identifier."},"invoice_ref":{"type":["string","null"],"description":"Related invoice reference."},"line_item_name":{"type":["string","null"],"description":"Related invoice line-item or product name."},"amount":{"type":"number","description":"Amount contributed to the selected cell. Expressed in currency's smallest unit."},"status":{"type":["string","null"],"enum":["pending","recognized","reversed","cancelled"],"description":"Recognition status of the contribution."},"schedule_id":{"type":"string","description":"Recognition-schedule identifier."},"slice_id":{"type":["string","null"],"description":"Recognition-slice identifier."},"subscription_id":{"type":["string","null"],"description":"Related subscription identifier."},"product_id":{"type":["string","null"],"description":"Related product identifier."},"period_starts_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period start timestamp."},"period_ends_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period end timestamp."},"method":{"type":["string","null"],"enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue-recognition method."},"recognition_date":{"type":["string","null"],"format":"date","description":"Recognition timestamp."},"schedule_status":{"type":"string","enum":["pending","in_progress","completed","cancelled"],"description":"Status of the schedule."},"schedule_period_starts_at":{"type":["string","null"],"format":"date","description":"Inclusive schedule service-period start timestamp."},"schedule_period_ends_at":{"type":["string","null"],"format":"date","description":"Inclusive schedule service-period end timestamp."},"origin":{"type":"string","enum":["auto","manual"],"description":"Origin of the schedule."},"journal_entry_id":{"type":["string","null"],"description":"Related manual journal-entry identifier."}},"required":["customer_id","customer_name","invoice_id","invoice_ref","line_item_name","amount","status","schedule_id","slice_id","subscription_id","product_id","period_starts_at","period_ends_at","method","recognition_date","schedule_status","schedule_period_starts_at","schedule_period_ends_at","origin","journal_entry_id"]},"AccountingRevRecWaterfallCellPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRevRecWaterfallCellItem"},"description":"Contributions to the waterfall cell."}},"required":["meta","data"]},"AccountingUnbilledRevenue":{"type":"object","properties":{"subscription_id":{"type":"string","description":"Subscription identifier."},"open_invoice_id":{"type":["string","null"],"description":"Current open invoice identifier."},"invoice_status":{"type":["string","null"],"description":"Current invoice status."},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 subscription currency.","example":"EUR"},"amount_excluding_tax":{"type":"number","description":"Total accrued usage amount excluding tax. Expressed in currency's smallest unit."},"period_start":{"type":["string","null"],"format":"date","description":"Inclusive accrual-period start timestamp."},"period_end":{"type":["string","null"],"format":"date","description":"Inclusive accrual-period end timestamp."},"line_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Invoice line-item identifier."},"name":{"type":"string","description":"Invoice line-item name."},"amount_excluding_tax":{"type":"number","description":"Accrued line-item amount excluding tax. Expressed in currency's smallest unit."},"period_start":{"type":["string","null"],"format":"date","description":"Inclusive line-item period start timestamp."},"period_end":{"type":["string","null"],"format":"date","description":"Inclusive line-item period end timestamp."}},"required":["id","name","amount_excluding_tax","period_start","period_end"]},"description":"Usage line items contributing to unbilled revenue."}},"required":["subscription_id","open_invoice_id","invoice_status","currency","amount_excluding_tax","period_start","period_end","line_items"]},"AccountingRevRecSlice":{"type":"object","properties":{"id":{"type":"string","description":"Unique recognition-slice identifier."},"schedule_id":{"type":"string","description":"Parent recognition-schedule identifier."},"kind":{"type":"string","enum":["planned","actual"],"description":"Recognition-slice kind."},"status":{"type":"string","enum":["pending","recognized","cancelled","reversed"],"description":"Recognition-slice status."},"period_starts_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period start timestamp."},"period_ends_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period end timestamp."},"recognition_planned_at":{"type":["string","null"],"format":"date","description":"Timestamp when recognition is planned."},"sequence":{"type":"number","description":"Ordering sequence within the schedule."},"amount":{"type":"number","description":"Amount in ledger currency. Expressed in currency's smallest unit."},"discount_amount":{"type":"number","description":"Discount amount in ledger currency. Expressed in currency's smallest unit."},"original_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 original currency.","example":"EUR"},"original_currency_exchange_rate":{"type":"string","description":"Exchange rate into ledger currency."},"original_currency_exchange_rate_date":{"type":["string","null"],"format":"date","description":"Date of the exchange rate."},"amount_in_original_currency":{"type":"number","description":"Amount in the original currency. Expressed in currency's smallest unit."},"discount_amount_in_original_currency":{"type":"number","description":"Discount amount in the original currency. Expressed in currency's smallest unit."},"recognized_at":{"type":["string","null"],"format":"date","description":"Timestamp when the slice was recognized."},"journal_entry_id":{"type":["string","null"],"description":"Recognition journal-entry identifier."},"reversing_journal_entry_id":{"type":["string","null"],"description":"Reversing journal-entry identifier."},"usage_event_id":{"type":["string","null"],"description":"Related usage-event identifier."},"milestone_event_id":{"type":["string","null"],"description":"Related milestone-event identifier."},"last_observed_units":{"type":["string","null"],"description":"Last observed usage units for this slice."},"ledger_id":{"type":"string","description":"Owning ledger identifier."},"invoicing_entity_id":{"type":"string","description":"Owning invoicing entity identifier."},"amount_excluding_tax":{"type":"number","description":"Amount excluding tax when schedule tax data is included. Expressed in currency's smallest unit."},"tax_amount":{"type":"number","description":"Tax amount when schedule tax data is included. Expressed in currency's smallest unit."},"amount_including_tax":{"type":"number","description":"Amount including tax when schedule tax data is included. Expressed in currency's smallest unit."}},"required":["id","schedule_id","kind","status","period_starts_at","period_ends_at","recognition_planned_at","sequence","amount","discount_amount","original_currency","original_currency_exchange_rate","original_currency_exchange_rate_date","amount_in_original_currency","discount_amount_in_original_currency","recognized_at","journal_entry_id","reversing_journal_entry_id","usage_event_id","milestone_event_id","last_observed_units","ledger_id","invoicing_entity_id"]},"AccountingRevRecSchedule":{"type":"object","properties":{"id":{"type":"string","description":"Unique recognition-schedule identifier."},"method":{"type":"string","enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue-recognition method."},"discount_recognition_method":{"type":["string","null"],"enum":["immediate","deferred","use_net_amount"],"description":"Method used to recognize discounts."},"granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Recognition-slice granularity."},"curve":{"type":["string","null"],"enum":["straight_line","custom"],"description":"Recognition allocation curve."},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"],"description":"Recognition-schedule status."},"origin":{"type":"string","enum":["auto","manual"],"description":"Origin of the recognition schedule."},"is_arrears":{"type":"boolean","description":"Whether the schedule recognizes in-arrears revenue."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 ledger currency.","example":"EUR"},"total_amount":{"type":"number","description":"Total scheduled amount in ledger currency. Expressed in currency's smallest unit."},"cancelled_amount":{"type":"number","description":"Cancelled amount in ledger currency. Expressed in currency's smallest unit."},"discount_amount":{"type":"number","description":"Total discount amount in ledger currency. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Recognized amount in ledger currency. Expressed in currency's smallest unit."},"recognized_discount_amount":{"type":"number","description":"Recognized discount amount in ledger currency. Expressed in currency's smallest unit."},"remaining_amount":{"type":"number","description":"Remaining amount in ledger currency. Expressed in currency's smallest unit."},"remaining_discount_amount":{"type":"number","description":"Remaining discount amount in ledger currency. Expressed in currency's smallest unit."},"original_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 original currency.","example":"EUR"},"original_currency_exchange_rate":{"type":"string","description":"Exchange rate into ledger currency."},"original_currency_exchange_rate_date":{"type":["string","null"],"format":"date","description":"Date of the exchange rate."},"total_amount_in_original_currency":{"type":"number","description":"Total scheduled amount in the original currency. Expressed in currency's smallest unit."},"cancelled_amount_in_original_currency":{"type":"number","description":"Cancelled amount in the original currency. Expressed in currency's smallest unit."},"discount_amount_in_original_currency":{"type":"number","description":"Discount amount in the original currency. Expressed in currency's smallest unit."},"recognized_amount_in_original_currency":{"type":"number","description":"Recognized amount in the original currency. Expressed in currency's smallest unit."},"recognized_discount_amount_in_original_currency":{"type":"number","description":"Recognized discount amount in the original currency. Expressed in currency's smallest unit."},"remaining_amount_in_original_currency":{"type":"number","description":"Remaining amount in the original currency. Expressed in currency's smallest unit."},"remaining_discount_amount_in_original_currency":{"type":"number","description":"Remaining discount amount in the original currency. Expressed in currency's smallest unit."},"service_period_starts_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period start timestamp."},"service_period_ends_at":{"type":["string","null"],"format":"date","description":"Inclusive service-period end timestamp."},"recognition_date":{"type":["string","null"],"format":"date","description":"Recognition timestamp for point-in-time schedules."},"total_units_snapshot":{"type":["string","null"],"description":"Usage-unit snapshot captured by the schedule."},"credit_transaction_id":{"type":["string","null"],"description":"Related credit transaction identifier."},"deferred_ledger_account_id":{"type":["string","null"],"description":"Deferred-revenue ledger account identifier."},"revenue_ledger_account_id":{"type":"string","description":"Revenue ledger account identifier."},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"Deferred-discount ledger account identifier."},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"Contra-revenue ledger account identifier."},"unbilled_ledger_account_id":{"type":["string","null"],"description":"Unbilled-revenue ledger account identifier."},"revenue_rule_id":{"type":["string","null"],"description":"Revenue accounting-rule identifier."},"deferred_rule_id":{"type":["string","null"],"description":"Deferred-revenue accounting-rule identifier."},"unbilled_rule_id":{"type":["string","null"],"description":"Unbilled-revenue accounting-rule identifier."},"contra_revenue_rule_id":{"type":["string","null"],"description":"Contra-revenue accounting-rule identifier."},"deferred_discount_rule_id":{"type":["string","null"],"description":"Deferred-discount accounting-rule identifier."},"invoicing_entity_id":{"type":"string","description":"Owning invoicing entity identifier."},"ledger_id":{"type":"string","description":"Owning ledger identifier."},"invoice_id":{"type":["string","null"],"description":"Related invoice identifier."},"invoice_line_item_id":{"type":["string","null"],"description":"Related invoice line-item identifier."},"journal_entry_id":{"type":["string","null"],"description":"Related manual journal-entry identifier."},"subscription_id":{"type":["string","null"],"description":"Related subscription identifier."},"customer_id":{"type":["string","null"],"description":"Related customer identifier."},"billing_item_id":{"type":["string","null"],"description":"Related billing-item identifier."},"billing_item_on_subscription_id":{"type":["string","null"],"description":"Related subscription billing-item identifier."},"amount_excluding_tax":{"type":"number","description":"Schedule amount excluding tax. Expressed in currency's smallest unit."},"tax_amount":{"type":"number","description":"Schedule tax amount. Expressed in currency's smallest unit."},"amount_including_tax":{"type":"number","description":"Schedule amount including tax. Expressed in currency's smallest unit."},"invoice_line_item_name":{"type":["string","null"],"description":"Display name of the related invoice line item or product."},"earliest_spread_start":{"type":"string","format":"date","description":"Earliest permitted start date for a forward reshape window, on the invoicing entity calendar."},"timezone":{"type":"string","description":"IANA timezone the slices are cut in: the invoice's for an invoice schedule, the customer's for a contract schedule, the invoicing entity's otherwise. Reshape window dates are days in this timezone."},"slices":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRevRecSlice"},"description":"Recognition slices in the schedule."},"created_at":{"type":["string","null"],"format":"date","description":"Timestamp when the schedule was created."},"updated_at":{"type":["string","null"],"format":"date","description":"Timestamp when the schedule was last updated."}},"required":["id","method","discount_recognition_method","granularity","curve","status","origin","is_arrears","currency","total_amount","cancelled_amount","discount_amount","recognized_amount","recognized_discount_amount","remaining_amount","remaining_discount_amount","original_currency","original_currency_exchange_rate","original_currency_exchange_rate_date","total_amount_in_original_currency","cancelled_amount_in_original_currency","discount_amount_in_original_currency","recognized_amount_in_original_currency","recognized_discount_amount_in_original_currency","remaining_amount_in_original_currency","remaining_discount_amount_in_original_currency","service_period_starts_at","service_period_ends_at","recognition_date","total_units_snapshot","credit_transaction_id","deferred_ledger_account_id","revenue_ledger_account_id","deferred_discount_ledger_account_id","contra_revenue_ledger_account_id","unbilled_ledger_account_id","revenue_rule_id","deferred_rule_id","unbilled_rule_id","contra_revenue_rule_id","deferred_discount_rule_id","invoicing_entity_id","ledger_id","invoice_id","invoice_line_item_id","journal_entry_id","subscription_id","customer_id","billing_item_id","billing_item_on_subscription_id","amount_excluding_tax","tax_amount","amount_including_tax","invoice_line_item_name","earliest_spread_start","timezone","slices","created_at","updated_at"]},"AccountingRevRecSchedulePaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRevRecSchedule"},"description":"Recognition schedules returned by the request."}},"required":["meta","data"]},"AccountingRevRecScheduleAdjustments":{"type":"object","properties":{"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique adjustment audit-record identifier."},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the adjustment occurred."},"actor":{"type":"object","properties":{"user_id":{"type":["string","null"],"description":"User actor identifier, when authenticated as a user."},"api_credential_id":{"type":["string","null"],"description":"API-credential actor identifier, when authenticated by API key."},"name":{"type":["string","null"],"description":"Display name of the actor."}},"required":["user_id","api_credential_id","name"],"description":"User or API credential that made the adjustment."},"action":{"type":"string","enum":["recognize_now","reshape"],"description":"Adjustment action."},"reason_code":{"type":"string","enum":["obligation_satisfied_early","renegotiated_delivery","service_period_change","setup_error","other"],"description":"Stable adjustment reason code."},"reason_detail":{"type":["string","null"],"description":"Optional human explanation for the adjustment."},"amount":{"type":["number","null"],"description":"Amount recognized immediately in ledger currency. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 ledger currency.","example":"EUR"},"target_month":{"type":["string","null"],"description":"Target month for a point adjustment."},"window":{"type":["object","null"],"properties":{"start_month":{"type":"string","description":"First month of the reshaped window."},"end_month":{"type":"string","description":"Last month of the reshaped window."}},"required":["start_month","end_month"],"description":"Replacement recognition window."},"window_changed":{"type":"boolean","description":"Whether the recognition window changed."},"slice_id":{"type":["string","null"],"description":"Adjusted slice identifier for point adjustments."},"journal_entry_ids":{"type":"array","items":{"type":"string"},"description":"Journal entries posted by the adjustment."}},"required":["id","created_at","actor","action","reason_code","reason_detail","amount","currency","target_month","window","slice_id","journal_entry_ids"]},"description":"Manual adjustment audit records."}},"required":["adjustments"]},"AccountingRevRecReshapePlan":{"type":"object","properties":{"slices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["recognize_now","spread"],"description":"Planned slice action."},"period_starts_at":{"type":["string","null"],"format":"date","description":"Inclusive planned period start timestamp."},"period_ends_at":{"type":["string","null"],"format":"date","description":"Inclusive planned period end timestamp."},"recognition_planned_at":{"type":["string","null"],"format":"date","description":"Planned recognition timestamp."},"amount":{"type":"number","description":"Planned amount in ledger currency. Expressed in currency's smallest unit."},"amount_in_original_currency":{"type":"number","description":"Planned amount in original currency. Expressed in currency's smallest unit."},"discount_amount":{"type":"number","description":"Planned discount amount in ledger currency. Expressed in currency's smallest unit."},"discount_amount_in_original_currency":{"type":"number","description":"Planned discount amount in original currency. Expressed in currency's smallest unit."}},"required":["type","period_starts_at","period_ends_at","recognition_planned_at","amount","amount_in_original_currency","discount_amount","discount_amount_in_original_currency"]},"description":"Slices that would be persisted by the reshape."},"balance":{"type":"object","properties":{"remaining":{"type":"number","description":"Amount available to place in ledger currency. Expressed in currency's smallest unit."},"placed":{"type":"number","description":"Amount placed by the plan in ledger currency. Expressed in currency's smallest unit."},"leftover":{"type":"number","description":"Unplaced amount in ledger currency. Expressed in currency's smallest unit."},"remaining_in_original_currency":{"type":"number","description":"Amount available to place in original currency. Expressed in currency's smallest unit."},"placed_in_original_currency":{"type":"number","description":"Amount placed by the plan in original currency. Expressed in currency's smallest unit."},"leftover_in_original_currency":{"type":"number","description":"Unplaced amount in original currency. Expressed in currency's smallest unit."},"balanced":{"type":"boolean","description":"Whether the plan places the complete remaining balance."}},"required":["remaining","placed","leftover","remaining_in_original_currency","placed_in_original_currency","leftover_in_original_currency","balanced"],"description":"Balance reconciliation for the reshape plan."}},"required":["slices","balance"]},"AccountingRuleCustomPropertyFilter":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of an invoice custom property.","example":"fee_type"},"values":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Values of the custom property to match, as strings. For `select` and `multi_select` they must be authorized values; a number or boolean is its string form (e.g. `12`, `true`), a date its UTC ISO timestamp, matched on the exact same instant. The filter matches when the invoice holds any of them.","example":["service"]}},"required":["slug","values"]},"AccountingRule":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the accounting rule.","example":"arl_abc123def456"},"code":{"type":"string","description":"Auto-generated rule code (e.g. R-001).","example":"R-001"},"name":{"type":["string","null"],"description":"Optional user-defined name for the rule.","example":"Recurring subscriptions"},"ledger_id":{"type":"string","description":"Identifier of the ledger this rule belongs to.","example":"led_abc123def456"},"category":{"type":["string","null"],"description":"Rule category (e.g. accounting_software, invoice_posted).","example":"accounting_software"},"priority":{"type":"number","description":"Override order. Higher priority wins when multiple rules match.","example":100},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to match. Empty means match all.","example":["prod_abc123def456"]},"product_types":{"type":"array","items":{"type":"string"},"description":"Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.","example":["flat_fee"]},"customer_ids":{"type":"array","items":{"type":"string"},"description":"Customer IDs for customer-specific overrides.","example":["cus_abc123def456"]},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"description":"Currency codes to match (e.g. EUR, USD).","example":["EUR"]},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Country codes for jurisdiction-based overrides.","example":["FR"]},"tax_schemes":{"type":"array","items":{"type":"string","enum":["standard","reverse_charge","exempt","not_eligible","manual"]},"description":"Tax schemes to match. A context without a tax scheme never matches a rule that sets this filter. Empty means match all.","example":["reverse_charge"]},"tax_territories":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Tax territory country codes to match. A context without a tax territory never matches a rule that sets this filter. Empty means match all.","example":["FR"]},"tax_rate_classes":{"type":"array","items":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"]},"description":"Tax rate classes to match. A context without a tax rate class never matches a rule that sets this filter. Empty means match all.","example":["standard_rate"]},"coupon_ids":{"type":"array","items":{"type":"string"},"description":"Coupon IDs to match. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"Client provider IDs to match. Empty means match all.","example":["clp_abc123def456"]},"payment_method_types":{"type":"array","items":{"type":"string","enum":["card","transfer","transfer_automated","direct_debit","direct_debit_ach","direct_debit_bacs","apple_pay","google_pay","paypal","stripe_link","external"]},"description":"Payment method types to match. Empty means match all.","example":["card"]},"bank_account_ids":{"type":"array","items":{"type":"string"},"description":"Bank account IDs to match. Empty means match all.","example":["bac_abc123def456"]},"invoice_types":{"type":"array","items":{"type":"string","enum":["invoice","document"]},"description":"Invoice kinds to match: `invoice` or `document`. Refunds and other standard invoices match as `invoice`. A context without an invoice, such as a PSP payout, never matches a rule that sets this filter. Empty means match all.","example":["document"]},"interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all","recurring"],"description":"Billing interval period filter (months, years, etc.). `recurring` matches every interval except `once` and requires a null `interval_count`. `null` matches every interval, including `once`.","example":"months"},"interval_count":{"type":["number","null"],"description":"Billing interval count filter.","example":1},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRuleCustomPropertyFilter"},"description":"Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its `values` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the `suggested_priority` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set `payments_clearing_ledger_account_id`, as PSP payouts are booked without the invoice. Empty means match all.","example":[{"slug":"fee_type","values":["service"]}]},"revenue_ledger_account_id":{"type":["string","null"],"description":"Revenue ledger account ID used for invoice line revenue routing.","example":"lac_abc123def456"},"revenue_ledger_account":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the ledger account.","example":"lac_abc123def456"},"code":{"type":"string","description":"Accounting code of the ledger account.","example":"706100"},"name":{"type":"string","description":"Display name of the ledger account.","example":"Revenue"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"External provider reference associated with the ledger account.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","code","name","integration"],"description":"Expanded revenue ledger account reference when available."},"deferred_revenue_ledger_account_id":{"type":["string","null"],"description":"Deferred revenue ledger account ID used before revenue is recognized.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"Deferred discount ledger account ID used before discounts are recognized.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"Contra revenue ledger account ID used for amounts that reduce revenue.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"Discount ledger account ID used for recognized discounts.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"Accounts receivable ledger account ID used for invoice posting.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"Cash ledger account ID used for payment settlement.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"Payments clearing ledger account ID used while payments settle.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"Output tax ledger account ID used for tax liability.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.","example":"lac_abc123def456"},"allowance_for_doubtful_accounts_id":{"type":["string","null"],"description":"Allowance for doubtful accounts ledger account ID, set on credit_note_created rules.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment provider fees when a payment settles.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment processing fees when a payment settles. Takes precedence over `provider_fees_expense_ledger_account_id` when set by the same or a higher priority rule.","example":"lac_abc123def456"},"payment_processing_fees_revenue_ledger_account_id":{"type":["string","null"],"description":"Payment processing fees revenue ledger account ID, set on invoice_settled rules.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"Customer credits ledger account ID used for credit balances.","example":"lac_abc123def456"},"rev_rec_method":{"type":["string","null"],"enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue recognition method.","example":"over_time"},"rev_rec_granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Recognition period granularity. Used when `rev_rec_method` is `over_time`.","example":"month"},"rev_rec_point_in_time_basis":{"type":["string","null"],"enum":["invoice_date","service_start_date","service_end_date","custom_date"],"description":"Date revenue is recognized on. Used when `rev_rec_method` is `point_in_time`.","example":"service_end_date"},"discount_recognition_method":{"type":["string","null"],"enum":["immediate","deferred","use_net_amount"],"description":"Method used to recognize discounts.","example":"deferred"},"journal_id":{"type":["string","null"],"description":"Journal ID used to route entries in the accounting provider.","example":"jou_abc123def456"},"entity_type":{"type":["string","null"],"description":"Entity type the rule applies to.","example":"invoice"},"created_at":{"type":"string","format":"date","description":"Timestamp when the rule was created."},"updated_at":{"type":"string","format":"date","description":"Timestamp when the rule was last updated."}},"required":["id","code","name","ledger_id","category","priority","product_ids","product_types","customer_ids","currencies","countries","tax_schemes","tax_territories","tax_rate_classes","coupon_ids","client_provider_ids","payment_method_types","bank_account_ids","invoice_types","interval_period","interval_count","custom_property_filters","revenue_ledger_account_id","deferred_revenue_ledger_account_id","deferred_discount_ledger_account_id","contra_revenue_ledger_account_id","discount_ledger_account_id","ar_ledger_account_id","cash_ledger_account_id","payments_clearing_ledger_account_id","output_tax_ledger_account_id","uncollectible_debit_ledger_account_id","allowance_for_doubtful_accounts_id","provider_fees_expense_ledger_account_id","payment_processing_fees_expense_ledger_account_id","payment_processing_fees_revenue_ledger_account_id","customer_credits_ledger_account_id","rev_rec_method","rev_rec_granularity","rev_rec_point_in_time_basis","discount_recognition_method","journal_id","entity_type","created_at","updated_at"]},"PaginatedAccountingRule":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRule"},"description":"List of AccountingRule."}},"required":["meta","data"]},"AccountingRuleTreeNode":{"type":"object","properties":{"type":{"type":"string","enum":["category","filter","rule"],"description":"Type of tree node."},"label":{"type":"string","description":"Display label of the node."},"depth":{"type":"number","description":"Depth of the node in the tree."},"category":{"type":["string","null"],"enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"],"description":"Accounting category represented by the node."},"filter_key":{"type":"string","description":"Filter field represented by the node."},"filter_value":{"type":"string","description":"Raw filter value represented by the node."},"filter_display_value":{"type":"string","description":"Display value of the represented filter."},"rule_count":{"type":"number","description":"Number of rules below the node."},"rule":{"allOf":[{"$ref":"#/components/schemas/AccountingRule"},{"description":"Accounting rule represented by a rule node."}]},"children":{"type":"array","description":"Child nodes.","items":{"$ref":"#/components/schemas/AccountingRuleTreeNode"}}},"required":["type","label","depth","children"]},"CreateAccountingRuleCommand":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Identifier of the ledger this rule belongs to.","example":"led_abc123def456"},"name":{"type":["string","null"],"description":"Optional user-defined name for the rule.","example":"Recurring subscriptions"},"category":{"type":["string","null"],"enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"],"description":"Rule category (e.g. accounting_software, invoice_posted).","example":"accounting_software"},"priority":{"type":"number","description":"Override order. Higher priority wins when multiple rules match.","example":100},"product_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Product IDs to match. Empty means match all.","example":["prod_abc123def456"]},"product_types":{"type":"array","items":{"type":"string","enum":["flat_fee","dynamic","seat","credit"]},"default":[],"description":"Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.","example":["flat_fee"]},"customer_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Customer IDs for customer-specific overrides.","example":["cus_abc123def456"]},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"default":[],"description":"Currency codes to match (e.g. EUR, USD).","example":["EUR"]},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"default":[],"description":"Country codes for jurisdiction-based overrides.","example":["FR"]},"tax_schemes":{"type":"array","items":{"type":"string","enum":["standard","reverse_charge","exempt","not_eligible","manual"]},"default":[],"description":"Tax schemes to match. A context without a tax scheme never matches a rule that sets this filter. Empty means match all.","example":["reverse_charge"]},"tax_territories":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"default":[],"description":"Tax territory country codes to match. A context without a tax territory never matches a rule that sets this filter. Empty means match all.","example":["FR"]},"tax_rate_classes":{"type":"array","items":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"]},"default":[],"description":"Tax rate classes to match. A context without a tax rate class never matches a rule that sets this filter. Empty means match all.","example":["standard_rate"]},"coupon_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Coupon IDs to match. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Client provider IDs to match. Empty means match all.","example":["clp_abc123def456"]},"payment_method_types":{"type":"array","items":{"type":"string","enum":["card","transfer","transfer_automated","direct_debit","direct_debit_ach","direct_debit_bacs","apple_pay","google_pay","paypal","stripe_link","external"]},"default":[],"description":"Payment method types to match. Empty means match all.","example":["card"]},"bank_account_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Bank account IDs to match. Empty means match all.","example":["bac_abc123def456"]},"invoice_types":{"type":"array","items":{"type":"string","enum":["invoice","document"]},"default":[],"description":"Invoice kinds to match: `invoice` or `document`. Refunds and other standard invoices match as `invoice`. A context without an invoice, such as a PSP payout, never matches a rule that sets this filter. Empty means match all.","example":["document"]},"interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all","recurring"],"description":"Billing interval period filter (months, years, etc.). `recurring` matches every interval except `once` and requires a null `interval_count`. `null` matches every interval, including `once`.","example":"months"},"interval_count":{"type":["number","null"],"description":"Billing interval count filter.","example":1},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRuleCustomPropertyFilter"},"default":[],"description":"Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its `values` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the `suggested_priority` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set `payments_clearing_ledger_account_id`, as PSP payouts are booked without the invoice. Empty means match all.","example":[{"slug":"fee_type","values":["service"]}]},"revenue_ledger_account_id":{"type":["string","null"],"description":"Revenue ledger account ID used for invoice line revenue routing. Must be a `revenue` account. On accounting_software rules, a `revenue` or `contra_revenue` account with entity_type invoice, an `asset` or `contra_asset` account with entity_type payment.","example":"lac_abc123def456"},"deferred_revenue_ledger_account_id":{"type":["string","null"],"description":"Deferred revenue ledger account ID used before revenue is recognized. Must be a `liability` account.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"Deferred discount ledger account ID used before discounts are recognized. Must be an `asset` or `contra_liability` account.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"Contra revenue ledger account ID used for amounts that reduce revenue. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"Discount ledger account ID used for recognized discounts. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"Accounts receivable ledger account ID used for invoice posting. Must be an `asset` account.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"Cash ledger account ID used for payment settlement. Must be an `asset` account.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"Payments clearing ledger account ID used while payments settle. Must be an `asset` account.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"Output tax ledger account ID used for tax liability. Must be a `liability` account.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"Ledger account ID debited when an invoice becomes uncollectible. Must be an `asset` account, for doubtful-receivable reclassification, or an `expense` account, for direct write-off.","example":"lac_abc123def456"},"allowance_for_doubtful_accounts_id":{"type":["string","null"],"description":"Allowance for doubtful accounts ledger account ID, set on credit_note_created rules. Must be a `contra_asset` account.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment provider fees when a payment settles. Must be an `expense` account.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment processing fees when a payment settles. Takes precedence over `provider_fees_expense_ledger_account_id` when set by the same or a higher priority rule. Must be an `expense` account.","example":"lac_abc123def456"},"payment_processing_fees_revenue_ledger_account_id":{"type":["string","null"],"description":"Payment processing fees revenue ledger account ID, set on invoice_settled rules. Must be a `revenue` account.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"Customer credits ledger account ID used for credit balances. Must be a `liability` account.","example":"lac_abc123def456"},"rev_rec_method":{"type":["string","null"],"enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue recognition method.","example":"over_time"},"rev_rec_granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Recognition period granularity. Used when `rev_rec_method` is `over_time`.","example":"month"},"rev_rec_point_in_time_basis":{"type":["string","null"],"enum":["invoice_date","service_start_date","service_end_date","custom_date"],"description":"Date revenue is recognized on. Used when `rev_rec_method` is `point_in_time`.","example":"service_end_date"},"discount_recognition_method":{"type":["string","null"],"enum":["immediate","deferred","use_net_amount"],"description":"Method used to recognize discounts.","example":"deferred"},"journal_id":{"type":["string","null"],"description":"Journal ID used to route entries in the accounting provider.","example":"jou_abc123def456"},"entity_type":{"type":["string","null"],"enum":["invoice","payment"],"description":"Entity type the rule applies to.","example":"invoice"}},"required":["category","priority"]},"UpdateAccountingRuleCommand":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Optional user-defined name for the rule.","example":"Recurring subscriptions"},"category":{"type":["string","null"],"enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"],"description":"Rule category. Cannot be changed after creation, must match the current category when sent.","example":"accounting_software"},"priority":{"type":"number","description":"Override order. Higher priority wins when multiple rules match.","example":100},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to match. Empty means match all.","example":["prod_abc123def456"]},"product_types":{"type":"array","items":{"type":"string","enum":["flat_fee","dynamic","seat","credit"]},"description":"Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.","example":["flat_fee"]},"customer_ids":{"type":"array","items":{"type":"string"},"description":"Customer IDs for customer-specific overrides.","example":["cus_abc123def456"]},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"description":"Currency codes to match (e.g. EUR, USD).","example":["EUR"]},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Country codes for jurisdiction-based overrides.","example":["FR"]},"tax_schemes":{"type":"array","items":{"type":"string","enum":["standard","reverse_charge","exempt","not_eligible","manual"]},"description":"Tax schemes to match. A context without a tax scheme never matches a rule that sets this filter. Empty means match all.","example":["reverse_charge"]},"tax_territories":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Tax territory country codes to match. A context without a tax territory never matches a rule that sets this filter. Empty means match all.","example":["FR"]},"tax_rate_classes":{"type":"array","items":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"]},"description":"Tax rate classes to match. A context without a tax rate class never matches a rule that sets this filter. Empty means match all.","example":["standard_rate"]},"coupon_ids":{"type":"array","items":{"type":"string"},"description":"Coupon IDs to match. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"Client provider IDs to match. Empty means match all.","example":["clp_abc123def456"]},"payment_method_types":{"type":"array","items":{"type":"string","enum":["card","transfer","transfer_automated","direct_debit","direct_debit_ach","direct_debit_bacs","apple_pay","google_pay","paypal","stripe_link","external"]},"description":"Payment method types to match. Empty means match all.","example":["card"]},"bank_account_ids":{"type":"array","items":{"type":"string"},"description":"Bank account IDs to match. Empty means match all.","example":["bac_abc123def456"]},"invoice_types":{"type":"array","items":{"type":"string","enum":["invoice","document"]},"description":"Invoice kinds to match: `invoice` or `document`. Refunds and other standard invoices match as `invoice`. A context without an invoice, such as a PSP payout, never matches a rule that sets this filter. Empty means match all.","example":["document"]},"interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all","recurring"],"description":"Billing interval period filter (months, years, etc.). `recurring` matches every interval except `once` and requires a null `interval_count`. `null` matches every interval, including `once`.","example":"months"},"interval_count":{"type":["number","null"],"description":"Billing interval count filter.","example":1},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRuleCustomPropertyFilter"},"description":"Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its `values` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the `suggested_priority` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set `payments_clearing_ledger_account_id`, as PSP payouts are booked without the invoice. Empty means match all.","example":[{"slug":"fee_type","values":["service"]}]},"revenue_ledger_account_id":{"type":["string","null"],"description":"Revenue ledger account ID used for invoice line revenue routing. Must be a `revenue` account. On accounting_software rules, a `revenue` or `contra_revenue` account with entity_type invoice, an `asset` or `contra_asset` account with entity_type payment.","example":"lac_abc123def456"},"deferred_revenue_ledger_account_id":{"type":["string","null"],"description":"Deferred revenue ledger account ID used before revenue is recognized. Must be a `liability` account.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"Deferred discount ledger account ID used before discounts are recognized. Must be an `asset` or `contra_liability` account.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"Contra revenue ledger account ID used for amounts that reduce revenue. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"Discount ledger account ID used for recognized discounts. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"Accounts receivable ledger account ID used for invoice posting. Must be an `asset` account.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"Cash ledger account ID used for payment settlement. Must be an `asset` account.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"Payments clearing ledger account ID used while payments settle. Must be an `asset` account.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"Output tax ledger account ID used for tax liability. Must be a `liability` account.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"Ledger account ID debited when an invoice becomes uncollectible. Must be an `asset` account, for doubtful-receivable reclassification, or an `expense` account, for direct write-off.","example":"lac_abc123def456"},"allowance_for_doubtful_accounts_id":{"type":["string","null"],"description":"Allowance for doubtful accounts ledger account ID, set on credit_note_created rules. Must be a `contra_asset` account.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment provider fees when a payment settles. Must be an `expense` account.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment processing fees when a payment settles. Takes precedence over `provider_fees_expense_ledger_account_id` when set by the same or a higher priority rule. Must be an `expense` account.","example":"lac_abc123def456"},"payment_processing_fees_revenue_ledger_account_id":{"type":["string","null"],"description":"Payment processing fees revenue ledger account ID, set on invoice_settled rules. Must be a `revenue` account.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"Customer credits ledger account ID used for credit balances. Must be a `liability` account.","example":"lac_abc123def456"},"rev_rec_method":{"type":["string","null"],"enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue recognition method.","example":"over_time"},"rev_rec_granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Recognition period granularity. Used when `rev_rec_method` is `over_time`.","example":"month"},"rev_rec_point_in_time_basis":{"type":["string","null"],"enum":["invoice_date","service_start_date","service_end_date","custom_date"],"description":"Date revenue is recognized on. Used when `rev_rec_method` is `point_in_time`.","example":"service_end_date"},"discount_recognition_method":{"type":["string","null"],"enum":["immediate","deferred","use_net_amount"],"description":"Method used to recognize discounts.","example":"deferred"},"journal_id":{"type":["string","null"],"description":"Journal ID used to route entries in the accounting provider.","example":"jou_abc123def456"},"entity_type":{"type":["string","null"],"enum":["invoice","payment"],"description":"Entity type the rule applies to.","example":"invoice"}}},"ResolvedAccountingRule":{"type":"object","properties":{"revenue_ledger_account_id":{"type":["string","null"],"description":"Revenue ledger account ID used for invoice line revenue routing.","example":"lac_abc123def456"},"deferred_revenue_ledger_account_id":{"type":["string","null"],"description":"Deferred revenue ledger account ID used before revenue is recognized.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"Deferred discount ledger account ID used before discounts are recognized.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"Contra revenue ledger account ID used for amounts that reduce revenue.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"Discount ledger account ID used for recognized discounts.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"Accounts receivable ledger account ID used for invoice posting.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"Cash ledger account ID used for payment settlement.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"Payments clearing ledger account ID used while payments settle.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"Output tax ledger account ID used for tax liability.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.","example":"lac_abc123def456"},"allowance_for_doubtful_accounts_id":{"type":["string","null"],"description":"Allowance for doubtful accounts ledger account ID, set on credit_note_created rules.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment provider fees when a payment settles.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"Expense ledger account ID debited for payment processing fees when a payment settles. Takes precedence over `provider_fees_expense_ledger_account_id` when set by the same or a higher priority rule.","example":"lac_abc123def456"},"payment_processing_fees_revenue_ledger_account_id":{"type":["string","null"],"description":"Payment processing fees revenue ledger account ID, set on invoice_settled rules.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"Customer credits ledger account ID used for credit balances.","example":"lac_abc123def456"},"rev_rec_method":{"type":["string","null"],"enum":["none","point_in_time","over_time","usage_based","milestone","manual"],"description":"Revenue recognition method.","example":"over_time"},"rev_rec_granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Recognition period granularity. Used when `rev_rec_method` is `over_time`.","example":"month"},"rev_rec_point_in_time_basis":{"type":["string","null"],"enum":["invoice_date","service_start_date","service_end_date","custom_date"],"description":"Date revenue is recognized on. Used when `rev_rec_method` is `point_in_time`.","example":"service_end_date"},"discount_recognition_method":{"type":["string","null"],"enum":["immediate","deferred","use_net_amount"],"description":"Method used to recognize discounts.","example":"deferred"},"journal_id":{"type":["string","null"],"description":"Journal ID used to route entries in the accounting provider.","example":"jou_abc123def456"},"trace":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"string","description":"Accounting rule ID that contributed resolved fields.","example":"arl_abc123def456"},"applied_fields":{"type":"array","items":{"type":"string"},"description":"Resolved fields contributed by the accounting rule.","example":["revenueLedgerAccountId"]}},"required":["rule_id","applied_fields"]},"description":"Trace of which rules contributed which resolved fields."}},"required":["revenue_ledger_account_id","deferred_revenue_ledger_account_id","deferred_discount_ledger_account_id","contra_revenue_ledger_account_id","discount_ledger_account_id","ar_ledger_account_id","cash_ledger_account_id","payments_clearing_ledger_account_id","output_tax_ledger_account_id","uncollectible_debit_ledger_account_id","allowance_for_doubtful_accounts_id","provider_fees_expense_ledger_account_id","payment_processing_fees_expense_ledger_account_id","payment_processing_fees_revenue_ledger_account_id","customer_credits_ledger_account_id","rev_rec_method","rev_rec_granularity","rev_rec_point_in_time_basis","discount_recognition_method","journal_id","trace"]},"ResolveAccountingRuleCommand":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Identifier of the ledger this rule belongs to.","example":"led_abc123def456"},"category":{"type":"string","enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"],"description":"Rule category (e.g. accounting_software, invoice_posted).","example":"accounting_software"},"product_id":{"type":"string","description":"Product ID to resolve against.","example":"prod_abc123def456"},"product_type":{"type":"string","enum":["flat_fee","seat","dynamic","credit","bundle"],"description":"Product type to resolve against.","example":"flat_fee"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code to resolve against.","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Country code to resolve against.","example":"FR"},"tax_scheme":{"type":"string","enum":["standard","reverse_charge","exempt","not_eligible","manual"],"description":"Tax scheme to resolve against.","example":"reverse_charge"},"tax_territory":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Tax territory country code to resolve against.","example":"FR"},"tax_rate_class":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"],"description":"Tax rate class to resolve against.","example":"standard_rate"},"customer_id":{"type":"string","description":"Customer ID to resolve against.","example":"cus_abc123def456"},"coupon_id":{"type":"string","description":"Coupon ID to resolve against.","example":"cpn_abc123def456"},"client_provider_id":{"type":"string","description":"Client provider ID to resolve against.","example":"clp_abc123def456"},"payment_method_type":{"type":"string","enum":["card","transfer","transfer_automated","direct_debit","direct_debit_ach","direct_debit_bacs","apple_pay","google_pay","paypal","stripe_link","external"],"description":"Payment method type to resolve against.","example":"card"},"bank_account_id":{"type":"string","description":"Bank account ID to resolve against.","example":"bac_abc123def456"},"invoice_type":{"type":"string","enum":["invoice","document"],"description":"Invoice kind to resolve against. Accepts `invoice` or `document`; any other invoice kind is matched as `invoice`.","example":"invoice"},"interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"],"description":"Billing interval period filter (months, years, etc.).","example":"months"},"interval_count":{"type":"number","description":"Billing interval count filter.","example":1},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Invoice custom property values to resolve against, keyed by custom property slug. Unknown slugs and null values are ignored. Rules with custom property filters never match without them.","example":{"fee_type":"service"}}},"required":["ledger_id","category"]},"AggregatorThreshold":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["fixed","committed_count","top_tier","current_tier"],"description":"Threshold type. `fixed`: the threshold value is an absolute usage value. `committed_count`, `top_tier` and `current_tier`: the threshold value is a percentage of the subscription's committed count, top tier or current tier."},"threshold_value":{"type":"number"},"comparison_operator":{"type":"string","enum":["gte","lte"]}},"required":["id","name","type","threshold_value","comparison_operator"]},"Aggregator":{"type":"object","properties":{"id":{"type":"string"},"entity":{"type":"string"},"operation":{"type":"string","enum":["count","sum","sql_formula"]},"property":{"type":["string","null"]},"formula_sql":{"type":["string","null"]},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"]},"type":{"type":"string","enum":["metered","licensed"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"allow_negative_values":{"type":"boolean"},"aggregate_on_customers_enabled":{"type":"boolean"},"default_interval_count":{"type":["integer","null"]},"default_interval_period":{"type":["string","null"],"enum":["days","weeks","months","years"]},"custom_event_name":{"type":["string","null"]},"exposed_event_keys":{"type":"array","items":{"type":"string"}},"unit_name":{"type":["string","null"]},"thresholds":{"type":"array","items":{"$ref":"#/components/schemas/AggregatorThreshold"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","entity","operation","property","where","type","name","description","allow_negative_values","aggregate_on_customers_enabled","default_interval_count","default_interval_period","custom_event_name","exposed_event_keys","unit_name","thresholds","created_at","updated_at"]},"PaginatedAggregator":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Aggregator"},"description":"List of Aggregator."}},"required":["meta","data"]},"CreateCountAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the threshold."},"type":{"type":"string","enum":["fixed","committed_count","top_tier","current_tier"],"description":"Threshold type, cannot be changed once created. Defaults to `fixed`.\n- `fixed`: `threshold_value` is an absolute usage value.\n- `committed_count`: `threshold_value` is a percentage (e.g. `180` for 180%) of the committed count of each customer subscription using this aggregator, checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a committed count are skipped.\n- `top_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the last bounded tier (where the open-ended top tier starts, if any) of each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped.\n- `current_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the tier the usage currently falls in (where the next tier starts) on each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Fires once per tier as usage climbs, and never while usage is in the top tier. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped."},"threshold_value":{"type":"number","description":"The threshold value: an absolute usage value for `fixed`, a percentage for `committed_count`, `top_tier` and `current_tier`."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."}},"required":["entity","operation"]},"CreateSumAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the threshold."},"type":{"type":"string","enum":["fixed","committed_count","top_tier","current_tier"],"description":"Threshold type, cannot be changed once created. Defaults to `fixed`.\n- `fixed`: `threshold_value` is an absolute usage value.\n- `committed_count`: `threshold_value` is a percentage (e.g. `180` for 180%) of the committed count of each customer subscription using this aggregator, checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a committed count are skipped.\n- `top_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the last bounded tier (where the open-ended top tier starts, if any) of each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped.\n- `current_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the tier the usage currently falls in (where the next tier starts) on each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Fires once per tier as usage climbs, and never while usage is in the top tier. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped."},"threshold_value":{"type":"number","description":"The threshold value: an absolute usage value for `fixed`, a percentage for `committed_count`, `top_tier` and `current_tier`."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true},"operation":{"type":"string","enum":["sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum.","example":"amount"}},"required":["entity","operation","property"]},"CreateAggregator":{"oneOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"$ref":"#/components/schemas/CreateSumAggregator"}],"discriminator":{"propertyName":"operation","mapping":{"count":"#/components/schemas/CreateCountAggregator","sum":"#/components/schemas/CreateSumAggregator"}}},"UpdateAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Threshold ID. Required when updating an existing threshold."},"name":{"type":"string","description":"Name of the threshold."},"type":{"type":"string","enum":["fixed","committed_count","top_tier","current_tier"],"description":"Threshold type, cannot be changed once created. Defaults to `fixed`.\n- `fixed`: `threshold_value` is an absolute usage value.\n- `committed_count`: `threshold_value` is a percentage (e.g. `180` for 180%) of the committed count of each customer subscription using this aggregator, checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a committed count are skipped.\n- `top_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the last bounded tier (where the open-ended top tier starts, if any) of each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped.\n- `current_tier`: `threshold_value` is a percentage (e.g. `80` for 80%) of the upper bound of the tier the usage currently falls in (where the next tier starts) on each customer subscription's volume or bulk price, using the tiers of the usage's aggregator filter. Fires once per tier as usage climbs, and never while usage is in the top tier. Checked per subscription on current-period usage. Must be above 0; only `gte` is supported. Subscriptions without a volume or bulk price are skipped."},"threshold_value":{"type":"number","description":"The threshold value: an absolute usage value for `fixed`, a percentage for `committed_count`, `top_tier` and `current_tier`."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator. Replaces existing thresholds."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true},"operation":{"type":"string","enum":["count","sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum. Required when operation is 'sum'."}}},"AggregatorUsageThreshold":{"type":"object","properties":{"id":{"type":"string","description":"Threshold ID."},"name":{"type":["string","null"],"description":"Threshold name."},"type":{"type":"string","enum":["fixed","committed_count","top_tier","current_tier"],"description":"Threshold type. `fixed`: the threshold value is an absolute usage value. `committed_count`, `top_tier` and `current_tier`: the threshold value is a percentage of the subscription's committed count, top tier or current tier."},"value":{"type":"number","description":"Threshold value."},"operator":{"type":"string","enum":["gte","lte"],"description":"Comparison operator for the threshold."}},"required":["id","name","type","value","operator"]},"AggregatorUsage":{"type":"object","properties":{"id":{"type":"string","description":"Aggregator ID."},"name":{"type":"string","description":"Display name."},"unit_name":{"type":["string","null"],"description":"Unit name (e.g. 'request', 'user')."},"thresholds":{"type":"array","items":{"$ref":"#/components/schemas/AggregatorUsageThreshold"}}},"required":["id","name","unit_name","thresholds"]},"AggregatorUsageTimeseries":{"type":"object","properties":{"timeseries":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"string","description":"Bucket start (ISO-8601)."},"count":{"type":"number","description":"Total for this bucket."}},"required":["tick","count"]}},"total":{"type":"number","description":"Total over the whole period."}},"required":["timeseries","total"]},"AggregatorUsageGroupByCustomerItem":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID."},"total":{"type":"number","description":"Customer's total for the period."},"subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer's active subscriptions billing on this aggregator (and matching the filter, when set)."}},"required":["customer_id","total","subscription_ids"]},"PaginatedAggregatorUsageGroupByCustomer":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AggregatorUsageGroupByCustomerItem"},"description":"List of AggregatorUsageGroupByCustomer."}},"required":["meta","data"]},"AggregatorUsageEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event ID."},"name":{"type":"string","description":"Display name derived from the event record."},"timestamp":{"type":"string","description":"Event timestamp (ISO-8601)."},"payload":{"type":"object","additionalProperties":{},"description":"Raw event payload as ingested."}},"required":["id","name","timestamp","payload"]},"PaginatedAggregatorUsageEvent":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AggregatorUsageEvent"},"description":"List of AggregatorUsageEvent."}},"required":["meta","data"]},"PaginatedAgentPlan":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"per_seat_credits":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"billing_item_ids":{"type":"array","items":{"type":"string"},"description":"Public product identifiers for this plan's invoice charges, in creation order. Read-only; amounts are defined by the corresponding price configurations.","example":["prd_agent_plan"]},"price_configuration_ids":{"type":"array","items":{"type":"string"},"description":"Public price configuration identifiers corresponding to billing_item_ids. Read-only.","example":["pcfg_agent_plan"]},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false}},"required":["id","name","mode","rate_card_id","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","per_seat_credits","grant_rollover_enabled","billing_item_ids","price_configuration_ids","using_policy_count","is_default"]},"description":"List of AgentPlan."}},"required":["meta","data"]},"PaginatedAgentRateCard":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"denomination":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["id","kind","provider","model","rate_per_m_input","rate_per_m_output","rate_unit","rate_per_m_cached_input","rate_per_m_cache_write","dimensions"]},"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]},"attached_product_id":{"type":["string","null"],"description":"Credit product using this card as its default, or null.","example":"prd_credits"},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"using_plan_count":{"type":"number","description":"Number of plans referencing this rate card.","example":1}},"required":["id","name","denomination","currency","fallback_per_usd","rows","attached_product_id","using_policy_count","using_plan_count"]},"description":"List of AgentRateCard."}},"required":["meta","data"]},"PaginatedAgentCostCatalogEntry":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"aliases":{"type":"array","items":{"type":"string"},"description":"Alternative model names recognized by the cost catalog.","example":["claude-sonnet-5-latest"]},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"source":{"type":"string","enum":["official","override","custom","unlisted"],"description":"Source of the model or item cost.\n\n- official: Official model price registry.\n- override: Negotiated workspace cost override.\n- custom: Workspace-defined cost item.\n- unlisted: Observed usage without catalog pricing.","example":"official"},"custom_item_id":{"type":["string","null"],"description":"Active custom cost-item version identifier used to update or delete the item; null for registry models. An update returns a new identifier and preserves historical prices.","example":null},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["id","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","effective_from"],"description":"Negotiated workspace cost override, or null when using registry rates.","example":null},"enabled":{"type":"boolean","description":"Whether this model is enabled in the workspace catalog.","example":true},"enablement_source":{"type":"string","enum":["seen","manual","default_off"],"description":"Reason for the model enablement state.\n\n- seen: Enabled because usage was observed.\n- manual: Explicitly configured in the workspace.\n- default_off: Not configured or observed; disabled by default.","example":"seen"}},"required":["provider","model","aliases","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","dimensions","effective_from","source","custom_item_id","override","enabled","enablement_source"]},"description":"List of AgentCostCatalogEntry."}},"required":["meta","data"]},"PaginatedAgentBillingPolicy":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]},"description":"List of AgentBillingPolicy."}},"required":["meta","data"]},"PaginatedAgentConsumptionEntry":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact amount in the accompanying denomination; monetary ledger amounts are fractional minor units.","example":"12.5"},"denomination":{"type":"string","enum":["minor_units","credits","units"],"description":"Unit of account for amounts.\n\n- minor_units: Fractional minor units of the accompanying currency.\n- credits: Credit counts, without a currency.\n- units: Weighted rolling-allowance units, without a currency.","example":"minor_units"},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["llm_call","item","markup"],"description":"Receipt line kind.\n\n- llm_call: Model usage.\n- item: Non-LLM cost-item usage.\n- markup: Pricing markup applied to usage.","example":"llm_call"},"provider":{"type":["string","null"],"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"quantity":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Quantity consumed, as an exact decimal string; null when not applicable.","example":"1"},"unit":{"type":["string","null"],"description":"Unit counted by the receipt quantity.","example":"request"},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact amount in the accompanying denomination; monetary ledger amounts are fractional minor units.","example":"12.5"},"denomination":{"type":"string","enum":["minor_units","credits","units"],"description":"Unit of account for amounts.\n\n- minor_units: Fractional minor units of the accompanying currency.\n- credits: Credit counts, without a currency.\n- units: Weighted rolling-allowance units, without a currency.","example":"minor_units"},"usd_amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Underlying provider cost in USD major units, or null when unavailable.","example":"0.125"},"rate":{"type":["string","null"],"description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"price_status":{"type":"string","enum":["priced","partial","unpriced"],"description":"Pricing completeness. Omission on historical receipts means priced.\n\n- priced: All usage dimensions were priced.\n- partial: Some usage dimensions could not be priced.\n- unpriced: No price was available; zero means unknown cost, not free usage.","example":"priced"}},"required":["kind","provider","model","quantity","unit","amount"]},"description":"Public itemized consumption receipt; storage metadata is excluded.","example":[]},"unpriced_lines":{"type":"number","description":"Number of unpriced lines.","example":0},"overage":{"type":"boolean","description":"Whether this entry was charged past the credit or allowance boundary, in currency minor units.","example":false},"idempotency_key":{"type":"string","description":"Replay key supplied when recording this consumption; retries preserve the original charge.","example":"usage_call_123"},"credit_transaction_id":{"type":["string","null"],"description":"Credit transaction identifier for reconciliation; null outside credit consumption.","example":null},"settled_at":{"type":["string","null"],"format":"date-time","description":"Settled at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":null},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["currency","id","agent_slug","amount","denomination","breakdown","unpriced_lines","overage","idempotency_key","credit_transaction_id","settled_at","created_at"]},"description":"List of AgentConsumptionEntry."}},"required":["meta","data"]},"ApprovalRequestQuote":{"type":"object","properties":{"type":{"type":"string","enum":["quote"],"description":"Type of entity requiring approval."},"quote_id":{"type":"string","description":"Identifier of the entity requiring approval."}},"required":["type","quote_id"],"additionalProperties":false,"title":"Quote"},"ApprovalRequestSubscription":{"type":"object","properties":{"type":{"type":"string","enum":["subscription"],"description":"Type of entity requiring approval."},"subscription_id":{"type":"string","description":"Identifier of the entity requiring approval."}},"required":["type","subscription_id"],"additionalProperties":false,"title":"Subscription"},"ApprovalRequestSubscriptionTransition":{"type":"object","properties":{"type":{"type":"string","enum":["subscription_transition"],"description":"Type of entity requiring approval."},"subscription_transition_id":{"type":"string","description":"Identifier of the entity requiring approval."}},"required":["type","subscription_transition_id"],"additionalProperties":false,"title":"SubscriptionTransition"},"ApprovalRequestInvoice":{"type":"object","properties":{"type":{"type":"string","enum":["invoice"],"description":"Type of entity requiring approval."},"invoice_id":{"type":"string","description":"Identifier of the entity requiring approval."}},"required":["type","invoice_id"],"additionalProperties":false,"title":"Invoice"},"ApprovalRequestWorkflowStep":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_step"],"description":"Type of entity requiring approval."},"workflow_step_run_id":{"type":"string","description":"Identifier of the entity requiring approval."}},"required":["type","workflow_step_run_id"],"additionalProperties":false,"title":"WorkflowStep"},"ApprovalRequestEntity":{"oneOf":[{"$ref":"#/components/schemas/ApprovalRequestQuote"},{"$ref":"#/components/schemas/ApprovalRequestSubscription"},{"$ref":"#/components/schemas/ApprovalRequestSubscriptionTransition"},{"$ref":"#/components/schemas/ApprovalRequestInvoice"},{"$ref":"#/components/schemas/ApprovalRequestWorkflowStep"}],"discriminator":{"propertyName":"type","mapping":{"quote":"#/components/schemas/ApprovalRequestQuote","subscription":"#/components/schemas/ApprovalRequestSubscription","subscription_transition":"#/components/schemas/ApprovalRequestSubscriptionTransition","invoice":"#/components/schemas/ApprovalRequestInvoice","workflow_step":"#/components/schemas/ApprovalRequestWorkflowStep"}},"description":"Entity whose operation requires approval."},"ApprovalRequestDecision":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the recorded decision."},"approver_id":{"type":"string","description":"Identifier of the effective approver, which can be the delegator."},"actor_user_id":{"type":"string","description":"Identifier of the user who made the decision."},"approval_delegation_id":{"type":["string","null"],"description":"Identifier of the delegation used, or null for a direct decision."},"decision":{"type":"string","enum":["approved","rejected"],"description":"Decision made by this approver."},"comment":{"type":["string","null"],"description":"Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters."},"created_at":{"type":"string","format":"date-time","description":"UTC timestamp when this record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","approver_id","actor_user_id","approval_delegation_id","decision","comment","created_at"]},"ApprovalWorkflowStep":{"type":"object","properties":{"id":{"type":"string","description":"Approval workflow step ID.","example":"aps_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Approval workflow step name.","example":"Finance approval"},"order":{"type":"integer","description":"Step order. Orders must be sequential starting from 1.","example":1},"approver_requirement":{"type":"string","enum":["any","all"],"description":"Whether any approver or all approvers must approve the step.","example":"any"},"approver_role_ids":{"type":"array","items":{"type":"string"},"description":"User role IDs that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"description":"User IDs that can approve the step.","example":["usr_DKL4Xcb5VSa8CQ"]},"approver_sources":{"type":"array","items":{"type":"string","enum":["manager_of_owner"]},"description":"Dynamic approver sources resolved per request. `manager_of_owner` resolves to the manager of the user who owns the entity under approval — for a quote, its owner, meaning the user who created it or whoever it was later reassigned to — falling back to the user who requested the approval. The manager is the one set on their membership, and the source resolves to nobody when that user has no active manager in the account.","example":["manager_of_owner"]}},"required":["id","name","order","approver_requirement","approver_role_ids","approver_user_ids","approver_sources"]},"ApprovalRequest":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the approval request."},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"],"description":"Status of this approval execution, independent of downstream entity processing."},"entity":{"$ref":"#/components/schemas/ApprovalRequestEntity"},"workflow":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the approval workflow version."},"version":{"type":"integer","description":"Version of the approval workflow."},"original_workflow_id":{"type":["string","null"],"description":"Identifier of the original workflow, or null for its current version."}},"required":["id","version","original_workflow_id"],"description":"Workflow version used by this request."},"requested_by_user_id":{"type":"string","description":"Identifier of the user who requested approval."},"requester_comment":{"type":["string","null"],"description":"Comment supplied when requesting approval."},"current_step_id":{"type":["string","null"],"description":"Identifier of the current step, or null when the request is no longer pending."},"steps":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ApprovalWorkflowStep"},{"type":"object","properties":{"decisions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRequestDecision"},"description":"Decisions recorded for this step in chronological order."}},"required":["decisions"]}]},"description":"Workflow steps in execution order, with their recorded decisions."},"created_at":{"type":"string","format":"date-time","description":"UTC timestamp when this record was created.","example":"2024-12-20T16:04:11Z"},"completed_at":{"type":["string","null"],"format":"date-time","description":"UTC timestamp when the request completed, or null while pending.","example":"2024-12-20T16:04:11Z"}},"required":["id","status","entity","workflow","requested_by_user_id","requester_comment","current_step_id","steps","created_at","completed_at"]},"ApprovalRequestError":{"type":"object","properties":{"type":{"type":"string","description":"HTTP error category."},"statusCode":{"type":"integer","description":"HTTP response status."},"message":{"type":"string","description":"Human-readable explanation of the failure."},"code":{"type":"string","description":"Stable reason: approval_actor_not_allowed, approval_user_not_approver, approval_resource_not_found, approval_user_not_found, approval_request_not_pending, approval_step_not_current, approval_already_decided, approval_request_changed or approval_delegation_ambiguous. Refresh the request after a conflict. Completed requests return approval_request_not_pending before step or duplicate checks."}},"required":["type","statusCode","message","code"]},"ApproveApprovalRequestByIdCommand":{"type":"object","properties":{"step_id":{"type":"string","minLength":1,"description":"Expected current workflow step ID. A stale step is rejected instead of deciding the next step."},"approver_id":{"type":"string","minLength":1,"description":"Identifier of the account member making the decision. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user."},"comment":{"type":"string","maxLength":2000,"description":"Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters."}},"required":["step_id","approver_id"],"additionalProperties":false,"title":"By user ID"},"ApproveApprovalRequestByEmailCommand":{"type":"object","properties":{"step_id":{"type":"string","minLength":1,"description":"Expected current workflow step ID. A stale step is rejected instead of deciding the next step."},"approver_email":{"type":"string","format":"email","description":"Email of the account member making the decision, matched case-insensitively. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user."},"comment":{"type":"string","maxLength":2000,"description":"Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters."}},"required":["step_id","approver_email"],"additionalProperties":false,"title":"By email"},"ApproveApprovalRequestCommand":{"anyOf":[{"$ref":"#/components/schemas/ApproveApprovalRequestByIdCommand"},{"$ref":"#/components/schemas/ApproveApprovalRequestByEmailCommand"}]},"RejectApprovalRequestByIdCommand":{"type":"object","properties":{"step_id":{"type":"string","minLength":1,"description":"Expected current workflow step ID. A stale step is rejected instead of deciding the next step."},"approver_id":{"type":"string","minLength":1,"description":"Identifier of the account member making the decision. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user."},"comment":{"type":"string","minLength":1,"maxLength":2000,"description":"Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters."}},"required":["step_id","approver_id","comment"],"additionalProperties":false,"title":"By user ID"},"RejectApprovalRequestByEmailCommand":{"type":"object","properties":{"step_id":{"type":"string","minLength":1,"description":"Expected current workflow step ID. A stale step is rejected instead of deciding the next step."},"approver_email":{"type":"string","format":"email","description":"Email of the account member making the decision, matched case-insensitively. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user."},"comment":{"type":"string","minLength":1,"maxLength":2000,"description":"Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters."}},"required":["step_id","approver_email","comment"],"additionalProperties":false,"title":"By email"},"RejectApprovalRequestCommand":{"anyOf":[{"$ref":"#/components/schemas/RejectApprovalRequestByIdCommand"},{"$ref":"#/components/schemas/RejectApprovalRequestByEmailCommand"}]},"ApprovalConditionScope":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"],"description":"Whether all or any scope filters must match each product."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["product_ids"],"description":"Product filter applied to each product before discount aggregation."},"operator":{"type":"string","enum":["in","not_in"],"description":"Comparison operator used by the approval condition."},"value":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Product IDs to include or exclude from the discount calculation."}},"required":["field","operator","value"],"additionalProperties":false},"minItems":1,"description":"Non-empty product filters. Selected products contribute their combined discount amount; percentage uses the greater of their effective discount rate and highest applicable configured percentage."}},"required":["operator","conditions"],"additionalProperties":false,"description":"Optional product scope for total_discount_amount and discount_percent. Filters products before combining their discounts; omitted scope evaluates the whole document. No matching products means the condition does not match.","example":{"operator":"and","conditions":[{"field":"product_ids","operator":"in","value":["itm_DKL4Xcb5VSa8CQ"]}]}},"ApprovalCondition":{"type":"object","properties":{"field":{"type":"string","description":"Field evaluated by the approval condition. Use `has_attachment` with `eq` false for missing attachments, or `payment_method_type` with `in` or `not_in` to match payment methods. A `custom_field.<name>` condition with `in` or `not_in` and a non-empty list of values matches when the property shares any value, or no value, with the list.","example":"total_amount"},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","not_contains"],"description":"Comparison operator used by the approval condition.","example":"gte"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]},{"type":"null"}],"description":"Expected value for the approval condition.","example":100000},"scope":{"$ref":"#/components/schemas/ApprovalConditionScope"}},"required":["field","operator","value"]},"ApprovalWorkflowRule":{"type":"object","properties":{"id":{"type":"string","description":"Approval workflow rule ID.","example":"apr_DKL4Xcb5VSa8CQ"},"operator":{"type":"string","enum":["and","or"],"description":"Logical operator used to combine the rule conditions.","example":"and"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalCondition"},"description":"Conditions that must match for the rule to apply."}},"required":["id","operator","conditions"]},"ApprovalWorkflow":{"type":"object","properties":{"id":{"type":"string","description":"Approval workflow ID.","example":"apw_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Approval workflow name.","example":"Enterprise quote approval"},"description":{"type":["string","null"],"description":"Approval workflow description.","example":"Requires approval for high-value subscription quotes."},"applicable_flows":{"type":"array","items":{"type":"string","enum":["quote_subscription","quote_subscription_update","quote_one_off","subscription_update","invoice","credit_note","workflow_step"]},"description":"Quote, subscription, invoice, or credit-note flows where the workflow applies. `workflow_step` workflows are picked by a workflow's Request approval step, apply to no other flow, have no rules, and can't be created or updated through the API.","example":["quote_subscription"]},"is_active":{"type":"boolean","description":"Whether the workflow is active.","example":true},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match.","example":10},"rules":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalWorkflowRule"},"description":"Rules that determine when the workflow applies. Empty for `workflow_step` workflows."},"step_execution":{"type":"string","enum":["sequential","parallel"],"description":"How workflow steps execute. Sequential steps run by order; parallel steps run together.","example":"sequential"},"email_notification_enabled":{"type":"boolean","description":"Whether approvers receive email notifications for this workflow.","example":true},"steps":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalWorkflowStep"},"description":"Approval steps required by the workflow."},"version":{"type":"integer","description":"Workflow version number.","example":1},"original_workflow_id":{"type":["string","null"],"description":"Original workflow ID when this workflow is an archived version.","example":null},"created_at":{"type":"string","format":"date-time","description":"Approval workflow creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["id","name","description","applicable_flows","is_active","priority","rules","step_execution","email_notification_enabled","steps","version","original_workflow_id","created_at"]},"PaginatedApprovalWorkflow":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalWorkflow"},"description":"List of ApprovalWorkflow."}},"required":["meta","data"]},"CreateApprovalWorkflow":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Approval workflow name.","example":"Enterprise quote approval"},"description":{"type":["string","null"],"description":"Approval workflow description.","example":"Requires approval for high-value subscription quotes."},"applicable_flows":{"type":"array","items":{"type":"string","enum":["quote_subscription","quote_subscription_update","quote_one_off","invoice","credit_note"]},"minItems":1,"description":"Quote, subscription, invoice, or credit-note flows where the workflow applies. `workflow_step` workflows are picked by a workflow's Request approval step, apply to no other flow, have no rules, and can't be created or updated through the API.","example":["quote_subscription"]},"is_active":{"type":"boolean","description":"Whether the workflow is active.","example":true},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match.","example":10},"step_execution":{"type":"string","enum":["sequential","parallel"],"description":"How workflow steps execute. Sequential steps run by order; parallel steps run together.","example":"sequential"},"email_notification_enabled":{"type":"boolean","description":"Whether approvers receive email notifications for this workflow.","example":true},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"],"description":"Logical operator used to combine the rule conditions.","example":"and"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalCondition"},"minItems":1,"description":"Conditions that must match for the rule to apply."}},"required":["operator","conditions"]},"minItems":1,"description":"Rules that determine when the workflow applies. Empty for `workflow_step` workflows."},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Approval workflow step name.","example":"Finance approval"},"order":{"type":"integer","exclusiveMinimum":0,"description":"Step order. Orders must be sequential starting from 1.","example":1},"approver_requirement":{"type":"string","enum":["any","all"],"description":"Whether any approver or all approvers must approve the step.","example":"any"},"approver_role_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"User role IDs that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"User IDs that can approve the step.","example":["usr_DKL4Xcb5VSa8CQ"]},"approver_sources":{"type":"array","items":{"type":"string","enum":["manager_of_owner"]},"default":[],"description":"Dynamic approver sources resolved per request. `manager_of_owner` resolves to the manager of the user who owns the entity under approval — for a quote, its owner, meaning the user who created it or whoever it was later reassigned to — falling back to the user who requested the approval. The manager is the one set on their membership, and the source resolves to nobody when that user has no active manager in the account.","example":["manager_of_owner"]}},"required":["name","order","approver_requirement"]},"minItems":1,"description":"Approval steps required by the workflow."}},"required":["name","applicable_flows","is_active","priority","step_execution","rules","steps"]},"UpdateApprovalWorkflow":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Approval workflow name.","example":"Enterprise quote approval"},"description":{"type":["string","null"],"description":"Approval workflow description.","example":"Requires approval for high-value subscription quotes."},"applicable_flows":{"type":"array","items":{"type":"string","enum":["quote_subscription","quote_subscription_update","quote_one_off","invoice","credit_note"]},"minItems":1,"description":"Quote, subscription, invoice, or credit-note flows where the workflow applies. `workflow_step` workflows are picked by a workflow's Request approval step, apply to no other flow, have no rules, and can't be created or updated through the API.","example":["quote_subscription"]},"is_active":{"type":"boolean","description":"Whether the workflow is active.","example":true},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match.","example":10},"step_execution":{"type":"string","enum":["sequential","parallel"],"description":"How workflow steps execute. Sequential steps run by order; parallel steps run together.","example":"sequential"},"email_notification_enabled":{"type":"boolean","description":"Whether approvers receive email notifications for this workflow.","example":true},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"],"description":"Logical operator used to combine the rule conditions.","example":"and"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalCondition"},"minItems":1,"description":"Conditions that must match for the rule to apply."}},"required":["operator","conditions"]},"minItems":1,"description":"Rules that determine when the workflow applies. Empty for `workflow_step` workflows."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Approval workflow step ID.","example":"aps_DKL4Xcb5VSa8CQ"},"name":{"type":"string","minLength":1,"description":"Approval workflow step name.","example":"Finance approval"},"order":{"type":"integer","exclusiveMinimum":0,"description":"Step order. Orders must be sequential starting from 1.","example":1},"approver_requirement":{"type":"string","enum":["any","all"],"description":"Whether any approver or all approvers must approve the step.","example":"any"},"approver_role_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"User role IDs that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"User IDs that can approve the step.","example":["usr_DKL4Xcb5VSa8CQ"]},"approver_sources":{"type":"array","items":{"type":"string","enum":["manager_of_owner"]},"default":[],"description":"Dynamic approver sources resolved per request. `manager_of_owner` resolves to the manager of the user who owns the entity under approval — for a quote, its owner, meaning the user who created it or whoever it was later reassigned to — falling back to the user who requested the approval. The manager is the one set on their membership, and the source resolves to nobody when that user has no active manager in the account.","example":["manager_of_owner"]}},"required":["name","order","approver_requirement"]},"minItems":1,"description":"Approval steps required by the workflow."}}},"AuditLogUserActor":{"type":"object","properties":{"type":{"type":"string","enum":["user"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"user"},"user_id":{"type":["string","null"],"description":"ID of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"usr_2bFz0LmQ8xsTpU"},"user_name":{"type":["string","null"],"description":"Full name of the team member who triggered the event. `null` if the team member is unknown, has no name, or an API key was used.","example":"Jane Doe"},"user_email":{"type":["string","null"],"description":"Email of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"jane@acme.com"}},"required":["type","user_id","user_name","user_email"],"additionalProperties":false,"title":"User"},"AuditLogApiActor":{"type":"object","properties":{"type":{"type":"string","enum":["api"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"api"},"api_credential_id":{"type":["string","null"],"description":"ID of the API key used to trigger the event. `null` if no API key was used.","example":"apc_8UbWw4fP8xsTpU"},"api_credential_name":{"type":["string","null"],"description":"Name of the API key used to trigger the event. `null` if no API key was used.","example":"Production key"},"app_name":{"type":["string","null"],"description":"Name of the OAuth app that triggered the event. `null` if no OAuth app was used.","example":null}},"required":["type","api_credential_id","api_credential_name","app_name"],"additionalProperties":false,"title":"API"},"AuditLogAppUserActor":{"type":"object","properties":{"type":{"type":"string","enum":["app_user"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"app_user"},"user_id":{"type":["string","null"],"description":"ID of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"usr_2bFz0LmQ8xsTpU"},"user_name":{"type":["string","null"],"description":"Full name of the team member who triggered the event. `null` if the team member is unknown, has no name, or an API key was used.","example":"Jane Doe"},"user_email":{"type":["string","null"],"description":"Email of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"jane@acme.com"},"app_id":{"type":"string","description":"ID of the embedded app the team member used. Kept even after the app is deleted.","example":"eap_4kQz8LmW0xsTpU"},"app_name":{"type":["string","null"],"description":"Name of the embedded app the team member used. `null` if the app was deleted.","example":"Acme CPQ"}},"required":["type","user_id","user_name","user_email","app_id","app_name"],"additionalProperties":false,"title":"App user"},"AuditLogMcpOrCliActor":{"type":"object","properties":{"type":{"type":"string","enum":["mcp","cli"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"mcp"},"user_id":{"type":["string","null"],"description":"ID of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"usr_2bFz0LmQ8xsTpU"},"user_name":{"type":["string","null"],"description":"Full name of the team member who triggered the event. `null` if the team member is unknown, has no name, or an API key was used.","example":"Jane Doe"},"user_email":{"type":["string","null"],"description":"Email of the team member who triggered the event. `null` if the team member is unknown or an API key was used.","example":"jane@acme.com"},"api_credential_id":{"type":["string","null"],"description":"ID of the API key used to trigger the event. `null` if no API key was used.","example":"apc_8UbWw4fP8xsTpU"},"api_credential_name":{"type":["string","null"],"description":"Name of the API key used to trigger the event. `null` if no API key was used.","example":"Production key"}},"required":["type","user_id","user_name","user_email","api_credential_id","api_credential_name"],"additionalProperties":false,"title":"MCP or CLI"},"AuditLogIntegrationActor":{"type":"object","properties":{"type":{"type":"string","enum":["integration"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"integration"},"provider_name":{"type":["string","null"],"enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Name of the integration provider that triggered the event (e.g. `hubspot`). `null` if the provider is not public.","example":"hubspot"}},"required":["type","provider_name"],"additionalProperties":false,"title":"Integration"},"AuditLogAnonymousActor":{"type":"object","properties":{"type":{"type":"string","enum":["checkout","portal","quote","ui_component","workflow","system"],"description":"Kind of actor that triggered the event. `user`: a team member in the Hyperline app. `api`: an API key or an OAuth app. `app_user`: a team member through an embedded app, with a user token minted for that app. `mcp`: the Hyperline MCP server. `cli`: the Hyperline CLI. `checkout`: a customer through a checkout session. `portal`: a customer through the customer portal. `quote`: a customer through a quote page. `ui_component`: a customer through an embedded UI component. `integration`: a connected third-party integration. `workflow`: a Hyperline workflow you configured. `system`: an automated Hyperline process (scheduler, Hyperline support).","example":"system"}},"required":["type"],"additionalProperties":false,"title":"Anonymous"},"AuditLogActor":{"oneOf":[{"$ref":"#/components/schemas/AuditLogUserActor"},{"$ref":"#/components/schemas/AuditLogApiActor"},{"$ref":"#/components/schemas/AuditLogAppUserActor"},{"$ref":"#/components/schemas/AuditLogMcpOrCliActor"},{"$ref":"#/components/schemas/AuditLogIntegrationActor"},{"$ref":"#/components/schemas/AuditLogAnonymousActor"},{"type":"null"}],"description":"Who or what triggered the event. `null` when the actor is unknown (events recorded before April 2025).","example":{"type":"api","api_credential_id":"apc_8UbWw4fP8xsTpU","api_credential_name":"Production key","app_name":null}},"AuditLog":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["customer.created","customer.updated","customer.archived","customer.deleted","customer.recovered","invoice.created","invoice.updated","invoice.ready","invoice.settled","invoice.voided","invoice.refunded","invoice.errored","invoice.deleted","invoice.reminder_sent","invoice.grace_period.started","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","subscription.created","subscription.updated","subscription.activated","subscription.trial_ended","subscription.paused","subscription.reactivated","subscription.reinstated","subscription.renewed","subscription.charged","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","quote.created","quote.approved","quote.sent","quote.signed","quote.viewed","quote.voided","transaction.created","transaction.updated","transaction.processed","transaction.allocations_updated","transaction.deleted"],"description":"Event type.","example":"invoice.electronic_invoice.sent"},"created_at":{"type":"string","format":"date-time","description":"Date the audit log entry was recorded in Hyperline. Filter on created_at for incremental syncs, including backdated events.","example":"2024-10-20T14:32:12.000Z"},"happened_at":{"type":"string","format":"date-time","description":"Date the event happened, which can precede the date it was recorded. Filter on happened_at to select an event-time range.","example":"2024-10-20T14:32:11.000Z"},"customer_id":{"type":["string","null"],"description":"ID of the customer the event relates to. `null` if the event is not attached to a customer.","example":"cus_Typ0px2W0aiEtl"},"subscription_id":{"type":["string","null"],"description":"ID of the subscription the event relates to. `null` if the event is not attached to a subscription.","example":null},"invoice_id":{"type":["string","null"],"description":"ID of the invoice the event relates to. `null` if the event is not attached to an invoice.","example":"inv_1eTaiytfA0i2Va"},"quote_id":{"type":["string","null"],"description":"ID of the quote the event relates to. `null` if the event is not attached to a quote.","example":null},"transaction_id":{"type":["string","null"],"description":"ID of the transaction the event relates to. `null` if the event is not attached to a transaction.","example":null},"actor":{"$ref":"#/components/schemas/AuditLogActor"}},"required":["type","created_at","happened_at","customer_id","subscription_id","invoice_id","quote_id","transaction_id","actor"],"title":"Audit log"},{"type":"object","properties":{"type":{"type":"string","enum":["email.created"],"description":"Event type.","example":"email.created"},"email_status":{"type":["string","null"],"enum":["queued","sent","delivered","opened","clicked","bounced","spammed","failed","undeliverable","dropped","suppressed"],"description":"Delivery status of the related email. `null` for non-email events.","example":"sent"},"created_at":{"type":"string","format":"date-time","description":"Date the audit log entry was recorded in Hyperline. Filter on created_at for incremental syncs, including backdated events.","example":"2024-10-20T14:32:12.000Z"},"happened_at":{"type":"string","format":"date-time","description":"Date the event happened, which can precede the date it was recorded. Filter on happened_at to select an event-time range.","example":"2024-10-20T14:32:11.000Z"},"customer_id":{"type":["string","null"],"description":"ID of the customer the event relates to. `null` if the event is not attached to a customer.","example":"cus_Typ0px2W0aiEtl"},"subscription_id":{"type":["string","null"],"description":"ID of the subscription the event relates to. `null` if the event is not attached to a subscription.","example":null},"invoice_id":{"type":["string","null"],"description":"ID of the invoice the event relates to. `null` if the event is not attached to an invoice.","example":"inv_1eTaiytfA0i2Va"},"quote_id":{"type":["string","null"],"description":"ID of the quote the event relates to. `null` if the event is not attached to a quote.","example":null},"transaction_id":{"type":["string","null"],"description":"ID of the transaction the event relates to. `null` if the event is not attached to a transaction.","example":null},"actor":{"$ref":"#/components/schemas/AuditLogActor"}},"required":["type","email_status","created_at","happened_at","customer_id","subscription_id","invoice_id","quote_id","transaction_id","actor"],"title":"Email audit log"}]},"CursorPaginatedAuditLog":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"},"description":"List of AuditLog."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"PaginatedBankAccount":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"anyOf":[{"$ref":"#/components/schemas/StandardBankAccount"},{"$ref":"#/components/schemas/ConnectedBankAccount"}]}]},"description":"List of BankAccount."}},"required":["meta","data"]},"BankAccountTransaction":{"type":"object","properties":{"id":{"type":"string","description":"Bank account transaction ID.","example":"obt_QrqP1vctzd9hdA"},"bank_account_id":{"type":"string","description":"ID of the bank account that owns the transaction.","example":"bac_KJyPrMA1toAqRG"},"description":{"type":"string","description":"Bank transaction description.","example":"Invoice payment INV-001"},"amount":{"type":"number","description":"Transaction amount, expressed in the currency's smallest unit.","example":10000},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"original_amount":{"type":["number","null"],"description":"Original transaction amount, expressed in the original currency's smallest unit.","example":null},"original_currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Original transaction currency.","example":null},"status":{"type":"string","enum":["pending","posted"],"description":"Bank transaction status.","example":"posted"},"bank_transaction_id":{"type":["string","null"],"description":"Transaction ID from the connected bank.","example":"bank_txn_123"},"authorized_at":{"type":"string","format":"date-time","description":"Date when the bank authorized the transaction.","example":"2026-01-12T10:00:00.000Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the bank settled the transaction.","example":"2026-01-12T12:00:00.000Z"},"created_at":{"type":"string","format":"date-time","description":"Date when the transaction was created in Hyperline.","example":"2026-01-12T12:05:00.000Z"}},"required":["id","bank_account_id","description","amount","currency","original_amount","original_currency","status","bank_transaction_id","authorized_at","settled_at","created_at"]},"CursorPaginatedBankAccountTransaction":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankAccountTransaction"},"description":"List of BankAccountTransaction."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"CatalogVersion":{"type":"object","properties":{"id":{"type":"string","description":"Catalog version ID.","example":"pcv_9x8v7u6t5s4r"},"version":{"type":"number","description":"Monotonic version number assigned to the catalog version.","example":12},"status":{"type":"string","enum":["draft","published","archived"],"description":"Catalog version status. Draft versions contain unpublished changes, published versions are live, and archived versions are discarded drafts.","example":"published"},"name":{"type":["string","null"],"description":"Optional display name for the catalog version.","example":"Q3 catalog"},"description":{"type":["string","null"],"description":"Optional internal description for the catalog version.","example":"Catalog published for Q3 pricing."},"base_version_id":{"type":["string","null"],"description":"ID of the published catalog version this version was created from.","example":"pcv_1a2b3c4d5e6f"},"revert_of_version_id":{"type":["string","null"],"description":"ID of the published catalog version restored by this revert, or null when the version was not created by a revert.","example":null},"source_file_name":{"type":["string","null"],"description":"Name of the source import file that created this catalog version, or null when the version was not imported.","example":null},"resource_count":{"type":["number","null"],"description":"Number of resources tracked in the catalog snapshot.","example":42},"published_at":{"type":["string","null"],"format":"date-time","description":"Catalog version publication date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-17T12:30:00Z"},"created_at":{"type":"string","format":"date-time","description":"Catalog version creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-17T12:15:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Catalog version last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-17T12:30:00Z"}},"required":["id","version","status","name","description","base_version_id","revert_of_version_id","source_file_name","resource_count","published_at","created_at","updated_at"]},"CreateCatalogDraft":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Optional display name for the draft.","example":"Q3 catalog draft"},"description":{"type":["string","null"],"description":"Optional internal description for the draft.","example":"Draft for Q3 pricing updates."}}},"CatalogPublishResult":{"type":"object","properties":{"version_id":{"type":"string","description":"ID of the catalog version that was published.","example":"pcv_9x8v7u6t5s4r"},"version":{"type":"number","description":"Version number assigned to the published catalog.","example":12},"impacted_subscriptions":{"type":"number","description":"Number of subscriptions impacted by catalog price changes.","example":7}},"required":["version_id","version","impacted_subscriptions"]},"CatalogSnapshotResource":{"type":"object","properties":{"entity_type":{"type":"string","enum":["aggregator","aggregator_filter","bundle_item","customer_segment","price","price_book","price_configuration","product","product_accounting","product_provider"],"description":"Type of catalog entity represented by the resource.","example":"product"},"id":{"type":"string","description":"Original ID of the resource in the source organisation.","example":"itm_3kXODDF42QXtnL"},"config_key":{"type":"string","description":"Stable configuration key used to match the resource across organisations.","example":"product:enterprise-plan"},"data":{"type":"object","additionalProperties":{},"description":"Serialized resource payload. The shape depends on the resource entity type.","example":{"name":"Enterprise plan","type":"flat_fee"}},"refs":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"References from this resource to other catalog resources, keyed by reference name.","example":{"product_id":"product:enterprise-plan"}}},"required":["entity_type","id","config_key","data"]},"CatalogSnapshot":{"type":"object","properties":{"format":{"type":"string","enum":["hyperline.product_catalog.v2"],"description":"Catalog export format identifier.","example":"hyperline.product_catalog.v2"},"exported_at":{"type":"string","format":"date-time","description":"Date when the snapshot was exported. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-17T12:30:00Z"},"tracked_entity_types":{"type":"array","items":{"type":"string","enum":["aggregator","aggregator_filter","bundle_item","customer_segment","price","price_book","price_configuration","product","product_accounting","product_provider"]},"description":"Entity types included in the catalog export.","example":["product","price_configuration","price"]},"resources":{"type":"array","items":{"$ref":"#/components/schemas/CatalogSnapshotResource"},"description":"Catalog resources included in the snapshot."}},"required":["format","exported_at","resources"]},"PaginatedCompany":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID.","example":"cli_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Company name.","example":"Acme"},"logo_url":{"type":["string","null"],"description":"Logo URL of the default invoicing entity."},"favicon_url":{"type":["string","null"],"description":"Favicon URL of the default invoicing entity."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["id","name","logo_url","favicon_url","address"]},"description":"List of Company."}},"required":["meta","data"]},"ContractClause":{"type":"object","properties":{"id":{"type":"string","description":"Contract clause ID.","example":"ccl_QalW2vTAdkR6IY"},"name":{"type":"string","description":"Name of the contract clause, displayed in the contract library.","example":"Termination clause"},"text":{"type":"string","description":"Default text of the clause, used when no translation exists for the customer language. Plain text, line breaks are preserved.","example":"Either party may terminate the agreement with a 30-day written notice."},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string","description":"Text of the clause in this language.","example":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}},"required":["text"]},"description":"Translations of the clause, keyed by language code. The translation matching the customer language is used instead of `text`.","example":{"fr":{"text":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}}},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the clause is available when building a quote.","example":["ive_jerrb484RHn"]},"created_at":{"type":"string","format":"date-time","description":"Contract clause creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Contract clause last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"}},"required":["id","name","text","translations","invoicing_entity_ids","created_at","updated_at"]},"PaginatedContractClause":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContractClause"},"description":"List of ContractClause."}},"required":["meta","data"]},"CreateContractClause":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the contract clause, displayed in the contract library.","example":"Termination clause"},"text":{"type":"string","minLength":1,"description":"Default text of the clause, used when no translation exists for the customer language. Plain text, line breaks are preserved.","example":"Either party may terminate the agreement with a 30-day written notice."},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"Text of the clause in this language.","example":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}},"required":["text"]},"description":"Translations of the clause, keyed by language code. The translation matching the customer language is used instead of `text`.","example":{"fr":{"text":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}}},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the clause is available when building a quote.","example":["ive_jerrb484RHn"]}},"required":["name","text"],"additionalProperties":false},"UpdateContractClause":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the contract clause, displayed in the contract library.","example":"Termination clause"},"text":{"type":"string","minLength":1,"description":"Default text of the clause, used when no translation exists for the customer language. Plain text, line breaks are preserved.","example":"Either party may terminate the agreement with a 30-day written notice."},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"Text of the clause in this language.","example":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}},"required":["text"]},"description":"Translations of the clause, keyed by language code. Replaces all existing translations: omitted languages are removed.","example":{"fr":{"text":"Chaque partie peut résilier le contrat avec un préavis écrit de 30 jours."}}},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the clause is available when building a quote.","example":["ive_jerrb484RHn"]}},"additionalProperties":false},"ContractDocumentFile":{"type":"object","properties":{"id":{"type":"string","description":"File ID.","example":"fil_4Ykq9NcWpL2sTb"},"name":{"type":"string","description":"File name.","example":"dpa-v3.pdf"},"mimetype":{"type":"string","description":"File MIME type.","example":"application/pdf"}},"required":["id","name","mimetype"]},"ContractDocumentContent":{"type":"object","properties":{"id":{"type":"string","description":"Contract document content ID.","example":"ctc_Hn2Lq8VwRt5xKe"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl","default"],"description":"Language of the content. `default` is used when no content exists for the customer language.","example":"fr"},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty means all countries. In a multipart request, send a comma-separated list.","example":["FR","BE"]},"files":{"type":"array","items":{"$ref":"#/components/schemas/ContractDocumentFile"},"description":"Files of the content, in order. They are attached to quotes and merged into the signed PDF."},"created_at":{"type":"string","format":"date-time","description":"Creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"}},"required":["id","language","countries","files","created_at","updated_at"]},"ContractDocument":{"type":"object","properties":{"id":{"type":"string","description":"Contract document ID.","example":"cot_8kTq3VdNcR1aLp"},"name":{"type":"string","description":"Name of the contract document, displayed in the contract library.","example":"Data Processing Agreement"},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the contract document is available when building a quote.","example":["ive_jerrb484RHn"]},"contents":{"type":"array","items":{"$ref":"#/components/schemas/ContractDocumentContent"},"description":"Versions of the document per language and countries. The content matching the customer language and country is attached to the quote, falling back to the `default` language."},"created_at":{"type":"string","format":"date-time","description":"Creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"}},"required":["id","name","invoicing_entity_ids","contents","created_at","updated_at"]},"PaginatedContractDocument":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContractDocument"},"description":"List of ContractDocument."}},"required":["meta","data"]},"CreateContractDocument":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the contract document, displayed in the contract library.","example":"Data Processing Agreement"},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the contract document is available when building a quote.","example":["ive_jerrb484RHn"]}},"required":["name"],"additionalProperties":false},"UpdateContractDocument":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the contract document, displayed in the contract library.","example":"Data Processing Agreement"},"invoicing_entity_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoicing entities for which the contract document is available when building a quote.","example":["ive_jerrb484RHn"]}},"additionalProperties":false},"CreateContractDocumentContent":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl","default"],"description":"Language of the content. `default` is used when no content exists for the customer language.","example":"fr"},"countries":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}],"description":"Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty means all countries. In a multipart request, send a comma-separated list.","example":["FR","BE"]}},"required":["language"],"additionalProperties":false},"UpdateContractDocumentContent":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl","default"],"description":"Language of the content. `default` is used when no content exists for the customer language.","example":"fr"},"countries":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}],"description":"Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty means all countries. In a multipart request, send a comma-separated list, or an empty value for all countries.","example":["FR","BE"]}},"additionalProperties":false},"Coupon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"Products the coupon is scoped to, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, empty when `all`.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). `include` and `exclude` require a non-empty `product_ids`. When omitted on create/update, it is inferred: `include` if `product_ids` is non-empty, `all` otherwise. Integrations that read `product_ids` without `product_scope` will misread an `exclude` list as the products the coupon applies to.","example":"include"},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the deletion of the coupon.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":{"campaign":"partner_discount"}},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this coupon in external providers (billing, etc)."},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["id","name","description","expiration_date","redemption_limit","product_ids","product_scope","repeat","duration","created_at","deleted_at","properties","integrations","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"Products the coupon is scoped to, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, empty when `all`.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). `include` and `exclude` require a non-empty `product_ids`. When omitted on create/update, it is inferred: `include` if `product_ids` is non-empty, `all` otherwise. Integrations that read `product_ids` without `product_scope` will misread an `exclude` list as the products the coupon applies to.","example":"include"},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the deletion of the coupon.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":{"campaign":"partner_discount"}},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this coupon in external providers (billing, etc)."},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["id","name","description","expiration_date","redemption_limit","product_ids","product_scope","repeat","duration","created_at","deleted_at","properties","integrations","type","discount_percent"],"title":"Coupon percent"}]},"PaginatedCoupon":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"},"description":"List of Coupon."}},"required":["meta","data"]},"CreateCoupon":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, empty when `all`.","example":null},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). `include` and `exclude` require a non-empty `product_ids`. When omitted on create/update, it is inferred: `include` if `product_ids` is non-empty, `all` otherwise. Integrations that read `product_ids` without `product_scope` will misread an `exclude` list as the products the coupon applies to.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"integer","minimum":1,"description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":{"campaign":"partner_discount"}}},"required":["name"]},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["type","discount_percent"],"title":"Coupon percent"}]}]},"UpdateCoupon":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, empty when `all`.","example":null},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). `include` and `exclude` require a non-empty `product_ids`. When omitted on create/update, it is inferred: `include` if `product_ids` is non-empty, `all` otherwise. Integrations that read `product_ids` without `product_scope` will misread an `exclude` list as the products the coupon applies to.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"integer","minimum":1,"description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":{"campaign":"partner_discount"}}},"required":["name"]},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["type","discount_percent"],"title":"Coupon percent"}]}]},"PaginatedPromotionCode":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]},"description":"List of PromotionCode."}},"required":["meta","data"]},"Credit":{"type":"object","properties":{"product_id":{"type":"string","description":"Credit product ID.","example":"itm_3kXODDF42QXtnL"},"customer_id":{"type":"string","description":"Customer ID related to the credit.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Credit name.","example":"Credit name"},"current_balance":{"type":"number","description":"Current credit balance.","example":2000},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"last_refreshed_at":{"type":"string","format":"date-time","description":"Credit last refresh date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-23T09:00:01.860Z"},"auto_topup":{"type":["object","null"],"properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":["number","null"],"description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":null},"price_id":{"type":["string","null"],"description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined.","example":null}},"required":["credit_count","amount_excluding_tax","price_id"],"description":"Auto top-up options."},"created_at":{"type":"string","format":"date-time","description":"Credit creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Credit last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-10-13T10:00:01.860Z"}},"required":["product_id","customer_id","name","current_balance","low_count_threshold","last_refreshed_at","auto_topup","created_at","updated_at"]},"PaginatedCredit":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Credit"},"description":"List of Credit."}},"required":["meta","data"]},"CreditTransaction":{"type":"object","properties":{"id":{"type":"string","description":"Credit transaction ID.","example":"cdt_BPZ19obsBS2qyo"},"product_id":{"type":["string","null"],"description":"ID of the product related to the transaction.","example":"itm_3kXODDF42QXtnL"},"price":{"type":["object","null"],"properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"pack_size":{"type":"number"}},"required":["id","amount","pack_size"],"description":"Price details related to the transaction.","example":{"id":"pri_0Jv8EbMDOGsHcn","amount":20000,"pack_size":120}},"customer_id":{"type":"string","description":"ID of the customer related to the transaction.","example":"cus_Typ0px2W0aiEtl"},"payment_method_id":{"type":["string","null"],"description":"ID of the payment method related to the transaction.","example":"pm_1xMpj5bwRqN7LM"},"invoice_id":{"type":["string","null"],"description":"ID of the invoice related to the transaction.","example":"inv_1eTaiytfA0i2Va"},"event_id":{"type":["string","null"],"description":"ID of the event related to the credit consumption.","example":null},"aggregator_id":{"type":["string","null"],"description":"ID of the aggregator that triggered this usage (for multi-aggregator credits).","example":null},"expires_at":{"type":["string","null"],"format":"date","description":"Expiration date for credits linked to this transaction","example":null},"type":{"type":"string","enum":["topup","usage","expiration"],"description":"Type of credit transaction.","example":"topup"},"source":{"type":"string","enum":["app","portal","api","system"],"description":"Deprecated field, we recommend no longer using it.","example":"system","deprecated":true},"amount_excluding_tax":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"credit_count":{"type":"number","description":"Value of credits related to the transaction.","example":32},"balance_after":{"type":"number","description":"Credit balance after the transaction.","example":2000},"created_at":{"type":"string","format":"date-time","description":"Credit transaction creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-13T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Credit transaction last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-13T07:00:01.860Z"}},"required":["id","product_id","price","customer_id","payment_method_id","invoice_id","event_id","aggregator_id","expires_at","type","source","amount_excluding_tax","credit_count","balance_after","created_at","updated_at"]},"PaginatedCreditTransaction":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransaction"},"description":"List of CreditTransaction."}},"required":["meta","data"]},"CreateCredit":{"type":"object","properties":{"product_id":{"type":"string","description":"Credit product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Credit name.","example":"Credit name"},"current_balance":{"type":"number","description":"Current credit balance.","example":2000},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"auto_topup":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":2000},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."}},"required":["credit_count"],"description":"Auto top-up options."}},"required":["product_id"]},"UpdateCredit":{"type":"object","properties":{"name":{"type":"string","description":"Credit name.","example":"Credit name"},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"auto_topup":{"anyOf":[{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":2000},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."}},"description":"Auto top-up options."},{"type":"null"},{"type":"null"}],"description":"Auto top-up options."}}},"CreateCreditPurchase":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit."},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."},"expires_at":{"type":"string","format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["credit_count"]},"UpdateCreditTopupExpiration":{"type":"object","properties":{"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["expires_at"]},"CreateCreditTopup":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"expires_at":{"type":"string","format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["credit_count"]},"CreateCreditUsage":{"type":"object","properties":{"usage_retained":{"type":"number","exclusiveMinimum":0,"description":"Value indicating the number of credits consumed.","example":41},"event_id":{"type":"string","description":"Event ID corresponding to the credit consumption."}},"required":["usage_retained"]},"PriceFee":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"]},"MeteringFilterConfiguration":{"type":"object","properties":{"conditional":{"type":"string","enum":["and","or"],"description":"Logical operator used to combine multiple filter fields. `and` requires all fields to match, `or` requires at least one."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string","description":"Name of the event property to filter on."}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is_null","is_not_null"],"description":"Comparison operator to apply on the property value."}},"required":["operator"],"title":"Null check"},{"type":"object","properties":{"operator":{"type":"string","enum":["in","not_in"],"description":"Comparison operator to apply on the property value."},"value":{"type":"string"}},"required":["operator","value"],"title":"List match"},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"],"description":"Comparison operator to apply on the property value."},"value":{"type":"number"}},"required":["operator","value"],"title":"Numeric comparison"},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","not_equal"],"description":"Comparison operator to apply on the property value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"],"title":"Equality check"}]}]}}},"required":["conditional","fields"],"description":"Configuration of the rules used to filter eligible events.","example":{"conditional":"and","fields":[{"property":"card_type","operator":"equals","value":"visa"},{"property":"kind","operator":"equals","value":"credit_card"}]}},"MeteringFilter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter to scope eligible billable events."},"PriceVolume":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "}},"required":["type","amount","unit_count","from","to"]},"PricePackaged":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "}},"required":["type","amount","unit_count","from","to"]},"PriceBulk":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "}},"required":["type","amount","unit_count","to"]},"PriceBps":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"id":{"type":"string","description":"Price ID."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"PriceBundle":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"]},"PriceConfiguration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"},{"type":"null"}],"description":"Price configuration the customer pays on the portal. `null` while disabled, or once that price configuration is archived, deleted or not in the customer's currency."},"CreditPortalSettings":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID related to the credit.","example":"cus_Typ0px2W0aiEtl"},"product_id":{"type":"string","description":"Credit product ID.","example":"itm_3kXODDF42QXtnL"},"enabled":{"type":"boolean","description":"Whether the customer can buy this credit product from the customer portal. Enabling requires a price: `price_configuration_id`, `custom_price_configuration`, or the price already set. Disabling clears the price and removes the customer's own price.","example":true},"currency":{"type":["string","null"],"description":"Customer currency, which every portal price must use.","example":"EUR"},"price_configuration":{"$ref":"#/components/schemas/PriceConfiguration"},"is_custom_price":{"type":"boolean","description":"Whether `price_configuration` is the customer's own price.","example":false}},"required":["customer_id","product_id","enabled","currency","price_configuration","is_custom_price"]},"UpdateCreditPortalSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the customer can buy this credit product from the customer portal. Enabling requires a price: `price_configuration_id`, `custom_price_configuration`, or the price already set. Disabling clears the price and removes the customer's own price.","example":true},"price_configuration_id":{"type":"string","description":"ID of one of the credit product's price configurations, in the customer's price book and currency, of type `bundle`, `volume` or `bulk`. Mutually exclusive with `custom_price_configuration`.","example":"prc_3kXODDF42QXtnL"},"custom_price_configuration":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["type","prices"],"title":"Volume"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["type","prices"],"title":"Bulk"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["type","prices"],"title":"Bundle"}],"description":"A price of the customer's own, in the customer's currency, replacing any previous one. Same shape as a credit product price configuration. Mutually exclusive with `price_configuration_id`. It needs at least one price; `unit_count` is a whole number of at least 1; `amount` is never negative, a `bundle` pack is never free, and the price is not free altogether; volume tiers start at 0 and each starts where the previous one ends; bulk tiers are in increasing `to` order; only the last tier has `to: null`. Otherwise the request fails with reason `invalid_custom_price`."}},"required":["enabled"]},"ResolvedFeature":{"type":"object","properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string","enum":["unlimited"]}],"description":"Feature value."},"source":{"type":"string","enum":["default","product","customer"],"description":"Source that determined the resolved value."}},"required":["value","source"]},"ResolvedCustomerFeatures":{"type":"object","properties":{"features":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ResolvedFeature"},"description":"Resolved features keyed by feature code.","example":{"seats":{"value":10,"source":"product"},"sso":{"value":true,"source":"customer"}}}},"required":["features"]},"CustomerFeatureOverride":{"type":"object","properties":{"feature_code":{"type":"string","description":"Feature code.","example":"sso"},"value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string","enum":["unlimited"]}],"description":"Feature value."},"reason":{"type":["string","null"],"description":"Reason associated with a customer feature override.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date of a customer feature override.","example":null},"created_at":{"type":"string","format":"date-time","description":"Creation date.","example":"2024-12-20T16:04:11Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update date.","example":"2024-12-20T16:04:11Z"}},"required":["feature_code","value","reason","expires_at","created_at","updated_at"]},"PaginatedPaymentMethod":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]}},"required":["id","status","type","last_4_digits","expiration_date","brand"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","type","account_number_ending"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","error_type","type","account_number_ending"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"}},"required":["id","status","type"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"}},"required":["id","status","error_type","type"],"title":"Stripe Link (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"}},"required":["id","status","type"],"title":"PayPal"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"}},"required":["id","status","error_type","type"],"title":"PayPal (errored)"}]}]},"description":"List of PaymentMethod."}},"required":["meta","data"]},"PaymentMethodDetails":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","last_4_digits","expiration_date","brand","integration"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"enum":["amex","bancontact","cartes_bancaires","diners","discover","jcb","link","maestro","mastercard","other","unionpay","unknown","visa"],"description":"Card brand.","examples":["visa","mastercard","amex"]},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand","integration"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","account_number_ending","integration"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","account_number_ending","integration"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","integration"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"stripe_link"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","integration"],"title":"Stripe Link (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","integration"],"title":"PayPal"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","mandate_invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["paypal"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n- `paypal`: PayPal\n  ","example":"paypal"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","integration"],"title":"PayPal (errored)"}]},"CreatePaymentMethod":{"type":"object","properties":{"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_payment_method_id":{"type":"string","description":"ID of the payment method on the provider's side."}},"required":["provider_name","provider_payment_method_id"]},"CustomerAddress":{"type":"object","properties":{"id":{"type":"string","description":"Customer address ID.","example":"cad_abc123"},"type":{"type":"string","enum":["billing","shipping"],"description":"Whether this is a billing or shipping address.","example":"shipping"},"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"tax_id":{"type":["string","null"],"description":"Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.","example":"DE123456789"}},"required":["id","type","tax_id"]},"CreateCustomerAddress":{"type":"object","properties":{"type":{"type":"string","enum":["shipping"],"description":"Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.","example":"shipping"},"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"tax_id":{"type":["string","null"],"description":"Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.","example":"DE123456789"}},"required":["type"]},"UpdateCustomerAddress":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"tax_id":{"type":["string","null"],"description":"Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.","example":"DE123456789"}}},"ShippingDestination":{"type":"object","properties":{"destination":{"type":"string","enum":["billing_address","shipping_address"],"description":"Whether shipping uses the billing address or a saved shipping address.","example":"shipping_address"},"address":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"},{"type":["object","null"],"description":"Resolved billing or shipping address, or null when no address exists for the selected destination."}]}},"required":["destination","address"]},"SetShippingDestination":{"oneOf":[{"type":"object","properties":{"destination":{"type":"string","enum":["billing_address"],"description":"Whether shipping uses the billing address or a saved shipping address."}},"required":["destination"],"additionalProperties":false},{"type":"object","properties":{"destination":{"type":"string","enum":["shipping_address"],"description":"Whether shipping uses the billing address or a saved shipping address."},"address_id":{"type":"string","minLength":1,"description":"Active shipping address ID belonging to this customer. Uses the customer's default shipping address when omitted. A shipping address must exist.","example":"cad_abc123"}},"required":["destination"],"additionalProperties":false}]},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":["string","null"],"enum":["corporate","person","automatically_created"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"status":{"type":"string","enum":["active","archived"],"description":"Customer status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"domain":{"type":["string","null"],"description":"Customer domain. If not defined, it is inferred from the billing email.","example":"acme.com"},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"},"status":{"type":"string","enum":["valid","invalid","mismatch","unverified","unsupported"],"description":"\nVerification status of the customer tax ID.\n\n- `valid`: Tax ID has been verified and is valid.\n- `invalid`: Tax ID has been verified and is invalid.\n- `mismatch`: Tax ID is valid but is for a different country than the customer's country.\n- `unverified`: Tax ID has not been verified yet.\n- `unsupported`: Tax ID verification for this type not supported yet.\n ","example":"valid"}},"required":["value","status"]},"description":"Customer tax IDs."},"local_tax_number":{"type":["string","null"],"description":"Customer local tax number.","example":"12/345/67890"},"tax_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"taxability":{"type":"string","enum":["taxable","exempt"],"description":"Customer taxability.\n\n- `taxable`: Taxes are automatically determined for the customer.\n- `exempt`: The customer is exempt from tax.\n ","example":"taxable"},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"is_government_affiliated":{"type":"boolean","description":"Indicates if the customer is affiliated with a government entity.","example":false},"einvoicing_code":{"type":["string","null"],"description":"Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).","example":"0009:36252187900034"},"language":{"type":["string","null"],"enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":["string","null"],"enum":["Pacific/Midway","Pacific/Pago_Pago","Pacific/Niue","Pacific/Rarotonga","America/Adak","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","America/Anchorage","Pacific/Gambier","America/Los_Angeles","America/Tijuana","Pacific/Pitcairn","America/Hermosillo","America/Ciudad_Juarez","America/Denver","America/Phoenix","America/Vancouver","America/Whitehorse","America/Belize","America/Chicago","America/Guatemala","America/Managua","America/Mexico_City","America/Matamoros","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Galapagos","America/Edmonton","America/Rio_Branco","America/Winnipeg","America/Bogota","America/Havana","Pacific/Easter","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Nassau","America/New_York","America/Panama","America/Port-au-Prince","America/Grand_Turk","America/Toronto","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/Port_of_Spain","America/Martinique","America/St_Lucia","America/St_Barthelemy","America/Halifax","Atlantic/Bermuda","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Thule","America/Curacao","America/La_Paz","America/Guyana","America/Caracas","America/St_Johns","America/Argentina/Buenos_Aires","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","America/Santiago","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Miquelon","America/Paramaribo","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Atlantic/Azores","Atlantic/Cape_Verde","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Europe/Isle_of_Man","Europe/Dublin","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Europe/London","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Europe/Jersey","Europe/Guernsey","Africa/Sao_Tome","Africa/Banjul","Antarctica/Troll","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Algiers","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/Amsterdam","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Africa/Tunis","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kaliningrad","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Africa/Tripoli","Europe/Vilnius","Asia/Jerusalem","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Indian/Kerguelen","Asia/Almaty","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Antarctica/Casey","Australia/Perth","Asia/Brunei","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Dili","Asia/Chita","Australia/Darwin","Australia/Brisbane","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Adelaide","Australia/Sydney","Pacific/Bougainville","Pacific/Kosrae","Australia/Lord_Howe","Pacific/Noumea","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Asia/Kamchatka","Pacific/Majuro","Pacific/Nauru","Pacific/Norfolk","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Auckland","Antarctica/McMurdo","Pacific/Kanton","Pacific/Apia","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Chatham","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object"}]},"shipping_address":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}},"description":"Customer shipping address."},"billing_email":{"type":["string","null"],"format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to.","example":"ive_484dn4U48E"},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"consolidated_invoicing_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if consolidated invoicing is enabled for the customer. When enabled, subscription invoices billed on the same day are grouped into a single invoice. Cannot be disabled while invoices are pending consolidation."},"force_invoice_draft":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if customer invoices should be created as draft invoices.","example":true},"price_book_id":{"type":["string","null"],"description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription ID.","example":"sub_0kIc7jrF7gV00V"},"status":{"type":"string","enum":["draft","pending","trialing","active","paused","errored","cancelled","voided","archived"],"description":"Status of the subscription.","example":"active"},"current_period_started_at":{"type":["string","null"],"format":"date","description":"Start date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"current_period_ends_at":{"type":["string","null"],"format":"date","description":"End date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-11-12T07:00:01.860Z"},"plan_id":{"type":["string","null"],"description":"Plan ID.","example":"plan_34hdd843hReh","deprecated":true},"checkout_session_id":{"type":["string","null"],"description":"Checkout session ID.","example":"che_949djdj39RJj"}},"required":["id","status","current_period_started_at","current_period_ends_at","plan_id","checkout_session_id"]}},"segment_ids":{"type":"array","items":{"type":"string"},"description":"IDs of segments this customer belongs to.","example":["seg_0kIc7jrF7gV00V"]},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"created_at":{"type":"string","format":"date-time","description":"Customer creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Customer last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null},"owner_id":{"type":["string","null"],"description":"ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.","example":"usr_KMcxRWc1ZQwvJG"},"owner":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Hyperline user ID.","example":"usr_KMcxRWc1ZQwvJG"},"email":{"type":"string","format":"email","description":"User email.","example":"owner@acme.com"},"first_name":{"type":["string","null"],"description":"User first name.","example":"Ada"},"last_name":{"type":["string","null"],"description":"User last name.","example":"Lovelace"},"picture_url":{"type":["string","null"],"description":"User picture URL.","example":null}},"required":["id","email","first_name","last_name","picture_url"],"description":"Hyperline user responsible for this customer and targeted by customer agent notifications."},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Hyperline user ID.","example":"usr_KMcxRWc1ZQwvJG"},"email":{"type":"string","format":"email","description":"User email.","example":"owner@acme.com"},"first_name":{"type":["string","null"],"description":"User first name.","example":"Ada"},"last_name":{"type":["string","null"],"description":"User last name.","example":"Lovelace"},"picture_url":{"type":["string","null"],"description":"User picture URL.","example":null}},"required":["id","email","first_name","last_name","picture_url"]},"description":"Hyperline users following this customer and targeted by customer agent notifications."},"payment_terms":{"type":["number","null"],"description":"Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"payment_initiation_delay":{"type":["number","null"],"description":"Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method of the customer. Only applies to card and direct debit.","example":"pm_UTclbc1US8GzCe"}},"required":["id","name","type","status","currency","country","domain","tax_ids","local_tax_number","tax_rate_custom","taxability","registration_number","is_government_affiliated","einvoicing_code","language","timezone","external_id","properties","custom_properties","billing_address","shipping_address","billing_email","invoice_emails","invoicing_entity_id","invoice_reminders_enabled","consolidated_invoicing_enabled","force_invoice_draft","price_book_id","available_payment_methods","subscriptions","segment_ids","integrations","created_at","updated_at","deleted_at","organisation_id","organisation_invoicing","owner_id","owner","followers","payment_terms","payment_initiation_delay","payment_method_type","payment_method_id"]},"CursorPaginatedCustomer":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"},"description":"List of Customer."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"CustomerDetails":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"type":"object","properties":{"payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Default payment method of the customer. Only applies to card and direct debit."}]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."}]}},"required":["payment_method","bank_account"]}]},"CustomerV1":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":["string","null"],"enum":["corporate","person","automatically_created"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"status":{"type":"string","enum":["active","archived"],"description":"Customer status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"domain":{"type":["string","null"],"description":"Customer domain. If not defined, it is inferred from the billing email.","example":"acme.com"},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_number_valid":{"type":"boolean","description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_rate_custom":{"type":["number","null"],"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"},"status":{"type":"string","enum":["valid","invalid","mismatch","unverified","unsupported"],"description":"\nVerification status of the customer tax ID.\n\n- `valid`: Tax ID has been verified and is valid.\n- `invalid`: Tax ID has been verified and is invalid.\n- `mismatch`: Tax ID is valid but is for a different country than the customer's country.\n- `unverified`: Tax ID has not been verified yet.\n- `unsupported`: Tax ID verification for this type not supported yet.\n ","example":"valid"}},"required":["value","status"]},"description":"Customer tax IDs."},"local_tax_number":{"type":["string","null"],"description":"Customer local tax number.","example":"12/345/67890"},"tax_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"taxability":{"type":"string","enum":["taxable","exempt"],"description":"Customer taxability.\n\n- `taxable`: Taxes are automatically determined for the customer.\n- `exempt`: The customer is exempt from tax.\n ","example":"taxable"},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"is_government_affiliated":{"type":"boolean","description":"Indicates if the customer is affiliated with a government entity.","example":false},"einvoicing_code":{"type":["string","null"],"description":"Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).","example":"0009:36252187900034"},"language":{"type":["string","null"],"enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":["string","null"],"enum":["Pacific/Midway","Pacific/Pago_Pago","Pacific/Niue","Pacific/Rarotonga","America/Adak","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","America/Anchorage","Pacific/Gambier","America/Los_Angeles","America/Tijuana","Pacific/Pitcairn","America/Hermosillo","America/Ciudad_Juarez","America/Denver","America/Phoenix","America/Vancouver","America/Whitehorse","America/Belize","America/Chicago","America/Guatemala","America/Managua","America/Mexico_City","America/Matamoros","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Galapagos","America/Edmonton","America/Rio_Branco","America/Winnipeg","America/Bogota","America/Havana","Pacific/Easter","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Nassau","America/New_York","America/Panama","America/Port-au-Prince","America/Grand_Turk","America/Toronto","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/Port_of_Spain","America/Martinique","America/St_Lucia","America/St_Barthelemy","America/Halifax","Atlantic/Bermuda","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Thule","America/Curacao","America/La_Paz","America/Guyana","America/Caracas","America/St_Johns","America/Argentina/Buenos_Aires","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","America/Santiago","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Miquelon","America/Paramaribo","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Atlantic/Azores","Atlantic/Cape_Verde","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Europe/Isle_of_Man","Europe/Dublin","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Europe/London","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Europe/Jersey","Europe/Guernsey","Africa/Sao_Tome","Africa/Banjul","Antarctica/Troll","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Algiers","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/Amsterdam","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Africa/Tunis","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kaliningrad","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Africa/Tripoli","Europe/Vilnius","Asia/Jerusalem","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Indian/Kerguelen","Asia/Almaty","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Antarctica/Casey","Australia/Perth","Asia/Brunei","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Dili","Asia/Chita","Australia/Darwin","Australia/Brisbane","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Adelaide","Australia/Sydney","Pacific/Bougainville","Pacific/Kosrae","Australia/Lord_Howe","Pacific/Noumea","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Asia/Kamchatka","Pacific/Majuro","Pacific/Nauru","Pacific/Norfolk","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Auckland","Antarctica/McMurdo","Pacific/Kanton","Pacific/Apia","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Chatham","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object"}]},"shipping_address":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}},"description":"Customer shipping address."},"billing_email":{"type":["string","null"],"format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to.","example":"ive_484dn4U48E"},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"consolidated_invoicing_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if consolidated invoicing is enabled for the customer. When enabled, subscription invoices billed on the same day are grouped into a single invoice. Cannot be disabled while invoices are pending consolidation."},"force_invoice_draft":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if customer invoices should be created as draft invoices.","example":true},"price_book_id":{"type":["string","null"],"description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"current_payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"current_payment_method_id":{"type":["string","null"],"description":"ID of the default payment method of the customer. Only applies to card and direct debit.","example":"pm_UTclbc1US8GzCe"},"custom_payment_delay":{"type":["number","null"],"description":"Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":["number","null"],"description":"Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription ID.","example":"sub_0kIc7jrF7gV00V"},"status":{"type":"string","enum":["draft","pending","trialing","active","paused","errored","cancelled","voided","archived"],"description":"Status of the subscription.","example":"active"},"current_period_started_at":{"type":["string","null"],"format":"date","description":"Start date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"current_period_ends_at":{"type":["string","null"],"format":"date","description":"End date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-11-12T07:00:01.860Z"},"plan_id":{"type":["string","null"],"description":"Plan ID.","example":"plan_34hdd843hReh","deprecated":true},"checkout_session_id":{"type":["string","null"],"description":"Checkout session ID.","example":"che_949djdj39RJj"}},"required":["id","status","current_period_started_at","current_period_ends_at","plan_id","checkout_session_id"]}},"segment_ids":{"type":"array","items":{"type":"string"},"description":"IDs of segments this customer belongs to.","example":["seg_0kIc7jrF7gV00V"]},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"created_at":{"type":"string","format":"date-time","description":"Customer creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Customer last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","name","type","status","currency","country","domain","vat_number","vat_number_valid","vat_rate_custom","tax_ids","local_tax_number","tax_rate_custom","taxability","registration_number","is_government_affiliated","einvoicing_code","language","timezone","external_id","properties","custom_properties","billing_address","shipping_address","billing_email","invoice_emails","invoicing_entity_id","invoice_reminders_enabled","consolidated_invoicing_enabled","force_invoice_draft","price_book_id","available_payment_methods","current_payment_method_type","current_payment_method_id","custom_payment_delay","custom_payment_initiation_delay","subscriptions","segment_ids","integrations","created_at","updated_at","deleted_at"]},"CustomerDetailsV1":{"allOf":[{"$ref":"#/components/schemas/CustomerV1"},{"type":"object","properties":{"providers":{"type":"object","properties":{"adyen":{"type":"string"},"stripe":{"type":"string"},"mollie":{"type":"string"},"gocardless":{"type":"string"},"airwallex":{"type":"string"},"paypal":{"type":"string"},"salesforce":{"type":"string"},"hubspot":{"type":"string"},"attio":{"type":"string"},"xero":{"type":"string"},"pennylane":{"type":"string"},"zoho-books":{"type":"string"},"exact-online":{"type":"string"},"quickbooks":{"type":"string"},"netsuite":{"type":"string"},"rillet":{"type":"string"},"campfire":{"type":"string"},"dualentry":{"type":"string"},"datev":{"type":"string"},"anrok":{"type":"string"},"sphere":{"type":"string"},"chargebee":{"type":"string"},"slack":{"type":"string"},"plain":{"type":"string"},"zendesk":{"type":"string"},"pylon":{"type":"string"},"intercom":{"type":"string"},"front":{"type":"string"},"helpscout":{"type":"string"},"claap":{"type":"string"},"grain":{"type":"string"},"gong":{"type":"string"},"jiminny":{"type":"string"},"modjo":{"type":"string"},"posthog":{"type":"string"}},"deprecated":true,"description":"Deprecated field, please use `integrations`."},"current_payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Default payment method of the customer. Only applies to card and direct debit."}]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."}]},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null}},"required":["providers","current_payment_method","bank_account","organisation_id","organisation_invoicing"]}]},"UpdateBankAccount":{"allOf":[{"type":"object","properties":{"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}}},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"],"description":"Bank account details format.","example":"iban_bic_swift"},"iban":{"type":"string","description":"IBAN.","example":"FR7630006000011234567890189"},"bic_swift":{"type":["string","null"],"description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"],"description":"Bank account details format.","example":"sort_code_account_number"},"sort_code":{"type":"string","description":"Sort code.","example":"123456"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"],"description":"Bank account details format.","example":"account_number_routing_number"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"routing_number":{"type":"string","description":"Routing number.","example":"021000021"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"],"description":"Bank account details format.","example":"account_number_bic_swift"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"bic_swift":{"type":"string","description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR7630006000011234567890189","bic_swift":"BNPAFRPP"}}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."},"CreateCustomer":{"type":"object","properties":{"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":"string","enum":["corporate","person"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated field, please use `billing_address.country`.","example":"FR","deprecated":true},"is_government_affiliated":{"type":"boolean","description":"Indicates if the customer is affiliated with a government entity.","example":false},"vat_number":{"type":"string","description":"Deprecated field, please use `tax_id`.","deprecated":true},"vat_rate_custom":{"type":"number","minimum":0,"maximum":100,"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"}},"required":["value"]},"maxItems":1,"description":"Customer tax IDs."},"local_tax_number":{"type":"string","description":"Customer local tax number.","example":"12/345/67890"},"tax_rate_custom":{"type":"number","minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"taxability":{"type":"string","enum":["taxable","exempt"],"description":"Customer taxability.\n\n- `taxable`: Taxes are automatically determined for the customer.\n- `exempt`: The customer is exempt from tax.\n ","example":"taxable"},"registration_number":{"type":"string","description":"Customer registration number.","example":"36252187900034"},"einvoicing_code":{"type":"string","description":"Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).","example":"0009:36252187900034"},"external_id":{"type":"string","description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID."},"domain":{"type":"string","pattern":"^(?!:\\/\\/)(?=.{1,253}$)(?!-)([a-z0-9-]{1,63}\\.)+[a-z]{2,63}$","description":"Customer domain. If not defined, it is inferred from the billing email.","example":"acme.com"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to."},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object"}]},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Customer shipping address."}]},"billing_email":{"type":"string","format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":"string","enum":["Pacific/Midway","Pacific/Pago_Pago","Pacific/Niue","Pacific/Rarotonga","America/Adak","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","America/Anchorage","Pacific/Gambier","America/Los_Angeles","America/Tijuana","Pacific/Pitcairn","America/Hermosillo","America/Ciudad_Juarez","America/Denver","America/Phoenix","America/Vancouver","America/Whitehorse","America/Belize","America/Chicago","America/Guatemala","America/Managua","America/Mexico_City","America/Matamoros","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Galapagos","America/Edmonton","America/Rio_Branco","America/Winnipeg","America/Bogota","America/Havana","Pacific/Easter","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Nassau","America/New_York","America/Panama","America/Port-au-Prince","America/Grand_Turk","America/Toronto","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/Port_of_Spain","America/Martinique","America/St_Lucia","America/St_Barthelemy","America/Halifax","Atlantic/Bermuda","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Thule","America/Curacao","America/La_Paz","America/Guyana","America/Caracas","America/St_Johns","America/Argentina/Buenos_Aires","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","America/Santiago","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Miquelon","America/Paramaribo","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Atlantic/Azores","Atlantic/Cape_Verde","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Europe/Isle_of_Man","Europe/Dublin","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Europe/London","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Europe/Jersey","Europe/Guernsey","Africa/Sao_Tome","Africa/Banjul","Antarctica/Troll","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Algiers","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/Amsterdam","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Africa/Tunis","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kaliningrad","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Africa/Tripoli","Europe/Vilnius","Asia/Jerusalem","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Indian/Kerguelen","Asia/Almaty","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Antarctica/Casey","Australia/Perth","Asia/Brunei","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Dili","Asia/Chita","Australia/Darwin","Australia/Brisbane","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Adelaide","Australia/Sydney","Pacific/Bougainville","Pacific/Kosrae","Australia/Lord_Howe","Pacific/Noumea","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Asia/Kamchatka","Pacific/Majuro","Pacific/Nauru","Pacific/Norfolk","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Auckland","Antarctica/McMurdo","Pacific/Kanton","Pacific/Apia","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Chatham","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"payment_method_type":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"bank_account":{"$ref":"#/components/schemas/UpdateBankAccount"},"custom_payment_delay":{"type":"number","description":"Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":"number","description":"Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"organisation_id":{"type":"string","description":"Parent organization ID to which the client is attached."},"organisation_invoicing":{"type":"string","enum":["none","every_invoice","concat"],"default":"none","description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n "},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"consolidated_invoicing_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if consolidated invoicing is enabled for the customer. When enabled, subscription invoices billed on the same day are grouped into a single invoice. Cannot be disabled while invoices are pending consolidation."},"force_invoice_draft":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if customer invoices should be created as draft invoices.","example":true},"price_book_id":{"type":"string","description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"},"owner_id":{"type":"string","description":"ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.","example":"usr_KMcxRWc1ZQwvJG"},"follower_ids":{"type":"array","items":{"type":"string"},"description":"IDs of Hyperline users following this customer.","example":["usr_KMcxRWc1ZQwvJG"]}}},"UpdateCustomer":{"type":"object","properties":{"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":["string","null"],"enum":["corporate","person"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated field, please use `billing_address.country`.","example":"FR","deprecated":true},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"}},"required":["value"]},"maxItems":1,"description":"Customer tax IDs."},"local_tax_number":{"type":["string","null"],"description":"Customer local tax number.","example":"12/345/67890"},"tax_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"taxability":{"type":"string","enum":["taxable","exempt"],"description":"Customer taxability.\n\n- `taxable`: Taxes are automatically determined for the customer.\n- `exempt`: The customer is exempt from tax.\n ","example":"taxable"},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"is_government_affiliated":{"type":["boolean","null"],"description":"Indicates if the customer is affiliated with a government entity.","example":false},"einvoicing_code":{"type":["string","null"],"description":"Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).","example":"0009:36252187900034"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline. When external ID uniqueness is enforced for your account, two active customers cannot share the same external ID."},"domain":{"type":"string","pattern":"^(?!:\\/\\/)(?=.{1,253}$)(?!-)([a-z0-9-]{1,63}\\.)+[a-z]{2,63}$","description":"Customer domain. If not defined, it is inferred from the billing email.","example":"acme.com"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to."},"billing_address":{"$ref":"#/components/schemas/Address"},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"description":"Customer shipping address."}]},"billing_email":{"type":["string","null"],"format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":"string","enum":["Pacific/Midway","Pacific/Pago_Pago","Pacific/Niue","Pacific/Rarotonga","America/Adak","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","America/Anchorage","Pacific/Gambier","America/Los_Angeles","America/Tijuana","Pacific/Pitcairn","America/Hermosillo","America/Ciudad_Juarez","America/Denver","America/Phoenix","America/Vancouver","America/Whitehorse","America/Belize","America/Chicago","America/Guatemala","America/Managua","America/Mexico_City","America/Matamoros","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Galapagos","America/Edmonton","America/Rio_Branco","America/Winnipeg","America/Bogota","America/Havana","Pacific/Easter","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Nassau","America/New_York","America/Panama","America/Port-au-Prince","America/Grand_Turk","America/Toronto","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/Port_of_Spain","America/Martinique","America/St_Lucia","America/St_Barthelemy","America/Halifax","Atlantic/Bermuda","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Thule","America/Curacao","America/La_Paz","America/Guyana","America/Caracas","America/St_Johns","America/Argentina/Buenos_Aires","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","America/Santiago","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Miquelon","America/Paramaribo","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Atlantic/Azores","Atlantic/Cape_Verde","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Europe/Isle_of_Man","Europe/Dublin","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Europe/London","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Europe/Jersey","Europe/Guernsey","Africa/Sao_Tome","Africa/Banjul","Antarctica/Troll","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Algiers","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/Amsterdam","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Africa/Tunis","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kaliningrad","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Africa/Tripoli","Europe/Vilnius","Asia/Jerusalem","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Indian/Kerguelen","Asia/Almaty","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Antarctica/Casey","Australia/Perth","Asia/Brunei","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Dili","Asia/Chita","Australia/Darwin","Australia/Brisbane","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Adelaide","Australia/Sydney","Pacific/Bougainville","Pacific/Kosrae","Australia/Lord_Howe","Pacific/Noumea","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Asia/Kamchatka","Pacific/Majuro","Pacific/Nauru","Pacific/Norfolk","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Auckland","Antarctica/McMurdo","Pacific/Kanton","Pacific/Apia","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Chatham","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method of the customer. Only applies to card and direct debit.","example":"pm_UTclbc1US8GzCe"},"bank_account":{"anyOf":[{"allOf":[{"type":"object","properties":{"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}}},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"],"description":"Bank account details format.","example":"iban_bic_swift"},"iban":{"type":"string","description":"IBAN.","example":"FR7630006000011234567890189"},"bic_swift":{"type":["string","null"],"description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"],"description":"Bank account details format.","example":"sort_code_account_number"},"sort_code":{"type":"string","description":"Sort code.","example":"123456"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"],"description":"Bank account details format.","example":"account_number_routing_number"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"routing_number":{"type":"string","description":"Routing number.","example":"021000021"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"],"description":"Bank account details format.","example":"account_number_bic_swift"},"account_number":{"type":"string","description":"Account number.","example":"000123456789"},"bic_swift":{"type":"string","description":"BIC or SWIFT code.","example":"BNPAFRPP"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR7630006000011234567890189","bic_swift":"BNPAFRPP"}}]},{"type":"null"}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."},"custom_payment_delay":{"type":["number","null"],"description":"Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":["number","null"],"description":"Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"consolidated_invoicing_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if consolidated invoicing is enabled for the customer. When enabled, subscription invoices billed on the same day are grouped into a single invoice. Cannot be disabled while invoices are pending consolidation."},"force_invoice_draft":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if customer invoices should be created as draft invoices.","example":true},"price_book_id":{"type":["string","null"],"description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"},"owner_id":{"type":["string","null"],"description":"ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.","example":"usr_KMcxRWc1ZQwvJG"},"follower_ids":{"type":"array","items":{"type":"string"},"description":"IDs of Hyperline users following this customer.","example":["usr_KMcxRWc1ZQwvJG"]}}},"CustomerUsageItem":{"type":"object","properties":{"aggregator_id":{"type":"string","description":"Aggregator ID."},"name":{"type":"string","description":"Display name."},"unit_name":{"type":["string","null"],"description":"Unit name."},"total":{"type":"number","description":"Total usage over the period."},"count":{"type":"number","description":"Number of events behind the total."}},"required":["aggregator_id","name","unit_name","total","count"]},"CustomerUsage":{"type":"object","properties":{"aggregator_id":{"type":"string","description":"Aggregator ID."},"total":{"type":"number","description":"Total usage over the period."},"count":{"type":"number","description":"Number of events behind the total."},"period_start":{"type":"string","description":"Period start (ISO-8601)."},"period_end":{"type":"string","description":"Period end (ISO-8601)."}},"required":["aggregator_id","total","count","period_start","period_end"]},"CustomerUsageTimeseries":{"type":"object","properties":{"timeseries":{"type":"array","items":{"type":"object","properties":{"tick":{"type":"string"},"count":{"type":"number"}},"required":["tick","count"]}},"total":{"type":"number"}},"required":["timeseries","total"]},"CustomerUsageEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event ID."},"name":{"type":"string","description":"Display name derived from the event record."},"timestamp":{"type":"string","description":"Event timestamp (ISO-8601)."},"payload":{"type":"object","additionalProperties":{},"description":"Raw event payload as ingested."}},"required":["id","name","timestamp","payload"]},"PaginatedCustomerUsageEvent":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUsageEvent"},"description":"List of CustomerUsageEvent."}},"required":["meta","data"]},"Organisation":{"type":"object","properties":{"id":{"type":"string","description":"Organisation ID.","example":"cus_0noDeAEU22FgA4"},"name":{"type":"string","description":"Organisation legal name.","example":"Acme Group"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"invoice_schedule":{"type":["string","null"],"enum":["month","quarter","year"],"description":"Frequency on which the invoices are grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"month"},"next_invoice_at":{"type":["string","null"],"format":"date-time","description":"Next invoice date where the invoices will be grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"2024-04-01T00:00:00Z"},"child_customer_ids":{"type":"array","items":{"type":"string"},"description":"List of the organization's child customer IDs.","example":["cus_Typ0px2W0aiEtl"]},"updated_at":{"type":"string","format":"date-time","description":"Last update to the organisation, including changes to its child customer relationships.","example":"2026-09-15T00:00:00Z"}},"required":["id","name","currency","country","invoice_schedule","next_invoice_at","child_customer_ids","updated_at"]},"CursorPaginatedOrganisation":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organisation"},"description":"List of Organisation."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"PatchOrganisation":{"type":"object","properties":{"name":{"type":"string","description":"Organisation legal name.","example":"Acme Group"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"invoice_schedule":{"type":"string","enum":["month","quarter","year"],"description":"Frequency on which the invoices are grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"month"},"next_invoice_at":{"type":"string","format":"date-time","description":"Next invoice date where the invoices will be grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"2024-04-01T00:00:00Z"}}},"PaginatedSegment":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]},"description":"List of Segment."}},"required":["meta","data"]},"CreateExport":{"type":"object","properties":{"name":{"type":"string","enum":["aged_balances","outstanding_invoices","all_subscriptions","revenue_per_product","revenue_per_line_item_name","revenue_per_country","revenue_per_plan","all_customers","detailed_revenue","line_by_line_revenue","draft_invoices","open_invoices","live_subscriptions","renewals","credit_balances"],"description":"\nExport name.\n\n- `aged_balances`: List of balances at 30, 60, and 90+ days for all customers.\n- `all_customers`: List of all customers.\n- `outstanding_invoices`: List of all outstanding invoices.\n- `all_subscriptions`: List of all active, pending or cancelled subscriptions.\n- `revenue_per_product`: Revenue per product month over month.\n- `detailed_revenue`: Booked revenue (outstanding and paid) split per customer and product, month over month.\n- `revenue_per_line_item_name`: Revenue per invoice line item month over month, grouped by name given on invoice or subscription.\n- `revenue_per_country`: Revenue, tax and invoice number per country.\n- `revenue_per_plan`: Revenue per plan month over month.\n- `line_by_line_revenue`: All invoice line items in chronological order, with product and customer information.\n- `draft_invoices`: Export all draft invoices, with customer and product information.\n- `open_invoices`: Export all open invoices, with customer and product information.\n- `live_subscriptions`: List of all active subscriptions line by line.\n- `credit_balances`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).\n","example":"line_by_line_revenue"},"file_type":{"type":"string","enum":["csv","xlsx","json"],"description":"\nExport file type.\n\n- `csv`: The export will be generated in CSV format.\n- `xlsx`: The export will be generated in XLSX format.\n- `json`: The export will be generated in JSON format.","example":"csv"}},"required":["name","file_type"]},"Export":{"allOf":[{"$ref":"#/components/schemas/CreateExport"},{"type":"object","properties":{"id":{"type":"string","description":"Export ID.","example":"exp_YfiSnLIYORD9VN"},"status":{"type":"string","enum":["pending","processing","done","error"],"description":"\nExport status.\n\n- `pending`: The export is pending and has not started processing yet.\n- `processing`: The export is currently being generated.\n- `done`: The export has been successfully generated.\n- `errored`: An error occurred during the export generation.\n","example":"processing"},"created_at":{"type":["string","null"],"format":"date","description":"Export creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-03T11:32:00Z"},"updated_at":{"type":["string","null"],"format":"date","description":"Export last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-07T19:13:00Z"}},"required":["id","status","created_at","updated_at"]}]},"PaginatedExport":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Export"},"description":"List of Export."}},"required":["meta","data"]},"Feature":{"type":"object","properties":{"code":{"type":"string","description":"Feature code.","example":"sso"},"name":{"type":"string","description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"value_type":{"type":"string","enum":["boolean","number"],"description":"Type of feature value."},"resolution_strategy":{"type":["string","null"],"enum":["max","sum","replace"],"description":"Strategy used to combine multiple product feature values for number features.","example":null},"default_value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"null"}],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":false},"status":{"type":"string","enum":["active","archived"],"description":"Feature status.","example":"active"},"created_at":{"type":"string","format":"date-time","description":"Creation date.","example":"2024-12-20T16:04:11Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update date.","example":"2024-12-20T16:04:11Z"},"archived_at":{"type":["string","null"],"format":"date-time","description":"Archival date.","example":null}},"required":["code","name","description","value_type","resolution_strategy","default_value","status","created_at","updated_at","archived_at"]},"PaginatedFeature":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Feature"},"description":"List of Feature."}},"required":["meta","data"]},"PaginatedFile":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"File ID.","example":"fil_2QdJDDUej969ev"},"name":{"type":"string","description":"File name.","example":"invoice_2024.pdf"},"type":{"type":"string","enum":["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","csv","jpeg","png","gif","svg","json","xml"],"description":"\nFile type based on the MIME type.\n\nSupported file types:\n- `pdf`: PDF documents\n- `doc`: Microsoft Word documents (legacy)\n- `docx`: Microsoft Word documents\n- `xls`: Microsoft Excel spreadsheets (legacy)\n- `xlsx`: Microsoft Excel spreadsheets\n- `ppt`: Microsoft PowerPoint presentations (legacy)\n- `pptx`: Microsoft PowerPoint presentations\n- `txt`: Plain text files\n- `csv`: Comma-separated values files\n- `jpeg`: JPEG images\n- `png`: PNG images\n- `gif`: GIF images\n- `svg`: SVG vector images\n- `json`: JSON data files\n- `xml`: XML data files\n  ","example":"pdf"},"mimetype":{"type":"string","description":"MIME type of the file.","example":"application/pdf"},"customer_id":{"type":["string","null"],"description":"ID of the customer linked to the file.","example":"cus_QalW2vTAdkR6IY"},"summary":{"type":["string","null"],"description":"AI-generated summary of the file content"},"created_at":{"type":"string","format":"date-time","description":"Date when the file was created.","example":"2024-11-12T07:38:39.222Z"}},"required":["id","name","type","mimetype","customer_id","summary","created_at"]},"description":"List of File."}},"required":["meta","data"]},"CreateComponentToken":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID"}},"required":["customer_id"]},"PaginatedInvoicingEntity":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","credit_note_wallet_refund_enabled","standalone_credit_note_creation_enabled","fx_conversion_display_enabled","created_at","updated_at","deleted_at"]},"description":"List of InvoicingEntity."}},"required":["meta","data"]},"MonitoringAnalysisDimensions":{"type":["object","null"],"properties":{"payment_health":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."},"usage_engagement":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."},"support_signals":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."},"contract_valuation":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."},"communication":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."},"custom":{"type":["object","null"],"properties":{"score":{"type":["number","null"],"description":"Dimension score between 0 and 100. `null` when not enough data was available.","example":40}},"required":["score"],"description":"Dimension score. `null` when the dimension was not scored in this analysis."}},"required":["payment_health","usage_engagement","support_signals","contract_valuation","communication","custom"],"description":"Per-dimension scores the health score is computed from. `null` when the analysis has no breakdown."},"MonitoringAnalysis":{"type":"object","properties":{"id":{"type":"string","description":"Analysis ID.","example":"moa_7Hn2kQp9XcLwRt"},"run_id":{"type":"string","description":"ID of the monitoring run that produced the analysis.","example":"agr_3Fm8vNq1ZsKdYb"},"agent_id":{"type":"string","description":"ID of the monitoring agent that produced the analysis.","example":"agt_9Lp4wEr6TyUiOa"},"customer_id":{"type":"string","description":"ID of the analysed customer.","example":"cus_Typ0px2W0aiEtl"},"status":{"type":"string","enum":["in_progress","completed","skipped","failed"],"description":"Analysis status.\n\n- in_progress: The agent is analysing the customer.\n- completed: The customer was scored.\n- skipped: The agent skipped the customer in this run.\n- failed: The analysis failed.","example":"completed"},"score":{"type":["number","null"],"description":"Health score between 0 (critical) and 100 (healthy). `null` when the analysis did not produce a score.","example":42},"previous_score":{"type":["number","null"],"description":"Score of the previous analysis of the customer. `null` for the first analysis.","example":58},"tier":{"type":["string","null"],"enum":["critical","at_risk","needs_attention","healthy"],"description":"Health tier derived from the score and the client's current health score thresholds, so a past analysis follows threshold changes. `critical` is deprecated and no longer returned: it was merged into `at_risk`. `null` when there is no score.","example":"at_risk"},"summary":{"type":["string","null"],"description":"Short explanation of the score written by the agent. `null` when not available.","example":"Two invoices overdue for 30+ days and active usage down 40% over the last month."},"dimensions":{"$ref":"#/components/schemas/MonitoringAnalysisDimensions"},"risk_factors":{"type":["array","null"],"items":{"type":"string"},"description":"Risks identified by the agent. `null` when none.","example":["Two invoices overdue for more than 30 days"]},"positive_signals":{"type":["array","null"],"items":{"type":"string"},"description":"Positive signals identified by the agent. `null` when none.","example":["Renewed annual contract in January"]},"hard_rules_triggered":{"type":["array","null"],"items":{"type":"string"},"description":"Scoring rules that capped the score. `null` when none were triggered.","example":null},"created_at":{"type":"string","format":"date-time","description":"Date the analysis was created.","example":"2026-09-28T06:12:44.000Z"}},"required":["id","run_id","agent_id","customer_id","status","score","previous_score","tier","summary","dimensions","risk_factors","positive_signals","hard_rules_triggered","created_at"]},"CursorPaginatedMonitoringAnalysis":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MonitoringAnalysis"},"description":"List of MonitoringAnalysis."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"PriceBook":{"type":"object","properties":{"id":{"type":"string","description":"Price book ID.","example":"prib_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":["string","null"],"description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"description":"List of user role IDs that have access to this price book."},"created_at":{"type":"string","format":"date-time","description":"Price book creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"updated_at":{"type":"string","format":"date-time","description":"Price book last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["id","name","description","user_role_ids","created_at","updated_at"]},"PaginatedPriceBook":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceBook"},"description":"List of PriceBook."}},"required":["meta","data"]},"CreatePriceBook":{"type":"object","properties":{"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":"string","description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"List of user role IDs that have access to this price book."}},"required":["name"]},"UpdatePriceBook":{"type":"object","properties":{"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":["string","null"],"description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"description":"List of user role IDs that have access to this price book."}}},"AddProductsToPriceBook":{"type":"object","properties":{"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs to add to the price book."}},"required":["product_ids"]},"ProductFeature":{"type":"object","properties":{"feature_code":{"type":"string","description":"Feature code.","example":"sso"},"value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string","enum":["unlimited"]}],"description":"Feature value."},"created_at":{"type":"string","format":"date-time","description":"Creation date.","example":"2024-12-20T16:04:11Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update date.","example":"2024-12-20T16:04:11Z"}},"required":["feature_code","value","created_at","updated_at"]},"ProductAccounting":{"type":"object","additionalProperties":{"type":"object","properties":{"tax_rate_id":{"type":["string","null"],"description":"Custom tax rate ID. Hyperline applies it when it calculates taxes; it is not synced with a billing provider such as Stripe.","example":"taxr_YfiSnLIYORD9VN"},"product_code":{"type":["string","null"],"description":"Code used to reconcile the product with the external accounting tool. Usually, it corresponds to the product ID in the accounting software.","example":"PROD-23"},"account_code":{"type":["string","null"],"description":"Code used to assign related invoices line items to a General Ledger account in your external accounting tool.","example":"GL-001"},"integrations":{"type":"object","properties":{"xero":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"pennylane":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"zoho-books":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"exact-online":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"quickbooks":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"netsuite":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"rillet":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"campfire":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"dualentry":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"datev":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"anrok":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}},"sphere":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"ID of the product in the accounting provider.","example":"123"},"revrec_rule_id":{"type":["string","null"],"description":"ID of the revenue recognition rule in the accounting provider.","example":"456"}}}},"default":{},"description":"Provider-specific accounting settings keyed by integration slug."}}},"description":"Mapping invoicing entity ID/accounting settings."},"ProductFee":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this product in external providers (billing, accounting, etc)."},"type":{"type":"string","enum":["flat_fee"],"description":"Product type."},"is_available_on_demand":{"type":"boolean","description":"Enable the product to be billed at any time as a one-time payment.","example":true,"deprecated":true},"is_available_on_subscription":{"type":"boolean","description":"Enable the product to be added as part of a subscription.","example":true,"deprecated":true},"price_configurations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"]},"description":"Only the first 50 price configurations are returned. To retrieve all configurations, paginate through `GET /v1/price-configurations` filtered by `product_id`."}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","integrations","type","is_available_on_demand","is_available_on_subscription","price_configurations"],"title":"Fee product"},"ProductSeat":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this product in external providers (billing, accounting, etc)."},"type":{"type":"string","enum":["seat"],"description":"Product type."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":["object","null"]}]},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]},"description":"Only the first 50 price configurations are returned. To retrieve all configurations, paginate through `GET /v1/price-configurations` filtered by `product_id`."}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","integrations","type","aggregator","price_configurations"],"title":"Seat product"},"ProductDynamic":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this product in external providers (billing, accounting, etc)."},"type":{"type":"string","enum":["dynamic"],"description":"Product type."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":["object","null"]}]},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"}]},"description":"Only the first 50 price configurations are returned. To retrieve all configurations, paginate through `GET /v1/price-configurations` filtered by `product_id`."}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","integrations","type","aggregator","price_configurations"],"title":"Dynamic product"},"CreditAggregatorResponse":{"type":"object","properties":{"aggregator_id":{"type":"string"},"aggregator":{"$ref":"#/components/schemas/Aggregator"},"weight":{"type":"number"}},"required":["aggregator_id","aggregator","weight"]},"ProductCredit":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this product in external providers (billing, accounting, etc)."},"type":{"type":"string","enum":["credit"],"description":"Product type."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":["object","null"]}]},"credit_aggregators":{"type":"array","items":{"$ref":"#/components/schemas/CreditAggregatorResponse"},"description":"Multiple aggregators with weights for multi-aggregator credit consumption."},"low_credits_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of credits.","example":null},"credits_grant_mode":{"type":"string","enum":["prorated","full_allowance"],"description":"\nHow the periodic credit allowance is granted for partial billing periods.\n\n- `prorated` (default): the granted credits are prorated to the elapsed period.\n- `full_allowance`: the full allowance is always granted (the invoice remains prorated).\n","example":"prorated"},"credits_balance_auto_creation_enabled":{"type":"boolean","description":"Default for the `credits_balance_auto_creation_enabled` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. `true` when unset. A subscription product can override it.","example":true},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]},"description":"Only the first 50 price configurations are returned. To retrieve all configurations, paginate through `GET /v1/price-configurations` filtered by `product_id`."}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","integrations","type","aggregator","low_credits_threshold","credits_grant_mode","credits_balance_auto_creation_enabled","price_configurations"],"title":"Credit product"},"BundleProductItem":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"percentage":{"type":"number"},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"]}},"required":["id","product_id","percentage"]},"ProductBundle":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this product in external providers (billing, accounting, etc)."},"type":{"type":"string","enum":["bundle"],"description":"Product type."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"exclusive_items_enabled":{"type":["boolean","null"],"description":"When true, only one item in the bundle can be active at a time"},"bundle_items":{"type":"array","items":{"$ref":"#/components/schemas/BundleProductItem"},"description":"Products included in this bundle with their percentages"},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]},"description":"Only the first 50 price configurations are returned. To retrieve all configurations, paginate through `GET /v1/price-configurations` filtered by `product_id`."}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","integrations","type","display_mode","exclusive_items_enabled","bundle_items","price_configurations"],"title":"Bundle product"},"Product":{"oneOf":[{"$ref":"#/components/schemas/ProductFee"},{"$ref":"#/components/schemas/ProductSeat"},{"$ref":"#/components/schemas/ProductDynamic"},{"$ref":"#/components/schemas/ProductCredit"},{"$ref":"#/components/schemas/ProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/ProductFee","seat":"#/components/schemas/ProductSeat","dynamic":"#/components/schemas/ProductDynamic","credit":"#/components/schemas/ProductCredit","bundle":"#/components/schemas/ProductBundle"}}},"PaginatedProduct":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"},"description":"List of Product."}},"required":["meta","data"]},"CreateProductFlatFee":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["flat_fee"],"description":"Product type for fixed fee products."},"price_configurations":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreateProductSeat":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["seat"],"description":"Product type for seat-based products."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true}},"description":"Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products."}]},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product."},"unit_name":{"type":"string","description":"Name of the unit (e.g., 'user', 'seat').","example":"user"},"is_connected_seat_item":{"type":"boolean","default":false,"description":"When true, the seat count is automatically synced from an external source (e.g., CRM users)."},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Volume"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bulk"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Packaged"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bundle"}]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreateProductDynamic":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["dynamic"],"description":"Product type for usage-based dynamic products."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/CreateAggregator"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true}}}]},{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum.","example":"amount"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true}},"required":["entity","operation","property"]}],"description":"Aggregator configuration to compute usage from billable events. Either aggregator or aggregator_id is required."}]},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product. Either aggregator or aggregator_id is required."},"unit_name":{"type":"string","description":"Name of the unit (e.g., 'API call', 'GB').","example":"API call"},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."}},"required":["currency","billing_interval","type","prices"],"title":"Volume"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."}},"required":["currency","billing_interval","type","prices"],"title":"Bulk"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."}},"required":["currency","billing_interval","type","prices"],"title":"Packaged"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bps"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."}},"required":["currency","billing_interval","type","prices"],"title":"BPS"}]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreditAggregatorEntry":{"type":"object","properties":{"aggregator_id":{"type":"string","description":"ID of an existing aggregator."},"weight":{"type":"number","default":1,"description":"Weight (credits consumed per 1 unit of usage from this aggregator).","example":1}},"required":["aggregator_id"]},"CreateProductCredit":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["credit"],"description":"Product type for credit-based products."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/CreateAggregator"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true}}}]},{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum.","example":"amount"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"formula_sql":{"type":"string","description":"Read-only formula expression; not accepted on public writes.","deprecated":true}},"required":["entity","operation","property"]}],"description":"Aggregator configuration to compute credit consumption from billable events. Omit aggregator, aggregator_id and credit_aggregators for credits drawn down only manually or by an AI billing policy."}]},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product. Omit aggregator, aggregator_id and credit_aggregators for credits drawn down only manually or by an AI billing policy."},"credit_aggregators":{"type":"array","items":{"$ref":"#/components/schemas/CreditAggregatorEntry"},"description":"Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id."},"unit_name":{"type":"string","description":"Name of the credit unit.","example":"credit"},"low_credits_threshold":{"type":"number","description":"Threshold indicating a low level of credits.","example":10},"credits_grant_mode":{"type":"string","enum":["prorated","full_allowance"],"description":"\nHow the periodic credit allowance is granted for partial billing periods.\n\n- `prorated` (default): the granted credits are prorated to the elapsed period.\n- `full_allowance`: the full allowance is always granted (the invoice remains prorated).\n","example":"full_allowance"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Default for the `credits_balance_auto_creation_enabled` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. `true` when unset. A subscription product can override it.","example":false},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Volume"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bulk"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bundle"}]},"description":"Bundle, volume, or bulk price configurations for credit packages."}},"required":["name","type","price_configurations"]},"CreateBundleProductItem":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product to include in the bundle."},"percentage":{"type":"number","exclusiveMinimum":0,"description":"Revenue share percentage for this item. All percentages must sum to 100.","example":50}},"required":["product_id","percentage"]},"CreateProductBundle":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["bundle"],"description":"Product type for bundle products."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices."},"exclusive_items_enabled":{"type":"boolean","default":false,"description":"When true, only one item in the bundle can be active at a time."},"bundle_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateBundleProductItem"},"minItems":1,"description":"Products included in this bundle. Percentages must sum to 100."},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Volume"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bulk"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Packaged"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"],"title":"Bundle"}]},"default":[],"description":"Price configurations for the product."}},"required":["name","type","display_mode","bundle_items"]},"CreateProduct":{"oneOf":[{"$ref":"#/components/schemas/CreateProductFlatFee"},{"$ref":"#/components/schemas/CreateProductSeat"},{"$ref":"#/components/schemas/CreateProductDynamic"},{"$ref":"#/components/schemas/CreateProductCredit"},{"$ref":"#/components/schemas/CreateProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/CreateProductFlatFee","seat":"#/components/schemas/CreateProductSeat","dynamic":"#/components/schemas/CreateProductDynamic","credit":"#/components/schemas/CreateProductCredit","bundle":"#/components/schemas/CreateProductBundle"}}},"PaginatedPriceConfiguration":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PriceConfiguration"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]}]},"description":"List of PriceConfiguration."}},"required":["meta","data"]},"CreatePriceConfiguration":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"Fee"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"Volume"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"Bulk"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"Packaged"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bps"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"aggregator_filter_id":{"type":["string","null"],"description":"ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with `metering_filter`."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"BPS"},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. Omit or send `null` to make it eligible in every country. An empty array restricts it to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"],"title":"Bundle"}]},"CreatePriceFee":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee"},"CreatePriceVolume":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Volume"},"CreatePricePackaged":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Packaged"},"CreatePriceBulk":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"],"title":"Bulk"},"CreatePriceBps":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS"},"CreatePriceBundle":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"],"title":"Bundle"},"CreatePrice":{"oneOf":[{"$ref":"#/components/schemas/CreatePriceFee"},{"$ref":"#/components/schemas/CreatePriceVolume"},{"$ref":"#/components/schemas/CreatePricePackaged"},{"$ref":"#/components/schemas/CreatePriceBulk"},{"$ref":"#/components/schemas/CreatePriceBps"},{"$ref":"#/components/schemas/CreatePriceBundle"}],"discriminator":{"propertyName":"type","mapping":{"fee":"#/components/schemas/CreatePriceFee","volume":"#/components/schemas/CreatePriceVolume","packaged":"#/components/schemas/CreatePricePackaged","bulk":"#/components/schemas/CreatePriceBulk","bps":"#/components/schemas/CreatePriceBps","bundle":"#/components/schemas/CreatePriceBundle"}}},"QuoteProductEstimate":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the estimated product in the catalog.","example":"itm_3kXODIM1sBwBbJ"},"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration the line was priced from, if any.","example":"prc_8f3kXODIM1sBwB"},"phase_order":{"type":"integer","description":"Order of the quote phase holding the estimated line.","example":0},"period_start":{"type":["string","null"],"format":"date-time","description":"Start of the period the estimate was sold for: its phase's start, or for a first phase starting only once the subscription does (signature, checkout, payment, a manual start) the contract's start, else the subscription's, else the signature date. For a subscription update quote, its first updated phase starts at the update's effective date. Null until the quote is signed, and for a phase starting after one that ends manually.","example":"2026-01-01T00:00:00.000Z"},"period_end":{"type":["string","null"],"format":"date-time","description":"End of the period the estimate was sold for: its phase's end (the contract's end for a phase ending with it), else, for an open-ended phase, the horizon the quote value counts: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is a convention, not an end date: an open-ended subscription can run past it. Null when `period_start` is.","example":"2026-12-31T23:59:59.999Z"},"estimated_count":{"type":"number","description":"Estimated number of units per billing period.","example":200},"estimated_amount":{"type":["number","null"],"description":"Amount of one billing period of the line (its billing interval) priced at the estimate: the first one, excluding taxes, with its discounts applied. Null when the estimate doesn't raise the price, and until the quote is signed.","example":2000},"estimated_total_amount":{"type":["number","null"],"description":"What the line bills at the estimate over every billing period between `period_start` and `period_end`, excluding taxes, each period with the discounts applying to it. It can differ from the quote value, which counts a phase without dates over its own horizon. Null when `estimated_amount` or `period_start` is. The frozen record never follows later changes to the subscription: when several update quotes cover the same line and period, the latest signed one is the current estimate, which `GET /v1/subscriptions/{id}/estimates` resolves.","example":24000}},"required":["product_id","price_configuration_id","phase_order","period_start","period_end","estimated_count","estimated_amount","estimated_total_amount"]},"QuoteSubscriptionConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Quote configuration ID."},"customer_id":{"type":["string","null"],"description":"Child customer ID, or null to use the quote customer."},"position":{"type":"integer","description":"Configuration order within the quote, starting at zero."},"amount":{"type":["number","null"],"description":"Configuration amount excluding tax, in minor currency units."},"applied_at":{"type":["string","null"],"format":"date-time","description":"When the post-signature action completed, or null if not applied.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"Configuration type."},"subscription_id":{"type":["string","null"],"description":"Subscription configuration ID, or null if not configured."},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T22:00:00.000Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-30T21:59:59.999Z"}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration","current_period_started_at","current_period_ends_at"],"description":"Contract terms (start, duration, renewal) of the configuration's subscription, or null when it has no custom contract. On a `subscription_update` configuration, these are the terms the quote proposes, read from its draft copy of the subscription: `status` is the amended contract's status when the quote was created, and `current_period_started_at` and `current_period_ends_at` are null (read them on the subscription)."},"estimates":{"type":"array","items":{"$ref":"#/components/schemas/QuoteProductEstimate"},"description":"Estimated quantities declared on the quote for its usage-based and connected seat lines of the configuration. They price the quote value and are never billed. Once the quote is signed (a subscription update quote: once applied) they are frozen with their periods and amounts, as the record of what the quote sold."}},"required":["id","customer_id","position","amount","applied_at","type","subscription_id","contract_terms","estimates"],"title":"Subscription or update"},"QuoteInvoiceConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Quote configuration ID."},"customer_id":{"type":["string","null"],"description":"Child customer ID, or null to use the quote customer."},"position":{"type":"integer","description":"Configuration order within the quote, starting at zero."},"amount":{"type":["number","null"],"description":"Configuration amount excluding tax, in minor currency units."},"applied_at":{"type":["string","null"],"format":"date-time","description":"When the post-signature action completed, or null if not applied.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["one_off"],"description":"Configuration type."},"invoice_id":{"type":["string","null"],"description":"Draft invoice configuration ID, or null if not configured."}},"required":["id","customer_id","position","amount","applied_at","type","invoice_id"],"title":"One-off invoice"},"QuoteConfiguration":{"oneOf":[{"$ref":"#/components/schemas/QuoteSubscriptionConfiguration"},{"$ref":"#/components/schemas/QuoteInvoiceConfiguration"}],"discriminator":{"propertyName":"type","mapping":{"subscription":"#/components/schemas/QuoteSubscriptionConfiguration","subscription_update":"#/components/schemas/QuoteSubscriptionConfiguration","one_off":"#/components/schemas/QuoteInvoiceConfiguration"}}},"QuoteFile":{"type":"object","properties":{"id":{"type":"string","description":"Quote file ID."},"name":{"type":"string","description":"Quote file name."},"mimetype":{"type":"string","description":"Quote file MIME type."}},"required":["id","name","mimetype"]},"QuoteDraft":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"type":{"type":["string","null"],"enum":["subscription","subscription_update","one_off","mixed"],"description":"\nQuote type.\n\n- `subscription`: The quote will create one or more subscriptions.\n- `subscription_update`: The quote will update one or more existing subscriptions.\n- `one_off`: The quote will issue one or more one-off invoices.\n- `mixed`: Mixed configuration types.\n- `null`: Empty quote.\n"},"status":{"type":"string","enum":["draft"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"draft"},"amount":{"type":["number","null"],"description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.","example":200000},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/QuoteConfiguration"},"description":"Ordered configurations included in the quote."},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes.","example":18000},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"generate_draft_invoices":{"type":"boolean","description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"subscription_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].subscription_id`."},"invoice_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].invoice_id`."},"child_subscription_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `GET /v2/subscriptions` with the `original_quote_id` filter."},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false}},"required":["id","type","status","amount","customer_id","invoicing_entity_id","configurations","template_id","crm_opportunity_id","custom_properties","contract_value","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","post_signature_activation_enabled","generate_draft_invoices","attachments","signed_file","url","created_at","updated_at","expires_at","subscription_id","display_subscription_on_update"],"title":"Draft"},"QuoteAwaitingApproval":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"type":{"type":["string","null"],"enum":["subscription","subscription_update","one_off","mixed"],"description":"\nQuote type.\n\n- `subscription`: The quote will create one or more subscriptions.\n- `subscription_update`: The quote will update one or more existing subscriptions.\n- `one_off`: The quote will issue one or more one-off invoices.\n- `mixed`: Mixed configuration types.\n- `null`: Empty quote.\n"},"status":{"type":"string","enum":["pending_approval","changes_requested"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_approval"},"amount":{"type":"number","description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.","example":20000},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/QuoteConfiguration"},"description":"Ordered configurations included in the quote."},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes.","example":18000},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"generate_draft_invoices":{"type":"boolean","description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].subscription_id`."},"invoice_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].invoice_id`."},"child_subscription_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `GET /v2/subscriptions` with the `original_quote_id` filter."},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false}},"required":["id","type","status","amount","customer_id","invoicing_entity_id","configurations","template_id","crm_opportunity_id","custom_properties","contract_value","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","post_signature_activation_enabled","generate_draft_invoices","attachments","signed_file","url","created_at","updated_at","expires_at","subscription_id","display_subscription_on_update"],"title":"Awaiting approval"},"QuoteReadyForSignature":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"type":{"type":["string","null"],"enum":["subscription","subscription_update","one_off","mixed"],"description":"\nQuote type.\n\n- `subscription`: The quote will create one or more subscriptions.\n- `subscription_update`: The quote will update one or more existing subscriptions.\n- `one_off`: The quote will issue one or more one-off invoices.\n- `mixed`: Mixed configuration types.\n- `null`: Empty quote.\n"},"status":{"type":"string","enum":["approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_signature"},"amount":{"type":"number","description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.","example":20000},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/QuoteConfiguration"},"description":"Ordered configurations included in the quote."},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes.","example":18000},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"generate_draft_invoices":{"type":"boolean","description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"subscription_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].subscription_id`."},"invoice_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].invoice_id`."},"child_subscription_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `GET /v2/subscriptions` with the `original_quote_id` filter."},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false}},"required":["id","type","status","amount","customer_id","invoicing_entity_id","configurations","template_id","crm_opportunity_id","custom_properties","contract_value","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","post_signature_activation_enabled","generate_draft_invoices","attachments","signed_file","url","created_at","updated_at","expires_at","approved_at","subscription_id","display_subscription_on_update"],"title":"Ready for signature"},"QuoteSigned":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"type":{"type":["string","null"],"enum":["subscription","subscription_update","one_off","mixed"],"description":"\nQuote type.\n\n- `subscription`: The quote will create one or more subscriptions.\n- `subscription_update`: The quote will update one or more existing subscriptions.\n- `one_off`: The quote will issue one or more one-off invoices.\n- `mixed`: Mixed configuration types.\n- `null`: Empty quote.\n"},"status":{"type":"string","enum":["signed"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"signed"},"amount":{"type":"number","description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.","example":20000},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/QuoteConfiguration"},"description":"Ordered configurations included in the quote."},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes.","example":18000},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"generate_draft_invoices":{"type":"boolean","description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":"string","format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"},"subscription_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].subscription_id`."},"invoice_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].invoice_id`."},"child_subscription_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `GET /v2/subscriptions` with the `original_quote_id` filter."},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false}},"required":["id","type","status","amount","customer_id","invoicing_entity_id","configurations","template_id","crm_opportunity_id","custom_properties","contract_value","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","post_signature_activation_enabled","generate_draft_invoices","attachments","signed_file","url","created_at","updated_at","expires_at","approved_at","signature","signed_at","subscription_id","display_subscription_on_update"],"title":"Signed"},"QuoteVoided":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"type":{"type":["string","null"],"enum":["subscription","subscription_update","one_off","mixed"],"description":"\nQuote type.\n\n- `subscription`: The quote will create one or more subscriptions.\n- `subscription_update`: The quote will update one or more existing subscriptions.\n- `one_off`: The quote will issue one or more one-off invoices.\n- `mixed`: Mixed configuration types.\n- `null`: Empty quote.\n"},"status":{"type":"string","enum":["voided"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"voided"},"amount":{"type":["number","null"],"description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.","example":20000},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/QuoteConfiguration"},"description":"Ordered configurations included in the quote."},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes.","example":18000},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"generate_draft_invoices":{"type":"boolean","description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"void_reason":{"type":"string","description":"Quote voiding reason. Only applies to the `voided` quote.","example":"The customer is ultimately not interested."},"voided_at":{"type":"string","format":"date-time","description":"Quote voiding date. Only applies to the `voided` quote.","example":"2024-04-26T12:00:01.320Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"approved_at":{"type":["string","null"],"format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"null"}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":["string","null"],"format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"},"subscription_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].subscription_id`."},"invoice_id":{"type":["string","null"],"deprecated":true,"description":"Deprecated field, please use `configurations[].invoice_id`."},"child_subscription_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `GET /v2/subscriptions` with the `original_quote_id` filter."},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false}},"required":["id","type","status","amount","customer_id","invoicing_entity_id","configurations","template_id","crm_opportunity_id","custom_properties","contract_value","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","post_signature_activation_enabled","generate_draft_invoices","attachments","signed_file","url","created_at","updated_at","void_reason","voided_at","expires_at","approved_at","signature","signed_at","subscription_id","display_subscription_on_update"],"title":"Voided"},"Quote":{"anyOf":[{"$ref":"#/components/schemas/QuoteDraft"},{"$ref":"#/components/schemas/QuoteAwaitingApproval"},{"$ref":"#/components/schemas/QuoteReadyForSignature"},{"$ref":"#/components/schemas/QuoteSigned"},{"$ref":"#/components/schemas/QuoteVoided"}]},"QuoteWarning":{"type":"object","properties":{"code":{"type":"string","enum":["subscription_template_configuration_not_found"],"description":"\nWarning code.\n\n- `subscription_template_configuration_not_found`: The quote template's subscription template has no configuration matching the customer's currency and country, so the quote was created without a subscription.\n"},"subscription_template_id":{"type":"string","description":"ID of the subscription template.","example":"subt_ieLWHmDZVMoznt"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Customer currency used to match a subscription template configuration. `null` when the customer has no currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Customer country used to match a subscription template configuration. `null` when the customer has no country.","example":"DE"}},"required":["code","subscription_template_id","currency","country"]},"CreatedQuote":{"allOf":[{"$ref":"#/components/schemas/Quote"},{"type":"object","properties":{"warnings":{"type":"array","items":{"$ref":"#/components/schemas/QuoteWarning"},"description":"Non-blocking issues met while creating the quote. Empty when there are none."}},"required":["warnings"]}]},"CreateQuoteInvoiceLineItem":{"type":"object","properties":{"description":{"type":"string","maxLength":5000,"description":"Description of the line item as it will appear on the invoice. Default to the product description.","example":"Access fee from October 13 to November 13, 2026"},"product_id":{"type":"string"},"price_configuration_id":{"type":["string","null"],"description":"Catalog price configuration linked to this line. Determines the product and revenue classification when subscription terms cannot be resolved. Must belong to the supplied product, if any. On finalized invoices, changing this link never changes amounts or taxes.","example":"pcf_monthly"},"units_count":{"type":"number","default":1,"description":"Count of units of the product related to the invoice line item.","example":1},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Tax rate of the invoice line item.","example":20},"period_start":{"type":"string","format":"date-time","description":"Start date of the line item's service period.","example":"2026-10-13T00:00:00.000Z"},"period_end":{"type":"string","format":"date-time","description":"End date of the line item's service period.","example":"2026-11-13T00:00:00.000Z"},"revenue_type":{"type":"string","enum":["recurring","variable","one_off"],"description":"Revenue classification for custom or imported lines without resolvable subscription or catalog billing terms. Derived automatically when a source exists; conflicting explicit values are rejected. New lines without a source or explicit classification default to one_off. Existing lines retain their classification unless corrected.","example":"recurring"},"revenue_interval_count":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Number of billing interval periods for recurring or variable revenue (e.g., 1 with months for monthly, 1 with years for annual). This is separate from the line service dates.","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years"],"description":"Billing interval unit for recurring or variable revenue (days, weeks, months, quarters, years). One-off revenue has no billing interval.","example":"months"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["product_id"]},"CreateQuoteInvoice":{"type":"object","properties":{"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"number":{"type":"string","description":"Invoice number. If specified, the invoice will be considered as imported from an external source and the number will not be generated by Hyperline. You are responsible for avoiding duplicates and ensuring it does not impact the numbering sequence in Hyperline.","example":"INV-35"},"reference":{"type":"string","description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":"string","description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"custom_note":{"type":"string","description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":"string","description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":"string","description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"tax_scheme":{"type":"string","enum":["auto","not_eligible"],"default":"auto","description":"Tax scheme of the invoice.\n\n- `auto`: Tax is automatically computed and applied.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"auto"},"payment_method_strategy":{"type":"string","enum":["current","external"],"description":"\nPayment method strategy used to charge the invoice. Only applies to `to_pay` status.\n\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payment of the invoice outside of Hyperline.\n","example":"external"},"payment_method_id":{"type":"string","description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"subscription_id":{"type":"string","description":"ID of an existing subscription of the customer to attach the invoice to.","example":"sub_amiaWZ3lzDIWaoT"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2026-10-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2026-11-12T00:00:00.000Z"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Values for custom properties defined for the `invoice` entity, keyed by slug."},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateQuoteInvoiceLineItem"},"minItems":1,"description":"Line items of the invoice to be issued upon quote signature. At least one line item is required. Each line must reference a catalog product via `product_id`; `unit_amount` and `name` optionally override the catalog price and label for this quote."},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage overriding the catalog coupon value, applied to the eligible line items amount (excluding tax), between 0 (excluded) and 100. Cannot be combined with `discount_amount`.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_amount","line_item_indexes"],"title":"Inline coupon"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage of the eligible line items amount (excluding tax) to discount, between 0 (excluded) and 100.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_percent"],"additionalProperties":false,"title":"Inline percent coupon"}]},"description":"Coupons to apply to the invoice. Each coupon either references an existing coupon by id or defines an inline discount."}},"required":["line_items"],"description":"Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with `subscription` or `template_id`."},"CreateQuote":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft","approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n  ","example":"draft"},"owner_email":{"type":"string","format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation. If not specified, the Hyperline account owner will be assigned.","example":"joe@acme.com"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price every product of the quote from, instead of the live products catalog. A product's own `catalog_version_id` takes precedence, and explicit `prices` always win over both.","example":"pcv_9x8v7u6t5s4r"},"comments":{"type":"string","description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":"string","description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"amount":{"type":["number","null"],"description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored — the amount is always derived from the linked invoice's `amount_excluding_tax`.","example":20000},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes. When specified, overrides the computed value.","example":18000},"collect_payment_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"contract_clause_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the contract clauses used in the quote terms.","example":["ccl_QalW2vTAdkR6IY"]},"require_tax_id":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"anyOf":[{"type":"string","enum":["all","matching","none"]},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"display_subscription_on_update":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"automatically_start_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, please use the phase activation strategy `quote_signature` instead.","example":true,"deprecated":true}},"required":["customer_id"]},{"anyOf":[{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the quote template. If not specified, a subscription configuration or an `invoice` payload must be defined.","example":"quot_9hNWq4c84Z146W"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"Subscription configuration constituting the quote."}},"required":["template_id"],"title":"From a template"},{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}}],"description":"Subscription configuration constituting the quote."}},"required":["expires_at","subscription"],"title":"Custom"},{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"invoice":{"$ref":"#/components/schemas/CreateQuoteInvoice"}},"required":["expires_at","invoice"],"title":"One-off"}]}]},"PaginatedQuote":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"},"description":"List of Quote."}},"required":["meta","data"]},"QuoteTemplateAttachment":{"type":"object","properties":{"id":{"type":"string","description":"Quote file ID.","example":"quota_5GYXy8P3QCdaXh"},"name":{"type":"string","description":"Quote file name.","example":"General Conditions of Sale"},"mimetype":{"type":"string","description":"Quote file MIME type.","example":"application/pdf"}},"required":["id","name","mimetype"]},"QuoteTemplate":{"type":"object","properties":{"id":{"type":"string","description":"Quote template ID.","example":"quot_9hNWq4c84Z146W"},"name":{"type":"string","description":"Quote template name.","example":"Enterprise template"},"description":{"type":["string","null"],"description":"Quote template description.","example":"Reusable template for enterprise quotes."},"comments":{"type":["string","null"],"description":"Default comments displayed on quotes created from the template.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Default terms displayed on quotes created from the template.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"expiration_days":{"type":"integer","exclusiveMinimum":0,"description":"Number of days after creation before quotes created from the template expire.","example":30},"collect_payment_details":{"type":"boolean","description":"Whether quotes created from the template collect customer payment method details during signature.","example":true},"collect_shipping_details":{"type":"boolean","description":"Whether quotes created from the template collect customer shipping details during signature.","example":false},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of customer custom properties required during quote signature.","example":[]},"require_tax_id":{"type":"boolean","description":"Whether quotes created from the template require the customer to provide a tax ID during signature.","example":false},"require_billing_details":{"type":"boolean","description":"Whether quotes created from the template require customer billing details during signature.","example":false},"display_taxes":{"type":"boolean","description":"Whether quotes created from the template display taxes.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Whether quotes created from the template display per-phase value breakdown.","example":false},"display_discounts_on_total":{"type":"boolean","description":"Whether quotes created from the template display discounts on the totals.","example":false},"display_quote_value":{"type":"boolean","description":"Whether quotes created from the template display total quote value.","example":true},"display_first_invoice_amount":{"type":"boolean","description":"Whether quotes created from the template display the first invoice amount.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Whether quotes created from the template display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"display_subscription_on_update":{"type":"boolean","deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false},"display_organisation_details":{"type":"boolean","description":"Whether quotes created from the template display organisation details.","example":true},"generate_draft_invoices":{"type":"boolean","description":"Whether invoices issued after quote signature stay in draft status instead of being emitted for payment.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether quotes created from the template automatically orchestrate the subscription after signature. Only applies to the Hyperline CPQ-only product.","example":true},"subscription_template_id":{"type":["string","null"],"description":"ID of the subscription template used by the quote template.","example":"subt_7gdusOkqr5L0B8"},"contract_template_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the contract documents (see the contract documents endpoints) used by the quote template.","example":["cot_8kTq3VdNcR1aLp"]},"contract_clause_ids":{"type":"array","items":{"type":"string"},"description":"IDs of contract clauses used by the quote template, in the order they are appended to the quote terms.","example":["ccl_QalW2vTAdkR6IY"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteTemplateAttachment"},"description":"List of documents attached to the quote template.","example":[{"id":"quota_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"created_at":{"type":"string","format":"date-time","description":"Quote template creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote template last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"}},"required":["id","name","description","comments","terms","expiration_days","collect_payment_details","collect_shipping_details","collect_custom_property_ids","require_tax_id","require_billing_details","display_taxes","display_price_tiers","display_phase_value","display_discounts_on_total","display_quote_value","display_first_invoice_amount","display_documents_in_preview","subscription_update_display","display_subscription_on_update","display_organisation_details","generate_draft_invoices","post_signature_activation_enabled","subscription_template_id","contract_template_ids","contract_clause_ids","attachments","created_at","updated_at"]},"PaginatedQuoteTemplate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/QuoteTemplate"},"description":"List of QuoteTemplate."}},"required":["meta","data"]},"UpdateQuote":{"type":"object","properties":{"owner_email":{"type":"string","format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.","example":"joe@acme.com"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price every product of the quote from, instead of the live products catalog. A product's own `catalog_version_id` takes precedence, and explicit `prices` always win over both.","example":"pcv_9x8v7u6t5s4r"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"amount":{"type":["number","null"],"description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count. Set to `null` to clear the manually set value.","example":20000},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes. When specified, overrides the computed value. Set to `null` to go back to the computed value.","example":18000},"collect_payment_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"contract_clause_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the contract clauses used in the quote terms.","example":["ccl_QalW2vTAdkR6IY"]},"require_tax_id":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"anyOf":[{"type":"string","enum":["all","matching","none"]},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"display_subscription_on_update":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":"opp_Z2oSqnBCUoo1bQ"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to `null` to clear the expiration.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}}],"description":"Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote."},"invoice":{"allOf":[{"$ref":"#/components/schemas/CreateQuoteInvoice"},{"description":"Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. `invoice.invoicing_entity_id` is ignored on update — the quote's existing invoicing entity is reused."}]}}},"QuoteApproval":{"oneOf":[{"type":"object","properties":{"quote_id":{"type":"string","description":"ID of the quote.","example":"quo_abc123"},"mode":{"type":"string","enum":["preview"],"description":"\nQuote approval mode.\n\n- `preview`: Current approval routing for draft or changes-requested quotes.\n- `execution`: Recorded approval execution for every other quote status.\n"},"requested_by_user_id":{"type":"string","description":"Effective submitter, matching public quote finalization: authenticated user or account owner for API keys."},"approval_required":{"type":"boolean","description":"Whether approval would be required for the effective submitter under current configuration; this does not validate finalization readiness."},"reason":{"type":"string","enum":["workflow_required","no_matching_workflow","self_approval","legacy_permissions"],"description":"Reason approval is required or bypassed; legacy_permissions means workflow-based approval is disabled."},"workflow":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Approval workflow ID.","example":"apw_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Approval workflow name.","example":"Enterprise quote approval"},"version":{"type":"integer","description":"Workflow version number.","example":1},"original_workflow_id":{"type":["string","null"],"description":"Original workflow ID when this workflow is an archived version.","example":null},"steps":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalWorkflowStep"},"description":"Approval steps required by the workflow."}},"required":["id","name","version","original_workflow_id","steps"],"description":"Selected or recorded workflow reference and ordered step definitions; its name can reflect later edits."},"skipped_step_ids":{"type":"array","items":{"type":"string"},"description":"Step IDs that would be skipped because their dynamic approver sources currently resolve to nobody."},"resolved_manager_user_id":{"type":["string","null"],"description":"Current owner manager used to resolve manager_of_owner steps in this preview, or null."},"evaluation":{"type":["object","null"],"properties":{"evaluated_at":{"type":"string","format":"date-time","description":"Time the rules were evaluated.","example":"2024-12-20T16:04:11Z"},"selected_workflow_id":{"type":["string","null"],"description":"Workflow ID selected during evaluation, which may differ from the archived workflow ID referenced by the request."},"reason":{"type":"string","description":"Explanation recorded by the workflow evaluator."},"workflows_evaluated":{"type":"array","items":{"type":"object","properties":{"workflow_id":{"type":"string","description":"ID of the workflow at evaluation time."},"workflow_name":{"type":"string","description":"Name of the workflow at evaluation time."},"priority":{"type":"integer","description":"Workflow priority; lower values are evaluated first."},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."},"rules":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"string","description":"ID of the evaluated rule."},"operator":{"type":"string","enum":["and","or"],"description":"Logical or comparison operator used in evaluation."},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Public condition field name; custom field identifiers retain their original spelling after custom_field."},"operator":{"type":"string","description":"Logical or comparison operator used in evaluation."},"expected":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]}],"description":"Product interval condition value. Use `once` with a null count for one-time products."}},{"type":"null"}],"description":"Evaluated JSON value; decimals are serialized as strings and missing values as null."},"actual":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]}],"description":"Product interval condition value. Use `once` with a null count for one-time products."}},{"type":"null"}],"description":"Evaluated JSON value; decimals are serialized as strings and missing values as null."},"scope":{"allOf":[{"$ref":"#/components/schemas/ApprovalConditionScope"},{"description":"Product scope used for a discount condition, when present."}]},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."}},"required":["field","operator","expected","actual","matched"]},"description":"Condition evaluation results."}},"required":["rule_id","operator","matched","conditions"]},"description":"Rule evaluation results recorded for this workflow."}},"required":["workflow_id","workflow_name","priority","matched","rules"]},"description":"Workflows evaluated in priority order."}},"required":["evaluated_at","selected_workflow_id","reason","workflows_evaluated"],"description":"Rule evaluation at preview time or saved at submission; null when no evaluation was recorded. Excludes the internal evaluation context."}},"required":["quote_id","mode","requested_by_user_id","approval_required","reason","workflow","skipped_step_ids","resolved_manager_user_id","evaluation"]},{"type":"object","properties":{"quote_id":{"type":"string","description":"ID of the quote."},"mode":{"type":"string","enum":["execution"],"description":"\nQuote approval mode.\n\n- `preview`: Current approval routing for draft or changes-requested quotes.\n- `execution`: Recorded approval execution for every other quote status.\n"},"request":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the recorded approval request."},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"],"description":"Recorded approval request status, independent of the quote status."},"requested_by_user_id":{"type":"string","description":"Effective submitter, matching public quote finalization: authenticated user or account owner for API keys."},"requester_comment":{"type":["string","null"],"description":"Internal comment supplied by the requester for approvers; not displayed on the customer-facing quote."},"current_step_id":{"type":["string","null"],"description":"Current step for pending requests; null for completed requests."},"workflow":{"type":"object","properties":{"id":{"type":"string","description":"Approval workflow ID.","example":"apw_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Approval workflow name.","example":"Enterprise quote approval"},"version":{"type":"integer","description":"Workflow version number.","example":1},"original_workflow_id":{"type":["string","null"],"description":"Original workflow ID when this workflow is an archived version.","example":null}},"required":["id","name","version","original_workflow_id"],"description":"Selected or recorded workflow reference and ordered step definitions; its name can reflect later edits."},"steps":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ApprovalWorkflowStep"},{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID of the recorded decision."},"approver_id":{"type":"string","description":"User whose approval was recorded, including the represented user for delegated decisions."},"actor_user_id":{"type":"string","description":"User who performed the action, falling back to the approver for non-delegated decisions."},"approval_delegation_id":{"type":["string","null"],"description":"Approval delegation used for this decision, or null."},"decision":{"type":"string","enum":["approved","rejected"],"description":"Recorded approval or rejection."},"comment":{"type":["string","null"],"description":"Comment supplied with the decision, or null."},"created_at":{"type":"string","format":"date-time","description":"Time the request or decision was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","approver_id","actor_user_id","approval_delegation_id","decision","comment","created_at"]},"description":"Recorded decisions for this step, in chronological order."}},"required":["decisions"]}]},"description":"Workflow steps in execution order, including undecided steps; historical skips are not inferred from current organization settings."},"evaluation":{"type":["object","null"],"properties":{"evaluated_at":{"type":"string","format":"date-time","description":"Time the rules were evaluated.","example":"2024-12-20T16:04:11Z"},"selected_workflow_id":{"type":["string","null"],"description":"Workflow ID selected during evaluation, which may differ from the archived workflow ID referenced by the request."},"reason":{"type":"string","description":"Explanation recorded by the workflow evaluator."},"workflows_evaluated":{"type":"array","items":{"type":"object","properties":{"workflow_id":{"type":"string","description":"ID of the workflow at evaluation time."},"workflow_name":{"type":"string","description":"Name of the workflow at evaluation time."},"priority":{"type":"integer","description":"Workflow priority; lower values are evaluated first."},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."},"rules":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"string","description":"ID of the evaluated rule."},"operator":{"type":"string","enum":["and","or"],"description":"Logical or comparison operator used in evaluation."},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Public condition field name; custom field identifiers retain their original spelling after custom_field."},"operator":{"type":"string","description":"Logical or comparison operator used in evaluation."},"expected":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]}],"description":"Product interval condition value. Use `once` with a null count for one-time products."}},{"type":"null"}],"description":"Evaluated JSON value; decimals are serialized as strings and missing values as null."},"actual":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"],"description":"Product interval period.","example":"months"},"count":{"type":"integer","exclusiveMinimum":0,"description":"Number of periods in the product interval.","example":12}},"required":["period","count"]},{"type":"object","properties":{"period":{"type":"string","enum":["once"],"description":"Product interval period.","example":"once"},"count":{"type":"null","description":"Number of periods in the product interval.","example":null}},"required":["period","count"]}],"description":"Product interval condition value. Use `once` with a null count for one-time products."}},{"type":"null"}],"description":"Evaluated JSON value; decimals are serialized as strings and missing values as null."},"scope":{"allOf":[{"$ref":"#/components/schemas/ApprovalConditionScope"},{"description":"Product scope used for a discount condition, when present."}]},"matched":{"type":"boolean","description":"Whether this condition, rule, or workflow matched."}},"required":["field","operator","expected","actual","matched"]},"description":"Condition evaluation results."}},"required":["rule_id","operator","matched","conditions"]},"description":"Rule evaluation results recorded for this workflow."}},"required":["workflow_id","workflow_name","priority","matched","rules"]},"description":"Workflows evaluated in priority order."}},"required":["evaluated_at","selected_workflow_id","reason","workflows_evaluated"],"description":"Rule evaluation at preview time or saved at submission; null when no evaluation was recorded. Excludes the internal evaluation context."},"created_at":{"type":"string","format":"date-time","description":"Time the request or decision was created.","example":"2024-12-20T16:04:11Z"},"completed_at":{"type":["string","null"],"format":"date-time","description":"Time the request completed, or null while pending.","example":"2024-12-20T16:04:11Z"}},"required":["id","status","requested_by_user_id","requester_comment","current_step_id","workflow","steps","evaluation","created_at","completed_at"],"description":"Latest recorded request, independent of asynchronous quote status updates; null when none exists, including automatic or legacy approval."}},"required":["quote_id","mode","request"]}]},"FinalizeQuote":{"type":"object","properties":{"requester_comment":{"type":"string","maxLength":2000,"description":"Internal comment supplied by the requester for approvers; not displayed on the customer-facing quote.","example":"Discount agreed with sales."}},"default":{}},"SendQuote":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which the quote will be sent for signature. Required unless the quote has signers, in which case the email goes to the signers of the current step and this field is ignored.","example":"finance@acme.com"},"message":{"type":"string","description":"Custom message used in the email content.","example":"Please find attached our proposed quotation."}}},"QuoteExternalSigner":{"type":"object","properties":{"id":{"type":"string","description":"Quote signer ID.","example":"quor_4XyQhGd8P3CYaX"},"kind":{"type":"string","enum":["external"],"description":"Signer on the customer side."},"step_order":{"type":"integer","description":"Position of the signer in the signature workflow, starting at 1. Signers with the same step order sign in parallel.","example":1},"email":{"type":"string","format":"email","description":"Email address of the signer.","example":"jane@customer.com"},"first_name":{"type":["string","null"],"description":"First name of the signer. Required by electronic signature providers.","example":"Jane"},"last_name":{"type":["string","null"],"description":"Last name of the signer. Required by electronic signature providers.","example":"Doe"},"language":{"type":["string","null"],"enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and signature page sent to the signer. Defaults to the customer language.","example":"en"},"status":{"type":"string","enum":["pending","notified","viewed","signed","declined"],"description":"\nSigner status.\n\n- `pending`: Not notified yet.\n- `notified`: The signer received the quote by email.\n- `viewed`: The signer opened the quote.\n- `signed`: The signer signed the quote.\n- `declined`: The signer declined the quote.\n","example":"notified"},"notified_at":{"type":["string","null"],"format":"date-time","description":"Date the signer was last notified. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:12:00.000Z"},"viewed_at":{"type":["string","null"],"format":"date-time","description":"Date the signer first opened the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"signed_at":{"type":["string","null"],"format":"date-time","description":"Date the signer signed the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"declined_at":{"type":["string","null"],"format":"date-time","description":"Date the signer declined the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"decline_reason":{"type":["string","null"],"description":"Reason given by the signer when declining the quote.","example":null},"created_at":{"type":"string","format":"date-time","description":"Signer creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Signer last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:12:00.000Z"}},"required":["id","kind","step_order","email","first_name","last_name","language","status","notified_at","viewed_at","signed_at","declined_at","decline_reason","created_at","updated_at"]},"QuoteCountersigner":{"type":"object","properties":{"id":{"type":"string","description":"Quote signer ID.","example":"quor_4XyQhGd8P3CYaX"},"kind":{"type":"string","enum":["countersigner"],"description":"Signer on your side, who signs after the customer."},"step_order":{"type":"integer","description":"Position of the signer in the signature workflow, starting at 1. Signers with the same step order sign in parallel.","example":1},"user_id":{"type":["string","null"],"description":"ID of the Hyperline user acting as the countersigner. When set, their email and name are taken from the user.","example":"usr_Dz3fLqW8XyP0Ab"},"email":{"type":"string","format":"email","description":"Email address of the signer.","example":"jane@customer.com"},"first_name":{"type":["string","null"],"description":"First name of the signer. Required by electronic signature providers.","example":"Jane"},"last_name":{"type":["string","null"],"description":"Last name of the signer. Required by electronic signature providers.","example":"Doe"},"language":{"type":["string","null"],"enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and signature page sent to the signer. Defaults to the customer language.","example":"en"},"status":{"type":"string","enum":["pending","notified","viewed","signed","declined"],"description":"\nSigner status.\n\n- `pending`: Not notified yet.\n- `notified`: The signer received the quote by email.\n- `viewed`: The signer opened the quote.\n- `signed`: The signer signed the quote.\n- `declined`: The signer declined the quote.\n","example":"notified"},"notified_at":{"type":["string","null"],"format":"date-time","description":"Date the signer was last notified. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:12:00.000Z"},"viewed_at":{"type":["string","null"],"format":"date-time","description":"Date the signer first opened the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"signed_at":{"type":["string","null"],"format":"date-time","description":"Date the signer signed the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"declined_at":{"type":["string","null"],"format":"date-time","description":"Date the signer declined the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"decline_reason":{"type":["string","null"],"description":"Reason given by the signer when declining the quote.","example":null},"created_at":{"type":"string","format":"date-time","description":"Signer creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Signer last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:12:00.000Z"}},"required":["id","kind","step_order","user_id","email","first_name","last_name","language","status","notified_at","viewed_at","signed_at","declined_at","decline_reason","created_at","updated_at"]},"QuoteSigner":{"oneOf":[{"$ref":"#/components/schemas/QuoteExternalSigner"},{"$ref":"#/components/schemas/QuoteCountersigner"}],"discriminator":{"propertyName":"kind","mapping":{"external":"#/components/schemas/QuoteExternalSigner","countersigner":"#/components/schemas/QuoteCountersigner"}}},"SetQuoteExternalSigner":{"type":"object","properties":{"kind":{"type":"string","enum":["external"],"description":"Signer on the customer side."},"step_order":{"type":"integer","minimum":1,"maximum":100,"description":"Position of the signer in the signature workflow, starting at 1. Signers with the same step order sign in parallel.","example":1},"email":{"type":"string","format":"email","description":"Email address of the signer.","example":"jane@customer.com"},"first_name":{"type":"string","minLength":1,"description":"First name of the signer. Required by electronic signature providers.","example":"Jane"},"last_name":{"type":"string","minLength":1,"description":"Last name of the signer. Required by electronic signature providers.","example":"Doe"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and signature page sent to the signer. Defaults to the customer language.","example":"en"}},"required":["kind","step_order","email"],"additionalProperties":false},"SetQuoteCountersigner":{"type":"object","properties":{"kind":{"type":"string","enum":["countersigner"],"description":"Signer on your side, who signs after the customer."},"step_order":{"type":"integer","minimum":1,"maximum":100,"description":"Position of the signer in the signature workflow, starting at 1. Signers with the same step order sign in parallel.","example":1},"user_id":{"type":"string","description":"ID of the Hyperline user acting as the countersigner. When set, their email and name are taken from the user.","example":"usr_Dz3fLqW8XyP0Ab"},"email":{"type":"string","format":"email","description":"Email address of the signer.","example":"jane@customer.com"},"first_name":{"type":"string","minLength":1,"description":"First name of the signer. Required by electronic signature providers.","example":"Jane"},"last_name":{"type":"string","minLength":1,"description":"Last name of the signer. Required by electronic signature providers.","example":"Doe"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and signature page sent to the signer. Defaults to the customer language.","example":"en"}},"required":["kind","step_order","email"],"additionalProperties":false},"SetQuoteSigner":{"oneOf":[{"$ref":"#/components/schemas/SetQuoteExternalSigner"},{"$ref":"#/components/schemas/SetQuoteCountersigner"}],"discriminator":{"propertyName":"kind","mapping":{"external":"#/components/schemas/SetQuoteExternalSigner","countersigner":"#/components/schemas/SetQuoteCountersigner"}}},"SetQuoteSigners":{"type":"object","properties":{"signers":{"type":"array","items":{"$ref":"#/components/schemas/SetQuoteSigner"},"maxItems":50,"description":"\nSignature workflow of the quote, replaced as a whole.\n\nSigners sign step by step, in ascending `step_order`. Signers sharing a step sign in parallel, and the next step opens once all of them have signed. The workflow needs at least one `external` signer, and a `countersigner` must sign after the first external step.\n\nSigners who already signed cannot be removed or moved. Once the quote is out for signature at an electronic signature provider, the workflow can no longer be changed.\n"}},"required":["signers"]},"VoidQuote":{"type":"object","properties":{"reason":{"type":"string","description":"Quote voiding reason.","example":"The customer is ultimately not interested."}},"required":["reason"]},"SubscriptionTemplateSimple":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template ID.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"},"created_at":{"type":"string","format":"date-time","description":"Subscription template creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription template last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"configurations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template configuration ID.","example":"subtc_CjozNBirj6oGq3"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["id","currency","country"]},"description":"Subscription template configurations.","example":[]}},"required":["id","name","description","created_at","updated_at","configurations"]},"PaginatedSubscriptionTemplate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionTemplateSimple"},"description":"List of SubscriptionTemplate."}},"required":["meta","data"]},"SubscriptionTemplate":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template ID.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"},"configurations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Subscription template configuration ID.","example":"subtc_CjozNBirj6oGq3"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["id","currency","country"]},{"type":"object","properties":{"name":{"type":["string","null"],"description":"Subscription custom name.","example":"Yearly subscription"},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":["string","null"],"enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"generate_document":{"type":"boolean","description":"Generate documents instead of invoices for the subscription."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"type":"boolean","description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"type":"boolean","description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration"],"description":"Contract terms linked to the subscription."},"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons comprising the subscription phase."},"products":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["flat_fee"]},"count":{"type":"number","description":"Number of product units.","example":1},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PriceFee"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}]},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","payment_interval","payment_schedule","prices"],"title":"Fee product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["seat"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"user"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bundle price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","prices"],"title":"Seat product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["dynamic"]},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"metering_interval_type":{"type":["string","null"],"enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n  "},"bill_usage_difference":{"type":"boolean","description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBps"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"BPS price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","min_committed_count","min_amount","max_amount","metering_interval_type","bill_usage_difference","children_usage_aggregation","prices"],"title":"Dynamic product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["credit"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire"},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"prices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PriceFee"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}]},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","credits_expiration_in_days","prices"],"title":"Credit product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["bundle"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bundle price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","display_mode","payment_interval","payment_schedule","prices"],"title":"Bundle product"}]}}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","minimum_invoice_fee","minimum_invoice_fee_products","transition_calculation_method","transition_invoicing_schedule","coupons","products"]},"description":"Phases of the subscription."}},"required":["name","minimum_invoice_fee","cancel_at","cancellation_strategy","custom_properties","generate_document","document_name","add_tax_to_document","generate_draft_invoices","contract_terms","phases"]}]},"description":"Subscription template configurations.","example":[]},"created_at":{"type":"string","format":"date-time","description":"Subscription template creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription template last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"}},"required":["id","name","description","configurations","created_at","updated_at"]},"CreateSubscriptionUpdate":{"anyOf":[{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["add_product"]},{"type":"string","enum":["add_item"],"deprecated":true,"description":"Deprecated field, please use `add_product`."}]},"payload":{"oneOf":[{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number"},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["seat"]},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"],"title":"Bundle price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used."}},"required":["product_id","count","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"]},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used."},"usage_interval_type":{"type":["string","null"],"enum":["subscription_commitment","item_payment_interval","full_database","phase_duration","subscription_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `item_payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `usage_interval_count` and `usage_interval_period` to be set.\n- `subscription_duration`: Deprecated, use `subscription_commitment` instead.\n"},"usage_interval_count":{"type":["number","null"],"description":"Number of `usage_interval_period` units in the custom metering interval. Required when `usage_interval_type` is `custom`."},"usage_interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all"],"description":"Period unit of the custom metering interval. Required when `usage_interval_type` is `custom`."},"usage_interval_period_start":{"type":["string","null"],"description":"Start date of the first custom metering interval. Defaults to the phase start date when omitted. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"only_bill_usage_difference":{"type":["boolean","null"],"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to the `item_payment_interval` metering interval type."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n"},"last_usage_billed":{"type":["number","null"],"description":"Usage amount already billed on the previous period. Used as the baseline when `only_bill_usage_difference` is enabled."},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used."}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]}]}},"required":["type","payload"],"description":"Add a new product to bill as part of the subscription."}],"title":"Add product"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["remove_product"]},{"type":"string","enum":["remove_item"],"deprecated":true,"description":"Deprecated field, please use `remove_product`."}]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"}},"required":["product_id"]}},"required":["type","payload"],"description":"Remove a product from a subscription."}],"title":"Remove product"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["add_coupon"]},"payload":{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"billing_item_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `product_ids`."}},"required":["repeat","coupon_id"]}},"required":["type","payload"],"description":"Add a coupon to a subscription."}],"title":"Add coupon"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["remove_coupon"]},"payload":{"type":"object","properties":{"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"}},"required":["subscription_coupon_id"]}},"required":["type","payload"],"description":"Remove a coupon from a subscription."}],"title":"Remove coupon"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["update_count"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"count":{"type":"number","exclusiveMinimum":0}},"required":["product_id","count"]}},"required":["type","payload"],"description":"Update the quantity of a product in a subscription."}],"title":"Update count"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["update_prices"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/CreatePrice"}}},"required":["product_id","prices"]}},"required":["type","payload"],"description":"Update the pricing of a product in a subscription."}],"title":"Update prices"}]},"CreateSubscriptionUpdates":{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"precision":{"type":"string","enum":["calendar_days","milliseconds"],"description":"Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.","example":"calendar_days"},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"updates":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["add_product"]},{"type":"string","enum":["add_item"],"deprecated":true,"description":"Deprecated field, please use `add_product`."}]},"payload":{"oneOf":[{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number"},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["seat"]},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"],"title":"Bundle price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used."}},"required":["product_id","count","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"]},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used."},"usage_interval_type":{"type":["string","null"],"enum":["subscription_commitment","item_payment_interval","full_database","phase_duration","subscription_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `item_payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `usage_interval_count` and `usage_interval_period` to be set.\n- `subscription_duration`: Deprecated, use `subscription_commitment` instead.\n"},"usage_interval_count":{"type":["number","null"],"description":"Number of `usage_interval_period` units in the custom metering interval. Required when `usage_interval_type` is `custom`."},"usage_interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all"],"description":"Period unit of the custom metering interval. Required when `usage_interval_type` is `custom`."},"usage_interval_period_start":{"type":["string","null"],"description":"Start date of the first custom metering interval. Defaults to the phase start date when omitted. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"only_bill_usage_difference":{"type":["boolean","null"],"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to the `item_payment_interval` metering interval type."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n"},"last_usage_billed":{"type":["number","null"],"description":"Usage amount already billed on the previous period. Used as the baseline when `only_bill_usage_difference` is enabled."},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used."}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]}]}},"required":["type","payload"],"description":"Add a new product to bill as part of the subscription.","title":"Add product"},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["remove_product"]},{"type":"string","enum":["remove_item"],"deprecated":true,"description":"Deprecated field, please use `remove_product`."}]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"}},"required":["product_id"]}},"required":["type","payload"],"description":"Remove a product from a subscription.","title":"Remove product"},{"type":"object","properties":{"type":{"type":"string","enum":["add_coupon"]},"payload":{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"billing_item_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `product_ids`."}},"required":["repeat","coupon_id"]}},"required":["type","payload"],"description":"Add a coupon to a subscription.","title":"Add coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["remove_coupon"]},"payload":{"type":"object","properties":{"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"}},"required":["subscription_coupon_id"]}},"required":["type","payload"],"description":"Remove a coupon from a subscription.","title":"Remove coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["update_count"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"count":{"type":"number","exclusiveMinimum":0}},"required":["product_id","count"]}},"required":["type","payload"],"description":"Update the quantity of a product in a subscription.","title":"Update count"},{"type":"object","properties":{"type":{"type":"string","enum":["update_prices"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/CreatePrice"}}},"required":["product_id","prices"]}},"required":["type","payload"],"description":"Update the pricing of a product in a subscription.","title":"Update prices"}]}}},"required":["application_schedule","payment_schedule","calculation_method","updates"]},"SubscriptionProductFee":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of the published catalog version from which this subscription product's prices were copied, or `null` when no catalog version matches.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"type":{"type":"string","enum":["flat_fee"]},"count":{"type":"number","description":"Number of product units.","example":1},"prices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PriceFee"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}]},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","catalog_version_id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","custom_properties","type","count","prices"],"title":"Fee product"},"SubscriptionProductSeat":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of the published catalog version from which this subscription product's prices were copied, or `null` when no catalog version matches.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"type":{"type":"string","enum":["seat"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"user"},"count":{"type":"number","description":"Number of product units.","example":2},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bundle price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"\nCharging method used for seat count updates within the current billing period. Only present for connected seat products.\n\n- `prorata`: The price will be calculated proportionally to the time elapsed since the last billing period.\n- `pay_in_full`: The price will be calculated for the entire billing period.\n- `do_not_charge`: The price will not be calculated.\n"},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"}},"required":["id","catalog_version_id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","custom_properties","type","unit_name","count","prices"],"title":"Seat product"},"SubscriptionProductDynamic":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of the published catalog version from which this subscription product's prices were copied, or `null` when no catalog version matches.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"metering_interval_type":{"type":["string","null"],"enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n  "},"metering_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing)."},"bill_usage_difference":{"type":"boolean","description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n"},"metering_period_started_at":{"type":["string","null"],"format":"date","description":"Start date of the current metering period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"metering_period_ends_at":{"type":["string","null"],"format":"date","description":"End date of the current metering period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBps"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"BPS price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","catalog_version_id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","custom_properties","type","unit_name","min_committed_count","min_amount","max_amount","metering_interval_type","metering_interval","bill_usage_difference","children_usage_aggregation","metering_period_started_at","metering_period_ends_at","prices"],"title":"Dynamic product"},"SubscriptionProductCredit":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of the published catalog version from which this subscription product's prices were copied, or `null` when no catalog version matches.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"type":{"type":"string","enum":["credit"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"count":{"type":"number","description":"Number of product units.","example":2},"prices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PriceFee"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}]},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire"},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether the customer credit balance was created as soon as the product was added to the subscription. When `false`, the balance is created by hand or by the first top-up."}},"required":["id","catalog_version_id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","custom_properties","type","unit_name","count","prices","credits_expiration_in_days","credits_balance_auto_creation_enabled"],"title":"Credit product"},"SubscriptionProductBundle":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of the published catalog version from which this subscription product's prices were copied, or `null` when no catalog version matches.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"type":{"type":"string","enum":["bundle"]},"count":{"type":"number","description":"Number of product units.","example":2},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"type":"object","properties":{"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration from which this price was created."}},"required":["price_configuration_id"]}],"title":"Bundle price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","catalog_version_id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","custom_properties","type","count","display_mode","prices"],"title":"Bundle product"},"Subscription":{"type":"object","properties":{"id":{"type":"string","description":"Subscription ID.","example":"sub_B6ClkdqNqVNBgY"},"name":{"type":["string","null"],"description":"Subscription custom name.","example":"Yearly subscription"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"status":{"type":"string","enum":["active","cancelled","draft","errored","archived","paused","pending","voided"],"description":"\nSubscription status.\n\n- `draft`: The subscription is being created, this status is only used in the subscription assignation flow of the UI version of Hyperline.\n- `pending`: The subscription has been created and won't be charged until it is activated.\n- `active`: The subscription is running and will be invoiced at the next payment date.\n- `paused`: The subscription's payment collection is paused.\n- `cancelled`: The subscription has been canceled from an active state.\n- `voided`: The subscription has been voided directly from the pending state.\n- `archived`: The subscription is a previous version kept after an update.\n- `errored`: We attempted 4 times (3 retries) and failed to charge a subscription's invoice, see [Handling payment errors](https://docs.hyperline.co/docs/payments/payment-errors). We consider the subscription as inactive (as the customer failed to pay you) meaning that we won't invoice the customer in the future nor collect payment. You can choose to reactivate it manually.\n ","example":"active"},"engine":{"type":"string","enum":["hyperline","chargebee","stripe"],"description":"Billing engine managing the subscription.","example":"hyperline"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order."},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":["string","null"],"description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"plan_id":{"type":["string","null"],"description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":["string","null"],"description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"checkout_session_id":{"type":["string","null"],"description":"ID of the checkout session."},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"commitment_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"type":"boolean","description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"activation_strategy":{"type":["string","null"],"enum":["start_date","manually","checkout","quote","contract_start_date"],"description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z","deprecated":true},"contract_start":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"paused_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription was paused. Only applies to `paused` status. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"reactivate_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will be automatically reactivated (`paused` status) or reinstated (`cancelled` status). UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":["string","null"],"enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":["number","null"],"description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_reason":{"type":["string","null"],"description":"Reason for the cancellation."},"cancellation_source":{"type":["string","null"],"enum":["portal","app","api","system"],"description":"Origin of the cancellation.\n\n- `portal`: customer cancelled themselves from the hosted customer portal.\n- `app`: admin cancelled from the Hyperline dashboard.\n- `api`: cancelled programmatically through the public API.\n- `system`: cancelled by an automated internal process.\n"},"estimated_arr":{"type":["number","null"],"description":"Estimated Annual Recurring Revenue generated by the subscription."},"contract_value":{"type":["number","null"],"description":"Contract value of the subscription. This value is overridable by the user."},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription payment will occur. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"next_payment_amount":{"type":["number","null"],"description":"The amount of the next subscription payment. The system will generate an invoice to pay on the `next_payment_at`."},"renews_at":{"type":["string","null"],"format":"date-time","description":"Next subscription commitment renewal date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"current_phase_id":{"type":["string","null"],"description":"ID of the current subscription phase."},"shipping_address_id":{"type":["string","null"],"description":"Active shipping address ID belonging to the subscription customer. Null uses the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"type":["boolean","null"],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"},"generate_document":{"type":"boolean","description":"Generate documents instead of invoices for the subscription."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"type":"boolean","description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"type":"boolean","description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"do_not_charge_subscription":{"type":"boolean","description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"created_at":{"type":"string","format":"date-time","description":"Subscription creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons to be applied to the prices of subscription products."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this subscription in external providers (billing, CRM, etc)."}},"required":["id","name","currency","status","engine","purchase_order","customer_id","invoicing_entity_id","plan_id","template_id","checkout_session_id","crm_opportunity_id","minimum_invoice_fee","commitment_interval","renew_automatically","renew_for","activation_strategy","starts_at","contract_start","contract_end","initial_billing_at","paused_at","reactivate_at","cancel_at","cancellation_strategy","cancellation_amount","cancellation_reason","cancellation_source","estimated_arr","contract_value","current_period_started_at","current_period_ends_at","next_payment_at","next_payment_amount","renews_at","current_phase_id","display_shipping_details","properties","custom_properties","invoice_schedule","generate_document","document_name","add_tax_to_document","generate_draft_invoices","do_not_charge_subscription","invoice_custom_note","created_at","updated_at","products","coupons","integrations"]},"CheckoutSession":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Checkout session ID.","example":"che_hEUPdVG7IgjpW1"},"status":{"type":"string","enum":["opened","completed","cancelled","errored"],"description":"Checkout session current status.","example":"opened"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"description":"Types of payment method available on the checkout session.","example":["card"]},"redirect_url":{"type":["string","null"],"format":"uri","description":"URL to which Hyperline redirects the user after the completion of the checkout.","example":"https://app.hyperline.co/callback/checkout"},"cancelled_redirect_url":{"type":["string","null"],"format":"uri","description":"URL to which Hyperline redirects the user opening the checkout link once the checkout is cancelled, instead of the expired checkout page. Overrides the account-wide cancelled checkout redirect URL. `checkout_id`, `customer_id`, `invoice_id` and `subscription_id` are appended as query parameters when available.","example":"https://app.hyperline.co/callback/checkout-cancelled"},"send_to":{"type":["object","null"],"properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link.","example":"josh@alpeak.com"},"message":{"type":["string","null"],"description":"Custom message to include in the email send. If not provided, we will use a generic one.","example":null}},"required":["email","message"]},"url":{"type":"string","format":"uri","description":"URL of the hosted Hyperline checkout page. Only defined if the status is `opened`.","example":"https://billing.hyperline.co/checkout/che_hEUPdVG7IgjpW1"}},"required":["id","status","available_payment_methods","redirect_url","cancelled_redirect_url","send_to","url"],"description":"Checkout session of the subscription."},"SubscriptionDetails":{"allOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","name","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","minimum_invoice_fee","minimum_invoice_fee_products","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"Phases of the subscription."},"quote":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the quote from which the subscription was created.","example":"quo_38YwqvItBH3d8a"},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","approved","pending_signature","voided","signed"],"description":"Status of the quote from which the subscription was created.","example":"signed"}},"required":["id","status"]},"plan":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV"},"name":{"type":"string","description":"Name of the plan that the subscription is linked to.","example":"My example plan"}},"required":["id","name"]},"template":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Name of the template that the subscription is linked to.","example":"My example template"},"configurationId":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}},"required":["id","name","configurationId"]},"checkout_session":{"$ref":"#/components/schemas/CheckoutSession"},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Payment method type used to pay the subscription."},"payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Payment method details used to pay the subscription."}]},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T22:00:00.000Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-30T21:59:59.999Z"}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration","current_period_started_at","current_period_ends_at"],"description":"Contract terms linked to the subscription."}},"required":["phases","quote","plan","template","checkout_session","payment_method_type","payment_method","contract_terms"]}]},"CancelSubscription":{"type":"object","properties":{"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"reason":{"type":"string","description":"Reason for the cancellation."},"pro_rata":{"type":"boolean","description":"Indicates if the cancel should refund the customer using a pro rata strategy."},"refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for the resulting credit note. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."}}},"RenewSubscription":{"type":"object","properties":{"up_to":{"type":"string","format":"date-time","description":"The date up to which the subscription should be renewed (exclusive).","example":"2024-12-20T16:04:11Z"}},"required":["up_to"]},"SimulateInvoiceDetails":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/InvoiceDeprecated"},{"type":"object","properties":{"public_url":{"type":["string","null"],"format":"uri","description":"Public URL of the invoice page where the customer can pay the invoice."}}}]},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["integrations"]}]},"SubscriptionPreviewTimelineEvent":{"type":"object","properties":{"type":{"type":"string","enum":["activation","renewal","within_phase_transition","subscription_transition","subscription_end"],"description":"\nType of the lifecycle event.\n\n- `activation`: The subscription is activated and its first billable period begins.\n- `renewal`: A billing period renews and issues its renewal invoice.\n- `within_phase_transition`: A change is applied within the current phase (e.g. a prorated mid-phase transition charge).\n- `subscription_transition`: A scheduled transition to another subscription is applied.\n- `subscription_end`: The subscription reaches its scheduled end. No document is projected for this event, though a real cancellation may still issue a final invoice or credit note depending on the cancellation method.\n"},"date":{"type":"string","format":"date-time","description":"The date the event fires at.","example":"2024-12-20T16:04:11Z"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/SimulateInvoiceDetails"},"description":"The invoice document(s) this event would issue: empty for an event that neither charges nor renews, one for a renewal or a prorata transition charge, two when a transition charge splits into a credit note and an invoice. These are best-effort projections, never persisted."}},"required":["type","date","invoices"]},"SubscriptionPreviewTimelineStop":{"type":"object","properties":{"kind":{"type":"string","enum":["bounded","exhausted","truncated"],"description":"\nHow to read the event list.\n\n- `bounded`: The request's own `max_events`/`until` limit cut the projection — raise the limit for more.\n- `exhausted`: The subscription's billable lifecycle ends here; nothing further will be invoiced.\n- `truncated`: The engine would do more but the projection declined — the list is incomplete.\n"}},"required":["kind"],"description":"Why the projection stopped — required reading, since the walk truncates rather than failing, so a short list of events is otherwise ambiguous."},"SubscriptionPreviewTimeline":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPreviewTimelineEvent"},"description":"The subscription's projected future lifecycle events, in chronological order (by `date`)."},"stopped_because":{"$ref":"#/components/schemas/SubscriptionPreviewTimelineStop"}},"required":["events","stopped_because"]},"SubscriptionProductEstimate":{"type":"object","properties":{"quote_id":{"type":"string","description":"ID of the signed quote the estimate comes from.","example":"quo_hXQCd5y8P3GYXa"},"quote_configuration_id":{"type":"string","description":"ID of the quote configuration (`configurations[].id` on the quote) the estimate comes from.","example":"qcf_38wZOld6qw1Wo1"},"phase_id":{"type":["string","null"],"description":"ID of the subscription phase selling the product when `period_start` begins (or the first one starting within the period). For a period before the subscription's latest transition, it can be a phase of an archived version of the subscription. Null when no phase of the subscription sells it then, when `period_start` is null, and for an update quote whose scheduled transition hasn't run yet.","example":"sup_7rwmn4Ls1YxPas"},"product_id":{"type":"string","description":"ID of the estimated product in the catalog.","example":"itm_3kXODIM1sBwBbJ"},"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration the line was priced from on the quote, if any.","example":"prc_8f3kXODIM1sBwB"},"period_start":{"type":["string","null"],"format":"date-time","description":"Start of the period the estimate currently covers, as sold by the quote (see `configurations[].estimates[].period_start` on the quote). Null when the quote couldn't resolve it.","example":"2026-01-01T00:00:00.000Z"},"period_end":{"type":["string","null"],"format":"date-time","description":"End of the period the estimate currently covers: the quote's sold period end, or the instant before a later signed quote starts replacing the subscription. Null when `period_start` is.","example":"2026-12-31T23:59:59.999Z"},"estimated_count":{"type":"number","description":"Estimated number of units per billing period.","example":200},"estimated_amount":{"type":["number","null"],"description":"Amount of one billing period of the line priced at the estimate, excluding taxes, with its discounts applied, as frozen on the quote. Null when the estimate doesn't raise the price.","example":2000},"estimated_total_amount":{"type":["number","null"],"description":"What the line bills at the estimate over the period sold by the quote, excluding taxes. Null when `estimated_amount` is, or when a later signed quote cut the period short.","example":24000}},"required":["quote_id","quote_configuration_id","phase_id","product_id","price_configuration_id","period_start","period_end","estimated_count","estimated_amount","estimated_total_amount"]},"PaginatedSubscriptionProductEstimate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionProductEstimate"},"description":"List of SubscriptionProductEstimate."}},"required":["meta","data"]},"CreateSubscription":{"allOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"}},"required":["customer_id"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","checkout"],"description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]}}},"required":["activation_strategy"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}},{"type":"object","properties":{"payment_method_strategy":{"type":"string","enum":["current","external","new"],"description":"\nPayment method strategy used to bill the subscription. By default, the current payment method of the customer will be used.\n\n- `new`: Ask the customer for a new payment method. The customer can fill in their payment method either on the subscription's checkout session or on their portal page.\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payments of the subscription outside of Hyperline.\n","example":"current"},"available_payment_method_types":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","transfer"]},"minItems":1,"description":"Set the allowed types of payment methods for the customer. Only applies to the `new` payment method strategy."},"create_setup_phase":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, no longer needed. We recommend not using it going forward.","deprecated":true},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. Only applies when creating a subscription from a plan. If omitted, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user after the completion of the checkout."},"cancelled_redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user opening the checkout link once the checkout is cancelled, instead of the expired checkout page. Overrides the account-wide cancelled checkout redirect URL. `checkout_id`, `customer_id`, `invoice_id` and `subscription_id` are appended as query parameters when available."}},"description":"Checkout session of the subscription."}}}],"title":"Without phases","description":"\nIf a `template_id` or a `template_configuration_id` is specified, the subscription will be created from scratch, and the template will only be referenced for reporting purposes.\n\nUse `From template` option to create a subscription from a template.\n"},{"allOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}},{"type":"object","properties":{"payment_method_strategy":{"type":"string","enum":["current","external","new"],"description":"\nPayment method strategy used to bill the subscription. By default, the current payment method of the customer will be used.\n\n- `new`: Ask the customer for a new payment method. The customer can fill in their payment method either on the subscription's checkout session or on their portal page.\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payments of the subscription outside of Hyperline.\n","example":"current"},"available_payment_method_types":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","transfer"]},"minItems":1,"description":"Set the allowed types of payment methods for the customer. Only applies to the `new` payment method strategy."},"create_setup_phase":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, no longer needed. We recommend not using it going forward.","deprecated":true},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. Only applies when creating a subscription from a plan. If omitted, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user after the completion of the checkout."},"cancelled_redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user opening the checkout link once the checkout is cancelled, instead of the expired checkout page. Overrides the account-wide cancelled checkout redirect URL. `checkout_id`, `customer_id`, `invoice_id` and `subscription_id` are appended as query parameters when available."}},"description":"Checkout session of the subscription."}}}],"title":"With phases","description":"\nIf a `template_id` or a `template_configuration_id` is specified, the subscription will be created from scratch, and the template will only be referenced for reporting purposes.\n\nUse `From template` option to create a subscription from a template.\n"},{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user after the completion of the checkout."},"cancelled_redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user opening the checkout link once the checkout is cancelled, instead of the expired checkout page. Overrides the account-wide cancelled checkout redirect URL. `checkout_id`, `customer_id`, `invoice_id` and `subscription_id` are appended as query parameters when available."}},"description":"Checkout session of the subscription."}},"required":["template_id"],"additionalProperties":{},"title":"From template","description":"\nIf a `template_id` is specified without a `template_configuration_id`, the template configuration will be automatically retrieved from the customer details.\n\nIf a product of the template configuration has no price yet, the request returns a 400 error until the product is priced on the template. Until then, create the subscription with explicit products instead (`Without phases` or `With phases` option), keeping `template_id` for reporting.\n\nIf you want to customize subscription content, use `Without phases` or `With phases` option.\n"}]}]},"PaginatedSubscription":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"List of Subscription."}},"required":["meta","data"]},"PaginatedSubscriptionTransition":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","pending_approval","changes_requested","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","last_renewal","quote_signature","scheduled_after_quote_signature"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]},"description":"List of SubscriptionTransition."}},"required":["meta","data"]},"LiveBilling":{"type":"object","properties":{"total_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"total_discount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"fixed_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"billing_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"total_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"original_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"discount_amount":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"item_name":{"type":"string"},"tiers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":["number","null"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"total_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"count":{"type":"number"}},"required":["from","to","amount","total_amount","count"]}}},"required":["id","total_amount","original_amount","discount_amount","item_name","tiers"]}},"coupons":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"discount_amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"item_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","discount_amount","item_ids"]}}},"required":["total_amount","total_discount","fixed_amount","billing_items","coupons"]},"PaginatedSubscriptionPhase":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","name","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","minimum_invoice_fee","minimum_invoice_fee_products","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"List of SubscriptionPhase."}},"required":["meta","data"]},"UpdateSubscription":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Subscription custom name."},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order."},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments."},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"},"estimated_arr":{"type":["number","null"],"description":"Estimated Annual Recurring Revenue generated by the subscription."},"contract_value":{"type":["number","null"],"description":"Contract value of the subscription. This value is overridable by the user."},"starts_at":{"type":["string","null"],"format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"shipping_address_id":{"type":["string","null"],"description":"Active shipping address ID belonging to the subscription customer. Null uses the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":["string","null"],"description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","from","to"],"title":"Volume"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","from","to"],"title":"Packaged"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","to"],"title":"Bulk"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"fee","amount":200}]},"count":{"type":["number","null"],"minimum":0,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":["string","null"],"description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":["number","null"],"minimum":0,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"]},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":["string","null"],"description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"]}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}}},"description":"Array of subscription phases. Existing pending phases will be replaced by the ones in the array."},"contract_terms":{"anyOf":[{"allOf":[{"type":"object","properties":{"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}]},{"type":"null"}],"description":"Contract terms to update."}}},"TaxRate":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Tax rate ID.","example":"taxr_YfiSnLIYORD9VN"},"code":{"type":"string","description":"Tax rate code identifier.","example":"STAND_VAT"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity to which the tax rate is attached.","example":"ive_jerrb484RHn"},"created_at":{"type":"string","format":"date-time","description":"Tax rate creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Tax rate last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"},"type":{"type":"string","enum":["custom"],"description":"Tax rate mapping type.","example":"custom"},"name":{"type":"string","description":"Name of the tax rate.","example":"VAT"},"description":{"type":["string","null"],"description":"Internal description of the tax rate.","example":"Standard VAT"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Optional country or tax territory required when matching a manual rate.","example":"FR"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20}},"required":["id","code","invoicing_entity_id","created_at","updated_at","type","name","description","country","rate"]},{"type":"object","properties":{"id":{"type":"string","description":"Tax rate ID.","example":"taxr_YfiSnLIYORD9VN"},"code":{"type":"string","description":"Tax rate code identifier.","example":"STAND_VAT"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity to which the tax rate is attached.","example":"ive_jerrb484RHn"},"created_at":{"type":"string","format":"date-time","description":"Tax rate creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Tax rate last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"},"type":{"type":"string","enum":["default"],"description":"Tax rate mapping type.","example":"default"},"country":{"anyOf":[{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},{"type":"string","enum":["EU","NON_EU","OTHER"]}],"description":"Country, tax territory, or EU VAT area scope to which the default rate applies.","example":"FR"},"rate_class":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"],"description":"Class of the default tax rate.","example":"standard_rate"},"scope":{"type":"string","enum":["all","domestic","intra_eu","international"],"description":"Sales scope to which the default tax rate mapping applies.","example":"all"}},"required":["id","code","invoicing_entity_id","created_at","updated_at","type","country","rate_class","scope"]}]},"PaginatedTaxRate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxRate"},"description":"List of TaxRate."}},"required":["meta","data"]},"CreateTaxRate":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Tax rate code identifier.","example":"STAND_VAT"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity to which the tax rate is attached.","example":"ive_jerrb484RHn"},"type":{"type":"string","enum":["custom"],"description":"Tax rate mapping type.","example":"custom"},"name":{"type":"string","minLength":1,"description":"Name of the tax rate.","example":"VAT"},"description":{"type":["string","null"],"description":"Internal description of the tax rate.","example":"Standard VAT"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Optional country or tax territory required when matching a manual rate.","example":"FR"},"rate":{"type":"number","minimum":0,"maximum":100,"description":"The percentage rate of the tax.","example":20}},"required":["code","invoicing_entity_id","type","name","rate"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Tax rate code identifier.","example":"STAND_VAT"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity to which the tax rate is attached.","example":"ive_jerrb484RHn"},"type":{"type":"string","enum":["default"],"description":"Tax rate mapping type.","example":"default"},"country":{"anyOf":[{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},{"type":"string","enum":["EU","NON_EU","OTHER"]}],"description":"Country, tax territory, or EU VAT area scope to which the default rate applies.","example":"FR"},"rate_class":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"],"description":"Class of the default tax rate.","example":"standard_rate"},"scope":{"type":"string","enum":["all","domestic","intra_eu","international"],"description":"Sales scope to which the default tax rate mapping applies.","example":"all"}},"required":["code","invoicing_entity_id","type","country","rate_class"],"additionalProperties":false}]},"UpdateTaxRate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Tax rate mapping type.","example":"custom"},"name":{"type":"string","minLength":1,"description":"Name of the tax rate.","example":"VAT"},"description":{"type":["string","null"],"description":"Internal description of the tax rate.","example":"Standard VAT"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Optional country or tax territory required when matching a manual rate.","example":"FR"},"code":{"type":"string","minLength":1,"description":"Tax rate code identifier.","example":"STAND_VAT"},"rate":{"type":"number","minimum":0,"maximum":100,"description":"The percentage rate of the tax.","example":20}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["default"],"description":"Tax rate mapping type.","example":"default"},"code":{"type":"string","minLength":1,"description":"Tax rate code identifier.","example":"STAND_VAT"},"scope":{"type":"string","enum":["all","domestic","intra_eu","international"],"description":"Sales scope to which the default tax rate mapping applies.","example":"all"}},"required":["type"],"additionalProperties":false}]},"App":{"type":"object","properties":{"id":{"type":"string","description":"App ID"},"name":{"type":"string","description":"App name"},"description":{"type":["string","null"],"description":"App description"},"logo_uri":{"type":["string","null"],"description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string"},"description":"List of URLs whitelisted to use as a callback after authentication."},"client_id":{"type":"string","description":"OAuth client ID"}},"required":["id","name","description","logo_uri","callbacks","client_id"]},"CreateApp":{"type":"object","properties":{"name":{"type":"string","description":"App name"},"description":{"type":"string","description":"App description"},"logo_uri":{"type":"string","format":"uri","description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string","format":"uri"},"description":"List of URLs whitelisted to use as a callback after authentication."}},"required":["name","callbacks"]},"UpdateApp":{"type":"object","properties":{"name":{"type":"string","description":"App name"},"description":{"type":["string","null"],"description":"App description"},"logo_uri":{"type":["string","null"],"format":"uri","description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string","format":"uri"},"description":"List of URLs whitelisted to use as a callback after authentication."}},"required":["name","description","logo_uri","callbacks"]},"PaginatedTransaction":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback External failed"}]},"description":"List of Transaction."}},"required":["meta","data"]},"UserRole":{"type":"object","properties":{"id":{"type":"string","description":"Role ID.","example":"rol_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Role name.","example":"Admin"},"description":{"type":["string","null"],"description":"Role description.","example":null},"is_default":{"type":"boolean","description":"Whether this is the default role assigned to new users.","example":false}},"required":["id","name","description","is_default"]},"PaginatedUserRole":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserRole"},"description":"List of UserRole."}},"required":["meta","data"]},"User":{"type":"object","properties":{"id":{"type":"string","description":"User ID.","example":"usr_DKL4Xcb5VSa8CQ"},"email":{"type":"string","format":"email","description":"User email address.","example":"john@example.com"},"first_name":{"type":["string","null"],"description":"User first name.","example":"John"},"last_name":{"type":["string","null"],"description":"User last name.","example":"Doe"},"picture_url":{"type":["string","null"],"format":"uri","description":"User profile picture URL.","example":null},"role_id":{"type":["string","null"],"description":"ID of the role assigned to the user.","example":"rol_DKL4Xcb5VSa8CQ"},"is_account_owner":{"type":"boolean","description":"Whether the user is the account owner.","example":false},"manager_id":{"type":["string","null"],"description":"ID of the Hyperline user managing this user. Always another user of the same account.","example":"usr_KMcxRWc1ZQwvJG"}},"required":["id","email","first_name","last_name","picture_url","role_id","is_account_owner","manager_id"]},"PaginatedUser":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/User"},"description":"List of User."}},"required":["meta","data"]},"ArrHistoryState":{"type":["object","null"],"properties":{"customer_id":{"type":["string","null"],"description":"Customer associated with this ARR contribution state.","example":"cus_7W3KpQ9JxL2M4N"},"bucket":{"type":["string","null"],"enum":["active","pending","excluded"],"description":"Dashboard ARR bucket. This is unavailable for reconstructed legacy states.","example":"active"},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code of the subscription ARR contribution. Reconstructed entries use the subscription's current currency because legacy analytics did not store historical currency.","example":"EUR"},"total_annual_value":{"type":"integer","description":"Total annual recurring revenue in the smallest unit of the subscription currency.","example":120000},"fixed_annual_value":{"type":["integer","null"],"description":"Fixed annual recurring revenue in the smallest unit of the subscription currency. This can be unavailable for tracked states.","example":100000},"variable_annual_value":{"type":["integer","null"],"description":"Usage-based annual recurring revenue in the smallest unit of the subscription currency. This can be unavailable for tracked states.","example":20000}},"required":["customer_id","bucket","currency","total_annual_value","fixed_annual_value","variable_annual_value"],"description":"ARR contribution state before the evolution, or `null` when absent."},"ArrHistoryEntry":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this ARR evolution.","example":"arcg_2V8NqLkW4RxY7P"},"subscription_id":{"type":"string","description":"Unique identifier for the subscription whose ARR changed.","example":"sub_2V8NqLkW4RxY7P"},"customer_id":{"type":["string","null"],"description":"Unique identifier for the customer associated with the evolution.","example":"cus_7W3KpQ9JxL2M4N"},"occurred_at":{"type":"string","format":"date-time","description":"UTC date and time when the ARR change took effect.","example":"2026-07-14T10:30:00Z"},"movement_type":{"type":"string","enum":["new","churn","expansion","contraction","customer_transfer","status_transfer","currency_change","usage_change","no_change"],"description":"Classification of the ARR movement based on its previous and current states.","example":"expansion"},"data_source":{"type":"string","enum":["tracked","reconstructed"],"description":"Whether the evolution was tracked directly or reconstructed from legacy subscription analytics.","example":"tracked"},"change_source":{"type":"string","description":"System source that caused or supplied the ARR evolution.","example":"calculated"},"previous":{"$ref":"#/components/schemas/ArrHistoryState"},"current":{"allOf":[{"$ref":"#/components/schemas/ArrHistoryState"},{"description":"ARR contribution state after the evolution, or `null` when absent."}]}},"required":["id","subscription_id","customer_id","occurred_at","movement_type","data_source","change_source","previous","current"]},"CursorPaginatedArrHistoryEntry":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ArrHistoryEntry"},"description":"List of ArrHistoryEntry."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page. `null` when there are no more items.","example":null},"has_more":{"type":"boolean","description":"Whether more items are available after this page.","example":false},"total":{"type":"number","description":"Total number of items matching the filters. Only present when `include_total=true` was passed.","example":1}},"required":["data","next_cursor","has_more"]},"PhaseContractValue":{"type":"object","properties":{"phase_id":{"type":"string","description":"Subscription phase ID.","example":"subpha_abc123"},"phase_name":{"type":["string","null"],"description":"Subscription phase name.","example":"Standard"},"phase_type":{"type":"string","enum":["setup","trial","standard"],"description":"Subscription phase type.","example":"standard"},"starts_at":{"type":["string","null"],"description":"Phase start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":["string","null"],"description":"Phase end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"amount":{"type":"number","description":"Phase contract value in cents.","example":120000}},"required":["phase_id","phase_name","phase_type","starts_at","ends_at","amount"]},"PeriodBucket":{"type":"object","properties":{"period":{"type":"string","description":"Period label, e.g. \"2025\", \"2025-Q1\", or \"2025-01\".","example":"2025"},"starts_at":{"type":"string","description":"Period start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":"string","description":"Period end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"amount":{"type":"number","description":"Prorated amount for this period in cents.","example":120000}},"required":["period","starts_at","ends_at","amount"]},"PhaseRecurringValue":{"type":"object","properties":{"phase_id":{"type":"string","description":"Subscription phase ID.","example":"subpha_abc123"},"phase_name":{"type":["string","null"],"description":"Subscription phase name.","example":"Standard"},"starts_at":{"type":["string","null"],"description":"Phase start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":["string","null"],"description":"Phase end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"annual_value":{"type":"number","description":"Annualized recurring value for this phase in cents.","example":100000},"phase_amount":{"type":"number","description":"Recurring value for the full phase duration in cents.","example":100000}},"required":["phase_id","phase_name","starts_at","ends_at","annual_value","phase_amount"]},"SubscriptionValuation":{"type":"object","properties":{"contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total contract value in the smallest currency unit (cents).","example":120000},"invoiced":{"type":"number","description":"Amount already invoiced in cents.","example":30000},"remaining":{"type":"number","description":"Amount still to be invoiced in cents.","example":90000},"by_phase":{"type":"array","items":{"$ref":"#/components/schemas/PhaseContractValue"},"description":"Contract value broken down by subscription phase."},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Contract value broken down by period. Only present when `granularity` is provided."}},"required":["total","invoiced","remaining","by_phase"],"description":"Total expected invoicing over the entire contract."},"recurring_contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total annualized recurring contract value in cents.","example":100000},"by_phase":{"type":"array","items":{"$ref":"#/components/schemas/PhaseRecurringValue"},"description":"Recurring contract value broken down by subscription phase."},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Recurring contract value broken down by period. Only present when `granularity` is provided."}},"required":["total","by_phase"],"description":"Steady-state recurring revenue excluding setup and trial phases."},"arr":{"type":"object","properties":{"fixed":{"type":"number","description":"Fixed ARR from flat fees, committed seats, and recurring credits in cents.","example":100000},"variable":{"type":"object","properties":{"current":{"type":"number","description":"Variable ARR from dynamic product overage and uncommitted seat usage in cents.","example":5000},"averaged":{"type":"number","description":"Two-period average of variable ARR in cents.","example":4500}},"required":["current","averaged"],"description":"Variable ARR components."}},"required":["fixed","variable"],"description":"Annual Recurring Revenue."}},"required":["contract_value","recurring_contract_value","arr"]},"CurrencyValuation":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code.","example":"USD"},"subscriptions":{"type":"array","items":{"type":"object","properties":{"subscription_id":{"type":"string","description":"Subscription ID.","example":"sub_abc123"},"valuation":{"$ref":"#/components/schemas/SubscriptionValuation"}},"required":["subscription_id","valuation"]},"description":"Individual subscription valuations within this currency."},"totals":{"type":"object","properties":{"contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total contract value in the smallest currency unit (cents).","example":120000},"invoiced":{"type":"number","description":"Amount already invoiced in cents.","example":30000},"remaining":{"type":"number","description":"Amount still to be invoiced in cents.","example":90000}},"required":["total","invoiced","remaining"]},"recurring_contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total annualized recurring contract value in cents.","example":100000}},"required":["total"]},"arr":{"type":"object","properties":{"fixed":{"type":"number","description":"Fixed ARR from flat fees, committed seats, and recurring credits in cents.","example":100000},"variable":{"type":"object","properties":{"current":{"type":"number","description":"Variable ARR from dynamic product overage and uncommitted seat usage in cents.","example":5000},"averaged":{"type":"number","description":"Two-period average of variable ARR in cents.","example":4500}},"required":["current","averaged"]}},"required":["fixed","variable"]},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Contract value broken down by period. Only present when `granularity` is provided."}},"required":["contract_value","recurring_contract_value","arr"],"description":"Aggregated totals across all subscriptions for this currency."}},"required":["currency","subscriptions","totals"]},"CustomerValuation":{"type":"object","properties":{"by_currency":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyValuation"},"description":"Valuations grouped by currency."}},"required":["by_currency"]},"WalletSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in `active` state and with money.","example":true},"allow_free_credits":{"type":"boolean","description":"Allow top up for free amounts on wallets.","example":true},"allow_topup_on_portal":{"type":"boolean","description":"Allow wallet top up on customer's portal.","example":false},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.","example":[]},"updated_at":{"type":["string","null"],"format":"date-time","description":"Last edition date of the wallet settings.","example":"2024-12-20T16:04:11Z"}},"required":["enabled","allow_free_credits","allow_topup_on_portal","product_ids","updated_at"]},"UpdateWalletSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in `active` state and with money.","example":true},"allow_free_credits":{"type":"boolean","description":"Allow top up for free amounts on wallets.","example":true},"allow_topup_on_portal":{"type":"boolean","description":"Allow wallet top up on customer's portal.","example":false},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.","example":[]}}},"Wallet":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Wallet ID.","example":"wal_PPpxP5d3uvgiTT"},"customer_id":{"type":"string","description":"Wallet customer ID.","example":"cus_QalW2vTAdkR6IY"},"state":{"type":"string","enum":["active","paused"],"description":"Wallet state.","example":"active"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"balance":{"type":"object","properties":{"amount":{"type":"number","description":"Available amount on the wallet. Expressed in currency's smallest unit.","example":2400}},"required":["amount"],"description":"Wallet actual balance. Expressed in currency's smallest unit."},"projected_balance":{"type":"object","properties":{"amount":{"type":"number","description":"Available amount on the wallet. Expressed in currency's smallest unit.","example":2400}},"required":["amount"],"description":"Wallet projected balance. Automatically computed by Hyperline depending on the customer's active subscriptions and future payments. Expressed in currency's smallest unit."},"created_at":{"type":"string","format":"date-time","description":"Wallet creation date.","example":"2024-12-20T16:04:11Z"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}},"required":["id","customer_id","state","currency","balance","projected_balance","created_at","low_projected_balance_threshold"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: interval + threshold"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}],"title":"Wallet: interval"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: threshold"},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}},"required":["is_auto_load_enabled"],"title":"Wallet: no auto-load"}]}]},"PaginatedWallet":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"},"description":"List of Wallet."}},"required":["meta","data"]},"CreateWallet":{"allOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"Wallet customer ID.","example":"cus_QalW2vTAdkR6IY"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}},"required":["customer_id"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: interval + threshold"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}],"title":"Wallet: interval"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: threshold"},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}},"title":"Wallet: no auto-load"}]}]},"UpdateWallet":{"allOf":[{"type":"object","properties":{"state":{"type":"string","enum":["active","paused"],"description":"Wallet state.","example":"active"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}}},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: interval + threshold"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}],"title":"Wallet: interval"},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}],"title":"Wallet: threshold"},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}},"title":"Wallet: no auto-load"}]}]},"LoadWallet":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["free"],"description":"Wallet load type. Use `paid` to load paid invoice line items, apply an existing payment transaction, or record a new one, or `free` to grant credits without collecting payment.","example":"free"},"amount":{"type":"number","description":"Amount to be loaded onto the wallet as free credits. A corresponding credit note will be generated and no payment is collected. Expressed in currency's smallest unit.","example":2400},"comment":{"type":"string","minLength":1,"description":"Internal comment stored on the wallet transaction for context.","example":"Offline payment received"},"document_status":{"type":["string","null"],"enum":["draft"],"description":"Indicates the status of the generated credit note for free top-ups."}},"required":["type","amount"],"additionalProperties":false,"title":"Free"},{"type":"object","properties":{"type":{"type":"string","enum":["paid"],"description":"Wallet load type. Use `paid` to load paid invoice line items, apply an existing payment transaction, or record a new one, or `free` to grant credits without collecting payment.","example":"paid"},"transaction_id":{"type":"string","minLength":1,"description":"Existing payment transaction ID whose unallocated amount will be loaded onto the wallet.","example":"tra_2QdJDDUej969ev"},"comment":{"type":"string","minLength":1,"description":"Internal comment stored on the wallet transaction for context.","example":"Offline payment received"}},"required":["type","transaction_id"],"additionalProperties":false,"title":"Paid from existing transaction"},{"type":"object","properties":{"type":{"type":"string","enum":["paid"],"description":"Wallet load type. Use `paid` to load paid invoice line items, apply an existing payment transaction, or record a new one, or `free` to grant credits without collecting payment.","example":"paid"},"invoice_id":{"type":"string","minLength":1,"description":"Paid invoice ID whose selected line items will be loaded onto the wallet.","example":"inv_cN7Wa3ZtL6xRkP"},"invoice_line_item_ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100,"description":"IDs of paid invoice line items whose combined amount will be loaded onto the wallet.","example":["ili_e4TDG9kQ2xVjS1"]},"comment":{"type":"string","minLength":1,"description":"Internal comment stored on the wallet transaction for context.","example":"Offline payment received"}},"required":["type","invoice_id","invoice_line_item_ids"],"additionalProperties":false,"title":"Paid from invoice line items"},{"type":"object","properties":{"type":{"type":"string","enum":["paid"],"description":"Wallet load type. Use `paid` to load paid invoice line items, apply an existing payment transaction, or record a new one, or `free` to grant credits without collecting payment.","example":"paid"},"amount":{"type":"number","description":"Amount to be loaded onto the wallet as paid credits when recording a new payment transaction. Expressed in currency's smallest unit.","example":2400},"date":{"type":"string","format":"date-time","description":"Date of the new offline payment transaction recorded for the wallet load. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-08-18T10:30:00Z"},"bank_account_id":{"type":"string","minLength":1,"description":"Bank account ID to use when recording a new paid wallet load by bank transfer.","example":"bacc_TkkHdwzzQLHvrS"},"reference":{"type":"string","minLength":1,"description":"Reference stored on the new payment transaction for a paid wallet load.","example":"WIRE-123"},"comment":{"type":"string","minLength":1,"description":"Internal comment stored on the wallet transaction for context.","example":"Offline payment received"}},"required":["amount"],"additionalProperties":false,"title":"Paid from new transaction"},{"type":"object","properties":{"amount_free":{"type":"number","description":"Deprecated. Use `type: \"free\"` with `amount` instead. Amount to be loaded onto the wallet as free credits. Expressed in currency's smallest unit.","example":2400,"deprecated":true},"document_status":{"type":["string","null"],"enum":["draft"],"description":"Indicates the status of the generated credit note for free top-ups."}},"required":["amount_free"],"additionalProperties":false,"title":"Deprecated"}]},"WalletTransaction":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Wallet transaction ID.","example":"walt_FCihRDLYhKpSpL"},"amount":{"type":"number","description":"Amount of the wallet transaction.","example":12000},"comment":{"type":["string","null"],"description":"Internal comment stored on the wallet transaction.","example":"Offline payment received"},"invoice_id":{"type":["string","null"],"description":"Source or generated invoice ID for the transaction. Only applies for `credit_paid` and `debit`.","example":null},"original_transaction_id":{"type":["string","null"],"description":"The ID of the original wallet transaction that was reverted by this transaction.","example":null},"reverted_by":{"type":["string","null"],"description":"The ID of the wallet transaction that reverted this transaction.","example":null},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["credit_free","credit_paid"],"description":"Wallet transaction type.","example":"credit_paid"},"remaining_amount":{"type":["number","null"],"description":"Unconsumed amount remaining on this wallet credit, or null while allocation is pending."}},"required":["id","amount","comment","invoice_id","original_transaction_id","reverted_by","created_at","type","remaining_amount"],"title":"Credit"},{"type":"object","properties":{"id":{"type":"string","description":"Wallet transaction ID.","example":"walt_FCihRDLYhKpSpL"},"amount":{"type":"number","description":"Amount of the wallet transaction.","example":12000},"comment":{"type":["string","null"],"description":"Internal comment stored on the wallet transaction.","example":"Offline payment received"},"invoice_id":{"type":["string","null"],"description":"Source or generated invoice ID for the transaction. Only applies for `credit_paid` and `debit`.","example":null},"original_transaction_id":{"type":["string","null"],"description":"The ID of the original wallet transaction that was reverted by this transaction.","example":null},"reverted_by":{"type":["string","null"],"description":"The ID of the wallet transaction that reverted this transaction.","example":null},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["debit"],"description":"Wallet transaction type.","example":"debit"},"funding_sources":{"type":["array","null"],"items":{"type":"object","properties":{"wallet_transaction_id":{"type":"string","description":"Wallet transaction ID of the consumed credit."},"type":{"type":"string","enum":["credit_free","credit_paid"],"description":"Type of the consumed wallet credit."},"amount":{"type":"number","description":"Amount of the wallet transaction."},"source_invoice_id":{"type":["string","null"],"description":"Invoice or credit note ID that originated the consumed credit."},"transaction_id":{"type":["string","null"],"description":"Hyperline payment transaction ID backing the consumed credit."}},"required":["wallet_transaction_id","type","amount","source_invoice_id","transaction_id"]},"description":"Wallet credits consumed by this debit in allocation order, or null while allocation is pending."}},"required":["id","amount","comment","invoice_id","original_transaction_id","reverted_by","created_at","type","funding_sources"],"title":"Debit"}]},"PaginatedWalletTransaction":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WalletTransaction"},"description":"List of WalletTransaction."}},"required":["meta","data"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"Webhook endpoint ID.","example":"ep_1srOrx2ZWZBpBUvZwXKQmoEYga2"},"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"rate_limit":{"type":["number","null"],"description":"Webhook rate limit (per second)."},"event_types":{"type":["array","null"],"items":{"type":"string","enum":["custom_action","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","credit_note.ready","credit_note.allocations_updated","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.activated","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","feature.created","feature.updated","feature.archived","feature.recovered","feature.deleted","product.feature.assigned","product.feature.updated","product.feature.unassigned","customer.feature.assigned","customer.feature.updated","customer.feature.unassigned","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed","journal_entry.created","revrec_schedule.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]},"created_at":{"type":"string","format":"date-time","description":"Webhook creation date.","example":"2024-01-20T16:04:11Z"}},"required":["id","description","url","rate_limit","event_types","created_at"]},"PaginatedWebhookEndpoint":{"type":"object","properties":{"meta":{"type":"object","properties":{"iterator":{"type":["string","null"]}},"required":["iterator"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["meta","data"]},"WebhookMessage":{"type":"object","properties":{"id":{"type":"string","description":"Webhook message ID.","example":"msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"},"event_id":{"type":"string","description":"Unique ID corresponding to the event occurrence in the Hyperline system.","example":"evt_9avP4zLks7L1yh"},"payload":{"anyOf":[{"type":"object","properties":{"event_type":{"type":"string","enum":["custom_action","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","credit_note.ready","credit_note.allocations_updated","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.activated","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","feature.created","feature.updated","feature.archived","feature.recovered","feature.deleted","product.feature.assigned","product.feature.updated","product.feature.unassigned","customer.feature.assigned","customer.feature.updated","customer.feature.unassigned","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed","journal_entry.created","revrec_schedule.completed"],"description":"Event type."},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"Depends on the type of event, see the [event catalog](https://app.hyperline.co/app/settings/webhooks) for more details."}},"required":["event_type","data"]},{"type":"string","enum":["EXPUNGED"]}],"description":"Webhook message payload."},"sent_at":{"type":"string","format":"date-time","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"}},"required":["id","event_id","payload","sent_at"]},"PaginatedWebhookMessage":{"type":"object","properties":{"meta":{"type":"object","properties":{"iterator":{"type":["string","null"]}},"required":["iterator"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookMessage"}}},"required":["meta","data"]}},"parameters":{}},"paths":{"/v1/custom-properties":{"get":{"operationId":"listCustomProperties","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"List custom properties","description":"Retrieve all custom properties previously created.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomProperty"}}}}}},"post":{"operationId":"createCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Create custom property","description":"Create a new custom property.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","boolean","number","text","email","select","multi_select"]},"slug":{"type":"string"},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription","invoice"]}},"api_only":{"type":["boolean","null"]},"required":{"type":["boolean","null"]},"authorized_values":{"type":["array","null"],"items":{"type":"string"}},"default_value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies `required`. Must match the custom property type, and one of `authorized_values` for `select` and `multi_select` types. Dates are ISO 8601 strings. Email defaults must be valid email addresses. Null means no default value."}},"required":["name","type","slug","entities"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProperty"}}}}}}},"/v1/custom-properties/{id}":{"put":{"operationId":"updateCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Update custom property","description":"Update an existing custom property.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","boolean","number","text","email","select","multi_select"]},"slug":{"type":"string"},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription","invoice"]}},"api_only":{"type":["boolean","null"]},"required":{"type":["boolean","null"]},"authorized_values":{"type":["array","null"],"items":{"type":"string"}},"default_value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies `required`. Must match the custom property type, and one of `authorized_values` for `select` and `multi_select` types. Dates are ISO 8601 strings. Email defaults must be valid email addresses. Null means no default value."}},"required":["name","type","slug","entities"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProperty"}}}}}},"delete":{"operationId":"deleteCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Delete custom property","description":"Delete an existing custom property.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/invoices":{"get":{"operationId":"listInvoicesDeprecated","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"List invoices","description":"We recommend using the `GET /v2/invoices` endpoint instead.","deprecated":true,"parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["created_at","emitted_at"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","settleable","finalized","partially_paid","outstanding","refunded","late","draft","pending_approval","changes_requested","voided","closed","uncollectible","pending_consolidation","consolidated"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","settleable","finalized","partially_paid","outstanding","refunded","late","draft","pending_approval","changes_requested","voided","closed","uncollectible","pending_consolidation","consolidated"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"]},{"type":"string","description":"subscription,quote"}]},"required":false,"name":"origin","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"]},{"type":"string","description":"subscription,quote"}]},"required":false,"name":"origin__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"subscription_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_number__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_number__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"line_item_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_start__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_start__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_end__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_end__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoiceV1"}}}}}},"post":{"operationId":"createInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create invoice","description":"Create a new invoice.","requestBody":{"description":"Create invoice payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoice"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v2/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"List invoices","description":"Retrieve existing invoices. By default, invoices with status open are not included.","parameters":[{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["created_at","emitted_at"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","settleable","finalized","partially_paid","outstanding","refunded","late","draft","pending_approval","changes_requested","voided","closed","uncollectible","pending_consolidation","consolidated"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","settleable","finalized","partially_paid","outstanding","refunded","late","draft","pending_approval","changes_requested","voided","closed","uncollectible","pending_consolidation","consolidated"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"]},{"type":"string","description":"subscription,quote"}]},"required":false,"name":"origin","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["subscription","quote","wallet","customer_credits","invoice","manual","import"]},{"type":"string","description":"subscription,quote"}]},"required":false,"name":"origin__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"subscription_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_number__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_invoice_number__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"line_item_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_start__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_start__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_end__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"period_end__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"issued_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedInvoice"}}}}}}},"/v1/invoices/{id}/credit-notes":{"post":{"operationId":"createCreditNote","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create credit note","description":"Create a credit note for an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create credit note payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditNote"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v2/invoices/batch":{"post":{"operationId":"createInvoices","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create invoices","description":"Create invoices async in batch. Results can be tracked via webhooks with the `invoice.batch.creation_succeeded` and `invoice.batch.creation_failed` events.","requestBody":{"description":"Create invoices payload.","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Optional identifier for the batch request. If not provided, a unique ID will be generated.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"},"invoices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateInvoice"},{"type":"object","properties":{"batch_invoice_id":{"type":"string","description":"A unique identifier for the invoice in the batch.","example":"invoice-123"}},"required":["batch_invoice_id"]}]},"maxItems":50,"description":"List of invoices to create (max 50)."}},"required":["invoices"]}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Identifier of the batch request.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"}},"required":["batch_id"]}}}}}}},"/v1/invoices/{id}/validate":{"post":{"operationId":"validateInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Validate draft invoice","description":"Submit a draft invoice for finalization. Returns `pending_approval` when a matching approval workflow applies; otherwise finalizes it for payment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v1/invoices/{id}/charge":{"post":{"operationId":"chargeInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Charge invoice","description":"Manually trigger the payment of the invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_method_id":{"type":"string","description":"Payment method used to execute the payment. This payment method will override any previously set method on the invoice.","example":"pm_1xMpj5bwRqN7LM"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to charge now, expressed in the currency's smallest unit. Defaults to the outstanding invoice amount."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v1/invoices/{id}/void":{"post":{"operationId":"voidInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Void invoice","description":"Void an invoice in a `to_pay` status. This action generates a corresponding credit note. A zero-priced invoice in `paid` status (no amount, discount or tax on any line) can also be voided; no credit note is generated for it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"send_email":{"type":"boolean","default":true,"description":"Indicates if an email for the generated credit note should be sent to the customer."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v1/invoices/send-email":{"post":{"operationId":"sendInvoiceEmails","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Send invoice emails","description":"Send a specific email (`email_type`) to the customer for a list of invoices, asynchronously in batch. An invoice whose status doesn't resolve to the requested email is skipped. Results can be tracked via webhooks with the `invoice.batch.email_succeeded`, `invoice.batch.email_skipped` and `invoice.batch.email_failed` events.","requestBody":{"description":"Send invoice emails payload","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Optional client-supplied identifier for the batch. Echoed back in the response and on the emitted webhook events. Generated if omitted.","example":"batch_1eTaiytfA0i2Va"},"email_type":{"type":"string","enum":["invoice_ready","invoice_settled","invoice_errored","credit_note_ready","credit_note_settled"],"description":"The email to send. The invoice's status must resolve to this email, otherwise it is skipped with reason `email_type_mismatch`.\n\n- `invoice_ready`: The to-pay invoice email (for `to_pay`, `partially_paid`, `late` invoices).\n- `invoice_settled`: The paid-invoice email (for `paid` invoices).\n- `invoice_errored`: The failed-payment email (for `error` invoices with a payment method).\n- `credit_note_ready`: The issued-credit-note email (for `to_pay`, `partially_paid` refunds).\n- `credit_note_settled`: The credit-note email (for paid refunds).","example":"invoice_ready"},"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10000,"description":"IDs of the invoices to send the email for. Processed asynchronously; each outcome is reported via webhook events.","example":["inv_1eTaiytfA0i2Va","inv_1eTaiytfA0i2Vb"]}},"required":["email_type","ids"]}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Identifier of the batch request. Use it to correlate the `invoice.batch.email_succeeded`, `invoice.batch.email_skipped` and `invoice.batch.email_failed` webhook events.","example":"batch_1eTaiytfA0i2Va"}},"required":["batch_id"]}}}}}}},"/v1/invoices/{id}/uncollectible":{"post":{"operationId":"markInvoiceAsUncollectible","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Mark as uncollectible","description":"Mark an invoice as uncollectible, useful for keeping track of bad debts that can be written off for accounting purposes.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v1/invoices/{id}":{"get":{"operationId":"getInvoiceDeprecated","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Get invoice","description":"We recommend using the `GET /v2/invoices/{id}` endpoint instead.","deprecated":true,"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Update invoice","description":"Update an invoice. Send original_invoice_id alone to fill a missing reference on an imported credit note without changing allocations. Draft and grace_period invoices allow full edits; finalized invoices allow updating product and price links and revenue classification on existing line items by ID, with unchanged amounts/taxes and automatic accounting reposting, plus metadata (paid/partially_paid: custom_note, purchase_order, custom_properties, additional_display_fields, subscription_id; uncollectible: properties, custom_note, custom_properties, additional_display_fields, subscription_id).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update invoice payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoice"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Delete invoice","description":"Delete an invoice in `draft` status or imported from an external source. For other statuses, the `POST /v1/invoices/{id}/void` endpoint must be used.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v2/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Get invoice","description":"Retrieve the details of an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/allocations":{"put":{"operationId":"updateCreditNoteAllocations","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Update credit note allocations","description":"Replace a credit note's invoice allocations, including imported invoices, without changing its original invoice reference.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditNoteAllocations"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}},"400":{"description":"Invalid allocations or insufficient available credit or invoice balance.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/upload":{"post":{"operationId":"uploadPdfToInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Upload PDF to invoice","description":"Upload a PDF file to an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/invoices/{id}/download":{"get":{"operationId":"downloadInvoice","tags":["Invoices"],"summary":"Download invoice","description":"Download the PDF of an existing invoice, returned as a downloadable file. We recommend enabling redirect following in your HTTP client.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","pattern":"^(fr|en|de|it|lt|nl|es|pt|pl)-[A-Z]{2}$","description":"Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.","example":"fr-FR"},"required":false,"description":"Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.","name":"locale","in":"query"}],"responses":{"200":{"description":"Download a draft or open invoice PDF file","content":{"application/pdf":{"schema":{"format":"binary"}}}},"302":{"description":"Redirect to a short-lived download URL"},"404":{"description":"Invoice or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/events":{"get":{"operationId":"listInvoiceEvents","tags":["Invoices > Events"],"security":[{"bearer":[]}],"summary":"List invoice events","description":"Retrieve billable events for an invoice, with per-event pricing computed against the invoice's billing rules. Works for any invoice status: draft and open invoices compute pricing live, finalized invoices serve the snapshot taken at issuance. Per-event amounts are gross — discounts (coupons, percentage, fixed amount) are applied at the line-item or invoice level, not redistributed across events. Use the invoice endpoint to read `discount_amount` if you need the net.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["timestamp"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_type__endWith","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"timestamp__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoiceEvent"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/transactions":{"post":{"operationId":"createInvoiceTransaction","tags":["Invoices > Transactions"],"security":[{"bearer":[]}],"summary":"Create transaction","description":"Create a transaction allocated to an existing invoice, rejecting transactions that cannot be allocated and leaving any excess amount unallocated.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create invoice transaction payload","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_id":{"type":"string","description":"Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.","example":"pm_1xMpj5bwRqN7LM"}},"required":["amount","process_at","payment_method_id"],"title":"Payment method"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer"]},"bank_account_id":{"type":"string","description":"Bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"}},"required":["amount","process_at","payment_method_type"],"title":"Bank transfer"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_transaction_id":{"type":"string","description":"ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the `amount` and `process_at` fields may be overridden by the transaction data."}},"required":["provider_name","provider_transaction_id"],"title":"Provider transaction"},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["external"]}},"required":["amount","process_at"],"title":"External transaction"}]}}}},"responses":{"201":{"description":"The invoice with the newly created transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}},"400":{"description":"Transaction cannot be allocated to the invoice.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/transactions/{transactionId}":{"delete":{"operationId":"deleteInvoiceTransaction","tags":["Invoices > Transactions"],"security":[{"bearer":[]}],"summary":"Delete transaction","description":"Delete a scheduled transaction or wallet debit linked to an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"responses":{"200":{"description":""},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/journal-entries":{"get":{"operationId":"listJournalEntries","tags":["Accounting > Journal entries"],"security":[{"bearer":[]}],"summary":"List journal entries","description":"List accounting journal entries with optional filters.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Filter by journal entry number."},"required":false,"description":"Filter by journal entry number.","name":"entry_number","in":"query"},{"schema":{"type":"string","enum":["draft","posted"],"description":"Filter by journal entry status."},"required":false,"description":"Filter by journal entry status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["auto","manual"],"description":"Filter by automatic or manual origin."},"required":false,"description":"Filter by automatic or manual origin.","name":"origin","in":"query"},{"schema":{"type":"string","description":"Filter by ledger identifier."},"required":false,"description":"Filter by ledger identifier.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"Filter by invoicing entity identifier."},"required":false,"description":"Filter by invoicing entity identifier.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"Filter by invoice identifier."},"required":false,"description":"Filter by invoice identifier.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"Filter by customer identifier."},"required":false,"description":"Filter by customer identifier.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"Filter by subscription identifier."},"required":false,"description":"Filter by subscription identifier.","name":"subscription_id","in":"query"},{"schema":{"type":"string","description":"Filter by transaction identifier."},"required":false,"description":"Filter by transaction identifier.","name":"transaction_id","in":"query"},{"schema":{"type":"string","description":"Filter entries containing a ledger account."},"required":false,"description":"Filter entries containing a ledger account.","name":"ledger_account_id","in":"query"},{"schema":{"type":"string","description":"Filter entries containing an accounting rule."},"required":false,"description":"Filter entries containing an accounting rule.","name":"rule_id","in":"query"},{"schema":{"type":"string","description":"Search entry number, description, amount, invoice number or ID, customer name or ID, or subscription ID."},"required":false,"description":"Search entry number, description, amount, invoice number or ID, customer name or ID, or subscription ID.","name":"search","in":"query"},{"schema":{"type":["integer","null"],"minimum":2000,"maximum":2100,"description":"Filter by entry year."},"required":false,"description":"Filter by entry year.","name":"year","in":"query"},{"schema":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Filter by entry quarter."},"required":false,"description":"Filter by entry quarter.","name":"quarter","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingJournalEntryPaginated"}}}}}},"post":{"operationId":"createManualJournalEntry","tags":["Accounting > Journal entries"],"security":[{"bearer":[]}],"summary":"Create journal entry","description":"Create and post a balanced manual journal entry attributed to the current user or API credential.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"description":{"type":"string","minLength":1,"maxLength":500,"description":"Description recorded on the manual journal entry."},"entry_date_at":{"type":["string","null"],"format":"date","description":"Timestamp when the journal entry takes effect."},"lines":{"type":"array","items":{"type":"object","properties":{"ledger_account_id":{"type":"string","description":"Ledger account identifier."},"type":{"type":"string","enum":["debit","credit"],"description":"Debit or credit line type."},"amount":{"type":"number","minimum":0,"description":"Positive amount in minor ledger-currency units."}},"required":["ledger_account_id","type","amount"]},"minItems":2,"description":"Balanced debit and credit lines."},"recognition_schedule":{"type":["object","null"],"properties":{"method":{"type":"string","enum":["point_in_time","over_time"],"description":"Recognition method applied to deferred revenue."},"recognition_date":{"type":["string","null"],"format":"date","description":"Recognition date for point-in-time recognition."},"window":{"type":["object","null"],"properties":{"start_date":{"type":"string","format":"date","description":"Inclusive service window start date."},"end_date":{"type":"string","format":"date","description":"Inclusive service window end date."}},"required":["start_date","end_date"],"description":"Service window for over-time recognition."},"granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Slice granularity for over-time recognition."},"revenue_ledger_account_id":{"type":"string","description":"Revenue account credited as revenue is recognized."}},"required":["method","revenue_ledger_account_id"],"description":"Optional recognition schedule for a deferred-revenue credit."}},"required":["ledger_id","description","entry_date_at","lines"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingJournalEntry"}}}},"403":{"description":""}}}},"/v1/accounting/journal-entries/{id}":{"get":{"operationId":"getJournalEntry","tags":["Accounting > Journal entries"],"security":[{"bearer":[]}],"summary":"Get journal entry","description":"Retrieve a journal entry and its lines by identifier.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Require the entry to belong to this invoicing entity."},"required":false,"description":"Require the entry to belong to this invoicing entity.","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingJournalEntry"}}}}}}},"/v1/accounting/journal-entries/recognition-preview":{"post":{"operationId":"previewManualJournalEntryRecognition","tags":["Accounting > Journal entries"],"security":[{"bearer":[]}],"summary":"Preview recognition schedule","description":"Preview revenue-recognition slices for a manual journal entry without writing data.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"amount":{"type":"number","minimum":0,"description":"Deferred amount in minor ledger-currency units."},"method":{"type":"string","enum":["point_in_time","over_time"],"description":"Recognition method to preview."},"recognition_date":{"type":["string","null"],"format":"date","description":"Recognition date for point-in-time recognition."},"window":{"type":["object","null"],"properties":{"start_date":{"type":"string","format":"date","description":"Inclusive service window start date."},"end_date":{"type":"string","format":"date","description":"Inclusive service window end date."}},"required":["start_date","end_date"],"description":"Service window for over-time recognition."},"granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Slice granularity for over-time recognition."}},"required":["ledger_id","amount","method"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingManualRecognitionPreview"}}}}}}},"/v1/accounting/journal-entry-lines":{"get":{"operationId":"listJournalEntryLines","tags":["Accounting > Journal entries"],"security":[{"bearer":[]}],"summary":"List journal entry lines","description":"List journal entry lines with optional filters.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Filter by journal entry identifier."},"required":false,"description":"Filter by journal entry identifier.","name":"entry_id","in":"query"},{"schema":{"type":"string","description":"Filter by ledger account identifier."},"required":false,"description":"Filter by ledger account identifier.","name":"ledger_account_id","in":"query"},{"schema":{"type":"string","description":"Filter by invoice line item identifier."},"required":false,"description":"Filter by invoice line item identifier.","name":"invoice_line_item_id","in":"query"},{"schema":{"type":"string","enum":["debit","credit"],"description":"Filter by debit or credit line type."},"required":false,"description":"Filter by debit or credit line type.","name":"type","in":"query"},{"schema":{"type":"string","description":"Filter by invoicing entity identifier."},"required":false,"description":"Filter by invoicing entity identifier.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","enum":["draft","posted"],"description":"Filter by parent journal entry status."},"required":false,"description":"Filter by parent journal entry status.","name":"entry_status","in":"query"},{"schema":{"type":"string","description":"Filter by customer identifier."},"required":false,"description":"Filter by customer identifier.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"Search line amount or parent entry data."},"required":false,"description":"Search line amount or parent entry data.","name":"search","in":"query"},{"schema":{"type":["integer","null"],"minimum":2000,"maximum":2100,"description":"Filter by parent entry year."},"required":false,"description":"Filter by parent entry year.","name":"year","in":"query"},{"schema":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Filter by parent entry quarter."},"required":false,"description":"Filter by parent entry quarter.","name":"quarter","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingJournalEntryLinePaginated"}}}}}}},"/v1/accounting/ledgers":{"get":{"operationId":"listLedgers","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"List ledgers","description":"List accounting ledgers for the authenticated client.","parameters":[{"schema":{"type":"string","description":"Filter by invoicing entity identifier."},"required":false,"description":"Filter by invoicing entity identifier.","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerList"}}}}}},"post":{"operationId":"createLedger","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Create ledger","description":"Create an accounting ledger for an invoicing entity.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoicing_entity_id":{"type":"string","description":"Identifier of the invoicing entity that owns the ledger."},"name":{"type":"string","description":"Display name of the ledger."},"code":{"type":["string","null"],"description":"Optional accounting code of the ledger."},"description":{"type":["string","null"],"description":"Optional description of the ledger."},"type":{"type":"string","enum":["IFRS","US_GAAP","FR_GAAP","UK_GAAP","LOCAL_GAAP","MANAGEMENT","CONSOLIDATION","AUDIT_ADJUSTMENT"],"description":"Type of ledger."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency used by the ledger.","example":"EUR"},"fiscal_year_end_month":{"type":"integer","minimum":1,"maximum":12,"description":"Last month of the ledger's fiscal year, from 1 (January) to 12 (December). Reports split profit between past fiscal years and the current one from it. Defaults to 12. It cannot be changed after creation.","example":12},"entry_number_pattern":{"type":"string","description":"Entry numbering pattern containing `{number}`."},"is_primary":{"type":["boolean","null"],"description":"Whether this is the primary ledger for the invoicing entity."},"is_inactive":{"type":["boolean","null"],"description":"Whether the ledger is inactive."}},"required":["invoicing_entity_id","name","code","description","type","currency","entry_number_pattern","is_primary","is_inactive"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedger"}}}}}}},"/v1/accounting/ledgers/{id}":{"get":{"operationId":"getLedger","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Get ledger","description":"Retrieve an accounting ledger by its identifier.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Require the ledger to belong to this invoicing entity."},"required":false,"description":"Require the ledger to belong to this invoicing entity.","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedger"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateLedger","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Update ledger","description":"Update an existing accounting ledger.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the ledger."},"code":{"type":["string","null"],"description":"Optional accounting code of the ledger."},"description":{"type":["string","null"],"description":"Optional description of the ledger."},"type":{"type":"string","enum":["IFRS","US_GAAP","FR_GAAP","UK_GAAP","LOCAL_GAAP","MANAGEMENT","CONSOLIDATION","AUDIT_ADJUSTMENT"],"description":"Type of ledger."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency used by the ledger.","example":"EUR"},"entry_number_pattern":{"type":"string","description":"Entry numbering pattern containing `{number}`."},"next_entry_number":{"type":"number","description":"Next sequence number assigned to an entry."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedger"}}}}}},"delete":{"operationId":"deleteLedger","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Delete ledger","description":"Permanently delete a ledger with its accounts, rules, journal entries and revenue recognition schedules, and unlink the suppliers, supplier contracts and accounting settings that reference it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/accounting/ledgers/{id}/close":{"get":{"operationId":"getLedgerCloseState","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Get ledger close state","description":"Retrieve the last closed month of a ledger and the latest month that can be closed.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerCloseState"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"closeLedgerPeriod","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Close ledger period","description":"Close every month of a ledger through an ended month, after posting the revenue recognition due by its end; a user token needs the accounting_close permission.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingCloseLedgerPeriodCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerCloseState"}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/ledgers/{id}/close-events":{"get":{"operationId":"listLedgerCloseEvents","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"List ledger close events","description":"List the closes and reopens of a ledger, newest first, with who did them and why.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerCloseEventPaginated"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/ledgers/{id}/reopen":{"post":{"operationId":"reopenLedgerPeriod","tags":["Accounting > Ledgers"],"security":[{"bearer":[]}],"summary":"Reopen ledger period","description":"Reopen a closed month of a ledger and every later month, with a mandatory reason; a user token needs the accounting_close permission.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReopenLedgerPeriodCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerCloseState"}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/accounts":{"get":{"operationId":"listLedgerAccounts","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"List ledger accounts","description":"List accounting ledger accounts with optional balances.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Filter by account ID."},"required":false,"description":"Filter by account ID.","name":"id","in":"query"},{"schema":{"type":"string","description":"Filter by ledger ID."},"required":false,"description":"Filter by ledger ID.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"Filter by invoicing entity ID."},"required":false,"description":"Filter by invoicing entity ID.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"Filter by exact account code."},"required":false,"description":"Filter by exact account code.","name":"code","in":"query"},{"schema":{"type":"string","description":"Filter by exact account name."},"required":false,"description":"Filter by exact account name.","name":"name","in":"query"},{"schema":{"type":"string","enum":["asset","contra_asset","liability","contra_liability","equity","revenue","contra_revenue","expense"],"description":"Filter by account type."},"required":false,"description":"Filter by account type.","name":"type","in":"query"},{"schema":{"type":"string","description":"Filter by connected provider ID."},"required":false,"description":"Filter by connected provider ID.","name":"client_provider_id","in":"query"},{"schema":{"type":"string","description":"Search account name or code."},"required":false,"description":"Search account name or code.","name":"search","in":"query"},{"schema":{"type":["integer","null"],"minimum":2000,"maximum":2100,"description":"Year used to calculate period balances."},"required":false,"description":"Year used to calculate period balances.","name":"year","in":"query"},{"schema":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Quarter used to calculate period balances."},"required":false,"description":"Quarter used to calculate period balances.","name":"quarter","in":"query"},{"schema":{"type":["string","null"],"enum":["name","code"],"description":"Field used to sort accounts."},"required":false,"description":"Field used to sort accounts.","name":"sort_by","in":"query"},{"schema":{"type":["string","null"],"enum":["asc","desc"],"description":"Sort direction."},"required":false,"description":"Sort direction.","name":"order","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerAccountPaginated"}}}}}},"post":{"operationId":"createLedgerAccount","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"Create ledger account","description":"Create an account in an accounting ledger.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Identifier of the ledger that owns the account."},"code":{"type":"string","description":"Accounting code of the account."},"type":{"type":"string","enum":["asset","contra_asset","liability","contra_liability","equity","revenue","contra_revenue","expense"],"description":"Accounting type of the account."},"name":{"type":"string","description":"Display name of the account."},"provider_account_id":{"type":["string","null"],"description":"Optional account identifier in the connected provider."}},"required":["ledger_id","code","type","name"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerAccount"}}}}}}},"/v1/accounting/primary-ledger/accounts":{"get":{"operationId":"listPrimaryLedgerAccounts","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"List primary accounts","description":"List accounts from the primary ledger of an invoicing entity.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Invoicing entity ID; defaults to the client's default."},"required":false,"description":"Invoicing entity ID; defaults to the client's default.","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerAccountPaginated"}}}}}}},"/v1/accounting/accounts/{id}":{"get":{"operationId":"getLedgerAccount","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"Get ledger account","description":"Retrieve a ledger account by its identifier.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerAccount"}}}}}},"put":{"operationId":"updateLedgerAccount","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"Update ledger account","description":"Update an existing ledger account.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Accounting code of the account."},"type":{"type":"string","enum":["asset","contra_asset","liability","contra_liability","equity","revenue","contra_revenue","expense"],"description":"Accounting type of the account."},"name":{"type":"string","description":"Display name of the account."},"description":{"type":["string","null"],"description":"Optional description of the account."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency used by the account.","example":"EUR"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingLedgerAccount"}}}}}},"delete":{"operationId":"deleteLedgerAccount","tags":["Accounting > Accounts"],"security":[{"bearer":[]}],"summary":"Delete ledger account","description":"Delete an unused accounting ledger account.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/accounting/income-statement/export":{"post":{"operationId":"createIncomeStatementExport","tags":["Accounting > Reports"],"security":[{"bearer":[]}],"summary":"Export income statement","description":"Queue an XLSX income-statement export for a ledger and inclusive period.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"period_from":{"type":"string","format":"date","description":"First inclusive reporting date."},"period_to":{"type":"string","format":"date","description":"Last inclusive reporting date."},"invoicing_entity_id":{"type":"string","description":"Optional invoicing entity identifier."},"status":{"type":"string","enum":["posted","all"],"description":"Journal-entry status scope; defaults to posted."},"include_reversed":{"type":"boolean","description":"Whether reversed entries are included."}},"required":["ledger_id","period_from","period_to"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExport"}}}}}}},"/v1/accounting/general-ledger/export":{"post":{"operationId":"createGeneralLedgerExport","tags":["Accounting > Reports"],"security":[{"bearer":[]}],"summary":"Export general ledger","description":"Queue an XLSX general-ledger export for a ledger and inclusive period.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"period_from":{"type":"string","format":"date","description":"First inclusive reporting date."},"period_to":{"type":"string","format":"date","description":"Last inclusive reporting date."},"invoicing_entity_id":{"type":"string","description":"Optional invoicing entity identifier."},"status":{"type":"string","enum":["posted","all"],"description":"Journal-entry status scope; defaults to posted."},"include_reversed":{"type":"boolean","description":"Whether reversed entries are included."},"account_ids":{"type":"array","items":{"type":"string"},"description":"Optional ledger-account identifiers."},"account_types":{"type":"array","items":{"type":"string","enum":["asset","contra_asset","liability","contra_liability","equity","revenue","contra_revenue","expense"]},"description":"Optional ledger-account types."}},"required":["ledger_id","period_from","period_to"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExport"}}}}}}},"/v1/accounting/revrec/waterfall":{"get":{"operationId":"getRevRecWaterfall","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get revenue recognition waterfall","description":"Aggregate revenue-recognition schedules into a booked-by-recognition month matrix.","parameters":[{"schema":{"type":"string","description":"Ledger identifier."},"required":true,"description":"Ledger identifier.","name":"ledger_id","in":"query"},{"schema":{"type":"integer","minimum":2000,"maximum":2100,"description":"Booked calendar year."},"required":true,"description":"Booked calendar year.","name":"year","in":"query"},{"schema":{"type":"string","description":"Comma-separated customer identifiers."},"required":false,"description":"Comma-separated customer identifiers.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Comma-separated product identifiers."},"required":false,"description":"Comma-separated product identifiers.","name":"product_id__in","in":"query"},{"schema":{"type":"string","description":"Search by invoice ID or number, customer name or ID, or subscription ID."},"required":false,"description":"Search by invoice ID or number, customer name or ID, or subscription ID.","name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecWaterfall"}}}}}}},"/v1/accounting/revrec/waterfall/cell":{"get":{"operationId":"getRevRecWaterfallCell","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get revenue recognition waterfall cell","description":"List the schedules and slices contributing to a waterfall cell.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Ledger identifier."},"required":true,"description":"Ledger identifier.","name":"ledger_id","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Booked month formatted YYYY-MM; required if year is absent."},"required":false,"description":"Booked month formatted YYYY-MM; required if year is absent.","name":"booked_month","in":"query"},{"schema":{"type":"integer","minimum":2000,"maximum":2100,"description":"Booked year; required if booked_month is absent."},"required":false,"description":"Booked year; required if booked_month is absent.","name":"year","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Recognition month formatted YYYY-MM."},"required":false,"description":"Recognition month formatted YYYY-MM.","name":"recognition_month","in":"query"},{"schema":{"type":"string","enum":["booked","recognition","remaining"],"description":"Waterfall cell category."},"required":true,"description":"Waterfall cell category.","name":"cell_type","in":"query"},{"schema":{"type":"string","enum":["pending","recognized","reversed"],"description":"Recognition status filter."},"required":false,"description":"Recognition status filter.","name":"status","in":"query"},{"schema":{"type":"string","description":"Comma-separated customer identifiers."},"required":false,"description":"Comma-separated customer identifiers.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Comma-separated product identifiers."},"required":false,"description":"Comma-separated product identifiers.","name":"product_id__in","in":"query"},{"schema":{"type":"string","description":"Search by invoice ID or number, customer name or ID, or subscription ID."},"required":false,"description":"Search by invoice ID or number, customer name or ID, or subscription ID.","name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecWaterfallCellPaginated"}}}}}}},"/v1/accounting/revrec/waterfall/export":{"post":{"operationId":"createRevRecWaterfallExport","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Export revenue recognition waterfall","description":"Queue an XLSX waterfall export for a ledger and year.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"year":{"type":"integer","minimum":2000,"maximum":2100,"description":"Booked calendar year included in the export."}},"required":["ledger_id","year"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExport"}}}}}}},"/v1/accounting/revrec/recognized-summary/export":{"post":{"operationId":"createRevRecRecognizedSummaryExport","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Export recognized revenue summary","description":"Queue an XLSX or CSV summary of recognized revenue for a month range.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Ledger identifier."},"month_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"First recognition month included, formatted YYYY-MM."},"month_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Last recognition month included, formatted YYYY-MM."},"file_type":{"type":"string","enum":["xlsx","csv"],"description":"Export file type; defaults to xlsx."}},"required":["ledger_id","month_from","month_to"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExport"}}}}}}},"/v1/accounting/revrec/unbilled":{"get":{"operationId":"getUnbilledRevenue","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get unbilled revenue","description":"Get revenue accrued on a subscription's current open invoice.","parameters":[{"schema":{"type":"string","description":"Subscription identifier."},"required":true,"description":"Subscription identifier.","name":"subscription_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingUnbilledRevenue"}}}}}}},"/v1/accounting/revrec/schedules":{"get":{"operationId":"listRevRecSchedules","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"List revenue recognition schedules","description":"List revenue-recognition schedules with embedded slices.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Filter by invoicing entity identifier."},"required":false,"description":"Filter by invoicing entity identifier.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"Filter by invoice identifier."},"required":false,"description":"Filter by invoice identifier.","name":"invoice_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecSchedulePaginated"}}}}}}},"/v1/accounting/revrec/schedules/{id}":{"get":{"operationId":"getRevRecSchedule","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get revenue recognition schedule","description":"Retrieve a revenue-recognition schedule with its slices.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecSchedule"}}}}}}},"/v1/accounting/revrec/schedules/{schedule_id}/adjustments":{"get":{"operationId":"listRevRecScheduleAdjustments","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"List revenue recognition adjustments","description":"List the audit trail for manual schedule adjustments.","parameters":[{"schema":{"type":"string"},"required":true,"name":"schedule_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecScheduleAdjustments"}}}}}}},"/v1/accounting/revrec/schedules/{schedule_id}/reshape":{"post":{"operationId":"reshapeRevRecSchedule","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Reshape revenue recognition schedule","description":"Recognize an amount now and optionally spread the remainder over a new window.","parameters":[{"schema":{"type":"string"},"required":true,"name":"schedule_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recognize_now_amount":{"type":"number","minimum":0,"description":"Amount to recognize immediately in ledger currency. Expressed in currency's smallest unit."},"window":{"type":["object","null"],"properties":{"start_date":{"type":"string","format":"date","description":"Inclusive start of the new recognition window."},"end_date":{"type":"string","format":"date","description":"Inclusive end of the new recognition window."}},"required":["start_date","end_date"],"description":"Window over which to spread the remaining amount."},"reason_code":{"type":"string","enum":["obligation_satisfied_early","renegotiated_delivery","service_period_change","setup_error","other"],"description":"Stable reason code for the adjustment."},"reason_detail":{"type":["string","null"],"description":"Required explanation when reason_code is `other`."}},"required":["recognize_now_amount","reason_code"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecSchedule"}}}}}}},"/v1/accounting/revrec/schedules/{schedule_id}/reshape/preview":{"post":{"operationId":"previewReshapeRevRecSchedule","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Preview revenue recognition reshape","description":"Preview the exact reshape plan without writing data.","parameters":[{"schema":{"type":"string"},"required":true,"name":"schedule_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recognize_now_amount":{"type":"number","minimum":0,"description":"Amount to recognize immediately in ledger currency. Expressed in currency's smallest unit."},"window":{"type":["object","null"],"properties":{"start_date":{"type":"string","format":"date","description":"Inclusive start of the new recognition window."},"end_date":{"type":"string","format":"date","description":"Inclusive end of the new recognition window."}},"required":["start_date","end_date"],"description":"Window over which to spread the remaining amount."}},"required":["recognize_now_amount"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecReshapePlan"}}}}}}},"/v1/accounting/revrec/slices/{id}":{"get":{"operationId":"getRevRecSlice","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get revenue recognition slice","description":"Retrieve a tenant-scoped revenue-recognition slice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecSlice"}}}}}}},"/v1/accounting/rules":{"get":{"operationId":"listAccountingRules","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"List accounting rules","description":"Retrieve existing accounting rules with optional filtering.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAccountingRule"}}}}}},"post":{"operationId":"createAccountingRule","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Create accounting rule","description":"Create a new accounting rule for account code routing or journal posting, with the filters, accounts and required fields the rule editor applies to its category.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountingRuleCommand"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}}}}},"/v1/accounting/rules/tree":{"get":{"operationId":"getAccountingRuleTree","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Get accounting rule tree","description":"Retrieve accounting rules organized as a filter tree. Accounting software sync rules are excluded.","parameters":[{"schema":{"type":"string","description":"Ledger identifier."},"required":true,"description":"Ledger identifier.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"Optional invoicing entity identifier."},"required":false,"description":"Optional invoicing entity identifier.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":["number","null"],"description":"Maximum tree depth to return."},"required":false,"description":"Maximum tree depth to return.","name":"max_depth","in":"query"},{"schema":{"type":"string","description":"Search by rule identifier or category."},"required":false,"description":"Search by rule identifier or category.","name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRuleTreeNode"},"description":"Hierarchical accounting rule tree."}},"required":["data"]}}}}}}},"/v1/accounting/rules/defaults":{"post":{"operationId":"getRuleDefaults","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Get rule defaults","description":"Preview default account values and priority for a new accounting rule.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","description":"Identifier of the ledger used to resolve defaults."},"category":{"type":"string","enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"],"description":"Category of the new accounting rule."},"filters":{"type":"object","properties":{"product_types":{"type":"array","items":{"type":"string","enum":["flat_fee","dynamic","seat","credit"]},"description":"Product types matched by the rule."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product identifiers matched by the rule."},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"description":"ISO 4217 currencies matched by the rule."},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"ISO country codes matched by the rule."},"tax_schemes":{"type":"array","items":{"type":"string","enum":["standard","reverse_charge","exempt","not_eligible","manual"]},"description":"Tax schemes matched by the rule."},"tax_territories":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Tax territories matched by the rule."},"tax_rate_classes":{"type":"array","items":{"type":"string","enum":["standard_rate","reduced_rate","reduced_rate_alt","super_reduced_rate","parking_rate","exempt","reverse_charge"]},"description":"Tax-rate classes matched by the rule."},"customer_ids":{"type":"array","items":{"type":"string"},"description":"Customer identifiers matched by the rule."},"coupon_ids":{"type":"array","items":{"type":"string"},"description":"Coupon identifiers matched by the rule."},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"Provider connection identifiers matched by the rule."},"payment_method_types":{"type":"array","items":{"type":"string","enum":["card","transfer","transfer_automated","direct_debit","direct_debit_ach","direct_debit_bacs","apple_pay","google_pay","paypal","stripe_link","external"]},"description":"Payment methods matched by the rule."},"bank_account_ids":{"type":"array","items":{"type":"string"},"description":"Bank-account identifiers matched by the rule."},"invoice_types":{"type":"array","items":{"type":"string","enum":["invoice","document"]},"description":"Invoice kinds matched by the rule."},"interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all","recurring"],"description":"Subscription interval unit matched by the rule. `recurring` matches every interval except `once`."},"interval_count":{"type":["number","null"],"description":"Subscription interval count matched by the rule."},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRuleCustomPropertyFilter"},"description":"Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its `values` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the `suggested_priority` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set `payments_clearing_ledger_account_id`, as PSP payouts are booked without the invoice. Empty means match all."}},"description":"Optional filters for the proposed rule."}},"required":["ledger_id","category"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"defaults":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":["string","null"],"description":"Resolved default value."},"rule_id":{"type":["string","null"],"description":"Identifier of the source rule."},"rule_name":{"type":["string","null"],"description":"Name of the source rule."},"rule_code":{"type":["string","null"],"description":"Code of the source rule."}},"required":["value","rule_id","rule_name","rule_code"]},"description":"Suggested accounting defaults by field."},"suggested_priority":{"type":"number","description":"Suggested priority for the new rule."},"trace":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Resolved accounting field."},"value":{"type":["string","null"],"description":"Resolved value for the field."},"rule_id":{"type":["string","null"],"description":"Identifier of the selected source rule."},"rule_name":{"type":["string","null"],"description":"Name of the selected source rule."},"is_ambiguous":{"type":"boolean","description":"Whether multiple rules matched equally."}},"required":["field","value","rule_id","rule_name","is_ambiguous"]},"description":"Resolution trace for the suggested defaults."},"context_count":{"type":"number","description":"Number of matching contexts used for resolution."}},"required":["defaults","suggested_priority","trace","context_count"]}}}}}}},"/v1/accounting/rules/{id}":{"get":{"operationId":"getAccountingRule","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Get accounting rule","description":"Retrieve a single accounting rule by its identifier.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateAccountingRule","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Update accounting rule","description":"Update an existing accounting rule, with the filters, accounts and required fields the rule editor applies to its category.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingRuleCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}}}},"delete":{"operationId":"deleteAccountingRule","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Delete accounting rule","description":"Soft-delete an accounting rule.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/accounting/rules/resolve":{"post":{"operationId":"resolveAccountingRule","tags":["Accounting > Rules"],"security":[{"bearer":[]}],"summary":"Resolve accounting rule","description":"Preview which account codes would be resolved for a given context.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveAccountingRuleCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedAccountingRule"}}}}}}},"/v1/aggregators":{"get":{"operationId":"listAggregators","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"List aggregators","description":"Retrieve existing aggregators.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAggregator"}}}}}},"post":{"operationId":"createAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Create aggregator","description":"Create a new aggregator.","requestBody":{"description":"Create aggregator payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAggregator"}}}},"responses":{"201":{"description":"The newly created aggregator","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Aggregator"}}}}}}},"/v1/aggregators/{id}":{"get":{"operationId":"getAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Get aggregator","description":"Retrieve the details of an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Aggregator"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Update aggregator","description":"Update the details of an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAggregator"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Aggregator"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Delete aggregator","description":"Delete an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Aggregator deleted"},"400":{"description":"Aggregator is linked to a product","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/aggregators/{id}/usage":{"get":{"operationId":"getAggregatorUsage","tags":["Aggregators > Usage"],"security":[{"bearer":[]}],"summary":"Get aggregator usage","description":"Retrieve a usage row for an aggregator (name, unit and thresholds).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatorUsage"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/aggregators/{id}/usage/timeseries":{"get":{"operationId":"getAggregatorUsageTimeseries","tags":["Aggregators > Usage"],"security":[{"bearer":[]}],"summary":"Get aggregator usage timeseries","description":"Get client-wide usage for an aggregator bucketed by month, day or hour.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.","name":"aggregator_filter_id","in":"query"},{"schema":{"type":"string","enum":["month","day","hour"],"default":"month","description":"Bucket size for the timeseries."},"required":false,"description":"Bucket size for the timeseries.","name":"group_by","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatorUsageTimeseries"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/aggregators/{id}/usage/group-by-customer":{"get":{"operationId":"getAggregatorUsageGroupByCustomer","tags":["Aggregators > Usage"],"security":[{"bearer":[]}],"summary":"Get aggregator usage grouped by customer","description":"Per-customer total usage for an aggregator over a period, ordered by total DESC, paginated.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.","name":"aggregator_filter_id","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAggregatorUsageGroupByCustomer"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/aggregators/{id}/usage/events":{"get":{"operationId":"getAggregatorUsageEvents","tags":["Aggregators > Usage"],"security":[{"bearer":[]}],"summary":"Get aggregator usage events","description":"List raw billable events for an aggregator across every customer of the client.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.","name":"aggregator_filter_id","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAggregatorUsageEvent"}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/plans":{"get":{"operationId":"listAgentPlans","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"List billing plans","description":"List reusable AI billing plans, filtered by mode and paginated with take/skip.","parameters":[{"schema":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"required":false,"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","name":"mode","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentPlan"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"createAgentPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Create billing plan","description":"Create an AI billing plan; metered overage also provisions the catalog products needed for invoicing.","requestBody":{"description":"Create plan payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Human-readable resource name.","example":"Support agent plan"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"overage_mode":{"type":["string","null"],"enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"minItems":1,"maxItems":8,"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"per_seat_credits":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"settlement_interval_minutes":{"type":["integer","null"],"minimum":60,"maximum":44640,"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"}},"required":["name","mode"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"per_seat_credits":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"billing_item_ids":{"type":"array","items":{"type":"string"},"description":"Public product identifiers for this plan's invoice charges, in creation order. Read-only; amounts are defined by the corresponding price configurations.","example":["prd_agent_plan"]},"price_configuration_ids":{"type":"array","items":{"type":"string"},"description":"Public price configuration identifiers corresponding to billing_item_ids. Read-only.","example":["pcfg_agent_plan"]},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false}},"required":["id","name","mode","rate_card_id","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","per_seat_credits","grant_rollover_enabled","billing_item_ids","price_configuration_ids","using_policy_count","is_default"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/plans/default":{"get":{"operationId":"getAgentDefaultPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get default billing plan","description":"Get the workspace default plan reference and auto-apply setting, or 404 when unset.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string","description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"auto_apply":{"type":"boolean","description":"Whether eligible newly ingested customers receive the default plan automatically.","example":false}},"required":["plan_id","auto_apply"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"No default plan is set","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"setAgentDefaultPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Set default billing plan","description":"Set the workspace default plan and whether eligible new customers receive it automatically.","requestBody":{"description":"Which plan holds the default marker","content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string","minLength":1,"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"auto_apply":{"type":"boolean","description":"Whether eligible newly ingested customers receive the default plan automatically.","example":false}},"required":["plan_id"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string","description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"auto_apply":{"type":"boolean","description":"Whether eligible newly ingested customers receive the default plan automatically.","example":false}},"required":["plan_id","auto_apply"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"clearAgentDefaultPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Clear default billing plan","description":"Clear the workspace default without deleting the plan, or return 404 when unset.","responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"No default plan is set","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/plans/{id}":{"get":{"operationId":"getAgentPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get billing plan","description":"Get an AI billing plan by ID.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"per_seat_credits":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"billing_item_ids":{"type":"array","items":{"type":"string"},"description":"Public product identifiers for this plan's invoice charges, in creation order. Read-only; amounts are defined by the corresponding price configurations.","example":["prd_agent_plan"]},"price_configuration_ids":{"type":"array","items":{"type":"string"},"description":"Public price configuration identifiers corresponding to billing_item_ids. Read-only.","example":["pcfg_agent_plan"]},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false}},"required":["id","name","mode","rate_card_id","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","per_seat_credits","grant_rollover_enabled","billing_item_ids","price_configuration_ids","using_policy_count","is_default"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"replaceAgentPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Replace billing plan","description":"Replace all mutable plan settings for future usage; omitted settings reset and mode remains immutable.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Replace plan payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Human-readable resource name.","example":"Support agent plan"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"overage_mode":{"type":["string","null"],"enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"minItems":1,"maxItems":8,"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"per_seat_credits":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"settlement_interval_minutes":{"type":["integer","null"],"minimum":60,"maximum":44640,"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"per_seat_credits":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits granted per seat per billing period. Null grants no credits.","example":"10000"},"grant_rollover_enabled":{"type":"boolean","description":"Whether granted credits survive renewal. Purchased credits always roll over.","example":true},"billing_item_ids":{"type":"array","items":{"type":"string"},"description":"Public product identifiers for this plan's invoice charges, in creation order. Read-only; amounts are defined by the corresponding price configurations.","example":["prd_agent_plan"]},"price_configuration_ids":{"type":"array","items":{"type":"string"},"description":"Public price configuration identifiers corresponding to billing_item_ids. Read-only.","example":["pcfg_agent_plan"]},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false}},"required":["id","name","mode","rate_card_id","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","per_seat_credits","grant_rollover_enabled","billing_item_ids","price_configuration_ids","using_policy_count","is_default"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteAgentPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Delete billing plan","description":"Delete an unused billing plan, or return 409 while customer policies still reference it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/rate-cards":{"get":{"operationId":"listAgentRateCards","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"List rate cards","description":"List AI rate cards filtered by denomination, currency or name and paginated with take/skip.","parameters":[{"schema":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"required":false,"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","name":"denomination","in":"query"},{"schema":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"required":false,"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","name":"currency","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentRateCard"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"createAgentRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Create rate card","description":"Create a reusable AI rate card with token and item prices in credits, allowance units or currency.","requestBody":{"description":"Create rate card payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Human-readable resource name.","example":"Support agent plan"},"fallback_per_usd":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"minLength":1,"maxLength":64,"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"maxItems":20,"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["kind"]},"maxItems":1000,"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]},"denomination":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"}},"required":["name","rows","denomination"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"denomination":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["id","kind","provider","model","rate_per_m_input","rate_per_m_output","rate_unit","rate_per_m_cached_input","rate_per_m_cache_write","dimensions"]},"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]},"attached_product_id":{"type":["string","null"],"description":"Credit product using this card as its default, or null.","example":"prd_credits"},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"using_plan_count":{"type":"number","description":"Number of plans referencing this rate card.","example":1}},"required":["id","name","denomination","currency","fallback_per_usd","rows","attached_product_id","using_policy_count","using_plan_count"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/rate-cards/{id}":{"get":{"operationId":"getAgentRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get rate card","description":"Get a rate card with its pricing rows and dependency counts.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"denomination":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["id","kind","provider","model","rate_per_m_input","rate_per_m_output","rate_unit","rate_per_m_cached_input","rate_per_m_cache_write","dimensions"]},"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]},"attached_product_id":{"type":["string","null"],"description":"Credit product using this card as its default, or null.","example":"prd_credits"},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"using_plan_count":{"type":"number","description":"Number of plans referencing this rate card.","example":1}},"required":["id","name","denomination","currency","fallback_per_usd","rows","attached_product_id","using_policy_count","using_plan_count"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Rate card not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"replaceAgentRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Replace rate card","description":"Replace the complete pricing row set and mutable settings for future usage; denomination and currency remain immutable.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Replace rate card payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Human-readable resource name.","example":"Support agent plan"},"fallback_per_usd":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"minLength":1,"maxLength":64,"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"maxItems":20,"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["kind"]},"maxItems":1000,"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]}},"required":["name","rows"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"name":{"type":"string","description":"Human-readable resource name.","example":"Support agent plan"},"denomination":{"type":"string","enum":["credits","units","currency"],"description":"Unit in which rate-card prices are expressed.\n\n- credits: Credit counts.\n- units: Weighted rolling-allowance units.\n- currency: Major units of the specified currency.","example":"currency"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"kind":{"type":"string","enum":["llm","item"],"description":"Pricing row kind.\n\n- llm: Prices token usage by provider and model.\n- item: Prices non-LLM usage by vendor and item.","example":"llm"},"provider":{"type":["string","null"],"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":["string","null"],"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"rate_per_m_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million input tokens, in credits, allowance units, or major currency units according to the card denomination.","example":"3"},"rate_per_m_output":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million output tokens, in the card denomination; currency cards use major currency units.","example":"15"},"rate_unit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per item unit, in the card denomination; currency cards use major currency units.","example":"0.01"},"rate_per_m_cached_input":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cached input tokens. Null falls back to the card conversion for this dimension.","example":"0.3"},"rate_per_m_cache_write":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Price per million cache-write tokens. Null falls back to the card conversion for this dimension.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["id","kind","provider","model","rate_per_m_input","rate_per_m_output","rate_unit","rate_per_m_cached_input","rate_per_m_cache_write","dimensions"]},"description":"All pricing rows on the card; replacement replaces the complete list.","example":[]},"attached_product_id":{"type":["string","null"],"description":"Credit product using this card as its default, or null.","example":"prd_credits"},"using_policy_count":{"type":"number","description":"Number of customer policy scopes referencing this resource.","example":1},"using_plan_count":{"type":"number","description":"Number of plans referencing this rate card.","example":1}},"required":["id","name","denomination","currency","fallback_per_usd","rows","attached_product_id","using_policy_count","using_plan_count"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Rate card not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteAgentRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Delete rate card","description":"Delete an unused rate card, or return 409 while a plan, product or policy references it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Rate card not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/costs":{"get":{"operationId":"listAgentCostCatalog","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"List cost catalog","description":"List provider costs, negotiated overrides and custom items with enablement and pricing provenance; supports take/skip and enabled_only.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":10000,"description":"Maximum catalog entries to return.","example":100},"required":false,"description":"Maximum catalog entries to return.","name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false},"required":false,"name":"enabled_only","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentCostCatalogEntry"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/costs/items":{"post":{"operationId":"createAgentCostCatalogItem","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"Create custom cost item","description":"Create a custom provider/item cost; an existing pair returns 200 with its unchanged rates, so use PUT /v1/ai/billing/costs/items/:id to edit it.","requestBody":{"description":"Create custom cost item payload","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"item":{"type":"string","minLength":1,"description":"Custom item name matching the usage payload.","example":"search"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"minItems":1,"maxItems":10,"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["provider","item","dimensions"]}}}},"responses":{"200":{"description":"The custom cost item already existed","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"aliases":{"type":"array","items":{"type":"string"},"description":"Alternative model names recognized by the cost catalog.","example":["claude-sonnet-5-latest"]},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"source":{"type":"string","enum":["official","override","custom","unlisted"],"description":"Source of the model or item cost.\n\n- official: Official model price registry.\n- override: Negotiated workspace cost override.\n- custom: Workspace-defined cost item.\n- unlisted: Observed usage without catalog pricing.","example":"official"},"custom_item_id":{"type":["string","null"],"description":"Active custom cost-item version identifier used to update or delete the item; null for registry models. An update returns a new identifier and preserves historical prices.","example":null},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["id","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","effective_from"],"description":"Negotiated workspace cost override, or null when using registry rates.","example":null}},"required":["provider","model","aliases","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","dimensions","effective_from","source","custom_item_id","override"]}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"aliases":{"type":"array","items":{"type":"string"},"description":"Alternative model names recognized by the cost catalog.","example":["claude-sonnet-5-latest"]},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"source":{"type":"string","enum":["official","override","custom","unlisted"],"description":"Source of the model or item cost.\n\n- official: Official model price registry.\n- override: Negotiated workspace cost override.\n- custom: Workspace-defined cost item.\n- unlisted: Observed usage without catalog pricing.","example":"official"},"custom_item_id":{"type":["string","null"],"description":"Active custom cost-item version identifier used to update or delete the item; null for registry models. An update returns a new identifier and preserves historical prices.","example":null},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["id","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","effective_from"],"description":"Negotiated workspace cost override, or null when using registry rates.","example":null}},"required":["provider","model","aliases","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","dimensions","effective_from","source","custom_item_id","override"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/costs/items/{id}":{"delete":{"operationId":"deleteAgentCostCatalogItem","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"Remove custom cost item","description":"Close a custom item by custom_item_id while preserving historical prices; new usage becomes unpriced unless another price matches.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Custom cost item not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"replaceAgentCostCatalogItem","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"Replace custom cost item","description":"Replace a custom item's provider, item and dimensions, preserving historical prices and returning the new active custom_item_id.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"item":{"type":"string","minLength":1,"description":"Custom item name matching the usage payload.","example":"search"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"minItems":1,"maxItems":10,"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["provider","item","dimensions"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"aliases":{"type":"array","items":{"type":"string"},"description":"Alternative model names recognized by the cost catalog.","example":["claude-sonnet-5-latest"]},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"source":{"type":"string","enum":["official","override","custom","unlisted"],"description":"Source of the model or item cost.\n\n- official: Official model price registry.\n- override: Negotiated workspace cost override.\n- custom: Workspace-defined cost item.\n- unlisted: Observed usage without catalog pricing.","example":"official"},"custom_item_id":{"type":["string","null"],"description":"Active custom cost-item version identifier used to update or delete the item; null for registry models. An update returns a new identifier and preserves historical prices.","example":null},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["id","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","effective_from"],"description":"Negotiated workspace cost override, or null when using registry rates.","example":null}},"required":["provider","model","aliases","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","dimensions","effective_from","source","custom_item_id","override"]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/costs/overrides":{"put":{"operationId":"upsertAgentCostCatalogOverride","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"Set provider cost override","description":"Set negotiated USD costs for a registry model, effective immediately while preserving historical prices.","requestBody":{"description":"Model price override payload","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","minLength":1,"description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"input_per_m_tokens":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.]{1,64}$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]}},"required":["provider","model","input_per_m_tokens","output_per_m_tokens"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"AI model provider, or the vendor of a custom cost item. This is not an integration connection.","example":"anthropic"},"model":{"type":"string","description":"Model identifier, or custom item identifier. Null on wildcard pricing rows.","example":"claude-sonnet-5"},"aliases":{"type":"array","items":{"type":"string"},"description":"Alternative model names recognized by the cost catalog.","example":["claude-sonnet-5-latest"]},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"source":{"type":"string","enum":["official","override","custom","unlisted"],"description":"Source of the model or item cost.\n\n- official: Official model price registry.\n- override: Negotiated workspace cost override.\n- custom: Workspace-defined cost item.\n- unlisted: Observed usage without catalog pricing.","example":"official"},"custom_item_id":{"type":["string","null"],"description":"Active custom cost-item version identifier used to update or delete the item; null for registry models. An update returns a new identifier and preserves historical prices.","example":null},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"input_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million input tokens, as an exact decimal string.","example":"3"},"output_per_m_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million output tokens, as an exact decimal string.","example":"15"},"cached_input_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cached input tokens, as an exact decimal string.","example":"0.3"},"cache_write_per_m_tokens":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Provider cost in USD per million cache write tokens, as an exact decimal string.","example":"3.75"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"rate":{"type":"string","description":"Applied rate. Receipt lines may contain a human-readable rate expression.","example":"3"},"per":{"type":"string","enum":["1m","1k","unit"],"description":"Quantity basis for the dimension rate.\n\n- 1m: Per million units.\n- 1k: Per thousand units.\n- unit: Per single unit.","example":"1m"}},"required":["key","rate","per"]},"description":"Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.","example":[{"key":"cached_input_tokens","rate":"0.3","per":"1m"}]},"effective_from":{"type":"string","format":"date-time","description":"Time the price takes effect, as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"}},"required":["id","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","effective_from"],"description":"Negotiated workspace cost override, or null when using registry rates.","example":null}},"required":["provider","model","aliases","input_per_m_tokens","output_per_m_tokens","cached_input_per_m_tokens","cache_write_per_m_tokens","dimensions","effective_from","source","custom_item_id","override"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/costs/overrides/{id}":{"delete":{"operationId":"deleteAgentCostCatalogOverride","tags":["AI > Costs"],"security":[{"bearer":[]}],"summary":"Remove provider cost override","description":"Close a negotiated cost override and restore registry pricing for future usage.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Price override not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/policies":{"get":{"operationId":"listAgentCustomerPolicies","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"List billing policies","description":"List configured customer billing scopes with take/skip; agent_slug null identifies the shared pool.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentBillingPolicy"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/policies/default":{"get":{"operationId":"getDefaultCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get default billing policy","description":"Get the shared policy or the exact agent_slug override, returning 404 when that scope has no policy of its own.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Policy not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"upsertDefaultCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Configure default billing policy","description":"Replace customer billing settings while preserving omitted plan_id and rate_card_id references; null detaches them, and a shared policy enables automatic telemetry billing.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Upsert billing policy payload","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"minLength":1,"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"minLength":1,"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":["string","null"],"enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_wallet_id":{"type":["string","null"],"minLength":1,"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"settlement_interval_minutes":{"type":["integer","null"],"minimum":60,"maximum":44640,"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"minItems":1,"maxItems":8,"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"plan_id":{"type":["string","null"],"minLength":1,"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false}},"required":["mode","blocked"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteDefaultCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Remove default billing policy","description":"Remove a configured billing scope while preserving its ledger, refusing unsettled consumption or dependent overrides with 409.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Policy not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/policies/agents/{agent_slug}":{"get":{"operationId":"getAgentCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get billing policy","description":"Get the shared policy or the exact agent_slug override, returning 404 when that scope has no policy of its own.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"agent_slug","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Policy not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"upsertAgentCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Configure billing policy","description":"Replace customer billing settings while preserving omitted plan_id and rate_card_id references; null detaches them, and a shared policy enables automatic telemetry billing.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"agent_slug","in":"path"}],"requestBody":{"description":"Upsert billing policy payload","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"minLength":1,"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"minLength":1,"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":["string","null"],"enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_wallet_id":{"type":["string","null"],"minLength":1,"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":["string","null"],"maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"settlement_interval_minutes":{"type":["integer","null"],"minimum":60,"maximum":44640,"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"minItems":1,"maxItems":8,"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"plan_id":{"type":["string","null"],"minLength":1,"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false}},"required":["mode","blocked"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteAgentCustomerBillingPolicy","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Remove billing policy","description":"Remove a configured billing scope while preserving its ledger, refusing unsettled consumption or dependent overrides with 409.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"agent_slug","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Policy not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/apply-default-plan":{"post":{"operationId":"applyAgentDefaultPlan","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Apply default billing plan","description":"Apply the workspace default to an unconfigured customer, return applied false without changes when already attached, or return 409 for another arrangement.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"boolean"},"policy":{"type":"object","properties":{"id":{"type":"string","description":"Unique Hyperline identifier for this resource.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"Hyperline customer identifier.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"wallet_id":{"type":["string","null"],"description":"Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"Public credit product identifier whose balance this policy consumes.","example":"prd_credits"},"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"overage_mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"overage_markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":"airc_overage"},"overage_rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective overage rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"plan"},"overage_wallet_id":{"type":["string","null"],"description":"Wallet charged for overage. Null bills overage in arrears.","example":"wal_example"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":[{"key":"daily","duration_minutes":1440,"included_units":"10000"}]},"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"rate_card_source":{"type":["string","null"],"enum":["policy","plan"],"description":"Source of the effective rate card. Null when no card is configured.\n\n- policy: Selected directly on the customer policy.\n- plan: Inherited from the attached plan.","example":"policy"},"plan_id":{"type":["string","null"],"description":"Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.","example":"aiplan_example"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"resolved_rate_card":{"type":["object","null"],"properties":{"fallback_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.","example":"1"},"layer_count":{"type":"number","description":"Number of pricing sources contributing to the effective card.","example":1},"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true}},"required":["fallback_per_usd","layer_count","llm_rows","item_rows","has_default_llm_row"],"description":"Summary of the effective pricing after applying rate-card inheritance. Null when no card resolves.","example":{"fallback_per_usd":"1000","layer_count":1,"llm_rows":1,"item_rows":0,"has_default_llm_row":true}},"overrides":{"type":"object","properties":{"rate_card_id":{"type":["string","null"],"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":null},"markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":null},"overage_markup_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.","example":null},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"windows":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"duration_minutes":{"type":"integer","minimum":1,"maximum":527040,"description":"Rolling allowance duration in whole minutes, from 1 through 527040.","example":1440},"included_units":{"type":"string","maxLength":40,"pattern":"^\\d+(\\.\\d+)?$","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"}},"required":["key","duration_minutes","included_units"]},"description":"Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.","example":null}},"required":["rate_card_id","markup_percent","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","windows"],"description":"Pricing, window and settlement overrides before plan inheritance; null means no override. Use these values when editing configuration.","example":{"rate_card_id":null,"markup_percent":null,"overage_markup_percent":null,"overage_rate_card_id":null,"settlement_interval_minutes":null,"settlement_schedule":null,"windows":null}},"effective_settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval after plan inheritance.","example":60},"effective_settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Settlement schedule after plan inheritance.","example":null},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"created_at":{"type":"string","format":"date-time","description":"Creation time as a UTC ISO 8601 timestamp.","example":"2026-09-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update time as a UTC ISO 8601 timestamp.","example":"2026-09-02T12:00:00Z"}},"required":["id","customer_id","agent_slug","is_default","mode","wallet_id","credit_product_id","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","overage_rate_card_source","overage_wallet_id","floor","windows","rate_card_id","rate_card_source","plan_id","settlement_interval_minutes","settlement_schedule","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","blocked","created_at","updated_at"]}},"required":["applied","policy"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found, or no default plan is set","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/balance":{"get":{"operationId":"getAgentCustomerBalance","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get billing balance","description":"Get the live shared-pool balance and agent scopes, or the effective balance for agent_slug with fallback to the shared pool.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"required":false,"description":"Agent scope identifier. Null is the customer's shared pool.","name":"agent_slug","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"mode":{"type":["string","null"],"enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"balance":{"type":"object","properties":{"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"denomination":{"type":"string","enum":["minor_units","credits","units"],"description":"Unit of account for amounts.\n\n- minor_units: Fractional minor units of the accompanying currency.\n- credits: Credit counts, without a currency.\n- units: Weighted rolling-allowance units, without a currency.","example":"minor_units"},"wallet":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Settled wallet balance, credit balance, or included allowance, in the accompanying denomination.","example":"10000"},"unsettled":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unsettled monetary consumption or used allowance units, in the accompanying denomination.","example":"12.5"},"available":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Available amount in the accompanying denomination. May be negative for a wallet.","example":"9987.5"}},"required":["currency","denomination","wallet","unsettled","available"],"description":"Current balance in the accompanying denomination.","example":{"currency":"USD","denomination":"minor_units","wallet":"10000","unsettled":"12.5","available":"9987.5"}},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"policy":{"type":["object","null"],"properties":{"markup_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.","example":"20"},"floor":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Minimum available balance a spend check requires, in the policy's denomination.","example":"0"},"settlement_interval_minutes":{"type":["number","null"],"description":"Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.","example":60}},"required":["markup_percent","floor","settlement_interval_minutes"],"description":"Billing rules resolved for this scope, or null when unconfigured.","example":null},"meters":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"included_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"},"used_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Allowance units already consumed in the current window.","example":"2500"},"remaining_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unconsumed allowance units, clamped at zero.","example":"7500"},"window_started_at":{"type":["string","null"],"format":"date-time","description":"Window started at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-02T00:00:00Z"},"resets_at":{"type":["string","null"],"format":"date-time","description":"Resets at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-03T00:00:00Z"}},"required":["key","included_units","used_units","remaining_units","window_started_at","resets_at"]},"description":"Current state of every rolling allowance window, or null outside windows mode.","example":[{"key":"daily","included_units":"10000","used_units":"2500","remaining_units":"7500","window_started_at":"2026-09-02T00:00:00Z","resets_at":"2026-09-03T00:00:00Z"}]},"credits":{"type":["object","null"],"properties":{"balance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Current balance in the accompanying denomination.","example":"10000"},"currency":{"type":"null","description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":null},"product_id":{"type":"string","description":"Public product identifier for this credit balance.","example":"prd_credits"},"low_balance_threshold":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credit balance threshold for low-balance alerts, or null when unset.","example":"1000"},"expiring_soon":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact amount in the accompanying denomination; monetary ledger amounts are fractional minor units.","example":"12.5"},"expires_at":{"type":"string","format":"date-time","description":"Credit expiry instant in UTC ISO 8601 format.","example":"2026-10-01T00:00:00Z"}},"required":["amount","expires_at"]},"description":"Credit grants expiring within 30 days. Amounts are original grants, not remaining balances.","example":[{"amount":"10000","expires_at":"2026-10-01T00:00:00Z"}]},"rate_card_summary":{"type":"object","properties":{"llm_rows":{"type":"number","description":"Number of LLM pricing rows.","example":1},"item_rows":{"type":"number","description":"Number of item rows.","example":0},"has_default_llm_row":{"type":"boolean","description":"Whether a wildcard LLM row supplies rates for otherwise unmatched models.","example":true},"fallback_credits_per_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Credits charged per USD of unmatched provider cost. Omission leaves unmatched usage unpriced.","example":"1000"}},"required":["llm_rows","item_rows","has_default_llm_row","fallback_credits_per_usd"],"description":"Summary of the pricing available to this credit balance.","example":{"llm_rows":1,"item_rows":0,"has_default_llm_row":true,"fallback_credits_per_usd":"1000"}}},"required":["balance","currency","product_id","low_balance_threshold","expiring_soon","rate_card_summary"],"description":"Credit balance and product details, or null outside credits mode.","example":null},"overage":{"type":["object","null"],"properties":{"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"active":{"type":"boolean","description":"Whether the scope has exhausted its included credits or allowance.","example":false},"unsettled":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unsettled monetary consumption or used allowance units, in the accompanying denomination.","example":"12.5"}},"required":["currency","mode","active","unsettled"],"description":"Overage policy, current boundary status and unsettled monetary balance; null in wallet mode.","example":{"currency":"USD","mode":"metered","active":false,"unsettled":"0"}},"last_settled_at":{"type":["string","null"],"format":"date-time","description":"Last settled at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-02T00:00:00Z"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"mode":{"type":"string","enum":["wallet","credits","windows"],"description":"Billing mode.\n\n- wallet: Charges a monetary wallet.\n- credits: Consumes a credit balance.\n- windows: Meters weighted units against rolling allowances.","example":"wallet"},"balance":{"type":"object","properties":{"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"denomination":{"type":"string","enum":["minor_units","credits","units"],"description":"Unit of account for amounts.\n\n- minor_units: Fractional minor units of the accompanying currency.\n- credits: Credit counts, without a currency.\n- units: Weighted rolling-allowance units, without a currency.","example":"minor_units"},"wallet":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Settled wallet balance, credit balance, or included allowance, in the accompanying denomination.","example":"10000"},"unsettled":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unsettled monetary consumption or used allowance units, in the accompanying denomination.","example":"12.5"},"available":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Available amount in the accompanying denomination. May be negative for a wallet.","example":"9987.5"}},"required":["currency","denomination","wallet","unsettled","available"],"description":"Current balance in the accompanying denomination.","example":{"currency":"USD","denomination":"minor_units","wallet":"10000","unsettled":"12.5","available":"9987.5"}},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false},"meters":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"included_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"},"used_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Allowance units already consumed in the current window.","example":"2500"},"remaining_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unconsumed allowance units, clamped at zero.","example":"7500"},"window_started_at":{"type":["string","null"],"format":"date-time","description":"Window started at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-02T00:00:00Z"},"resets_at":{"type":["string","null"],"format":"date-time","description":"Resets at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-03T00:00:00Z"}},"required":["key","included_units","used_units","remaining_units","window_started_at","resets_at"]},"description":"Current state of every rolling allowance window, or null outside windows mode.","example":[{"key":"daily","included_units":"10000","used_units":"2500","remaining_units":"7500","window_started_at":"2026-09-02T00:00:00Z","resets_at":"2026-09-03T00:00:00Z"}]},"overage":{"type":["object","null"],"properties":{"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.","example":"USD"},"mode":{"type":"string","enum":["refuse","metered"],"description":"Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.\n\n- refuse: Rejects the call that crosses the boundary without deducting usage.\n- metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.","example":"metered"},"active":{"type":"boolean","description":"Whether the scope has exhausted its included credits or allowance.","example":false},"unsettled":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unsettled monetary consumption or used allowance units, in the accompanying denomination.","example":"12.5"}},"required":["currency","mode","active","unsettled"],"description":"Overage policy, current boundary status and unsettled monetary balance; null in wallet mode.","example":{"currency":"USD","mode":"metered","active":false,"unsettled":"0"}}},"required":["agent_slug","mode","balance","blocked","meters","overage"]},"description":"Agent scopes with their own policy or consumption history.","example":[]}},"required":["agent_slug","mode","balance","blocked","policy","meters","credits","overage","last_settled_at","agents"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/windows/reset":{"post":{"operationId":"resetAgentCustomerWindows","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Reset allowance windows","description":"Close the exact scope’s open allowance windows so the next usage starts fresh; available only in windows mode.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"required":false,"description":"Agent scope identifier. Null is the customer's shared pool.","name":"agent_slug","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool.","example":"support"},"closed_windows":{"type":"number","description":"Number of closed windows.","example":1},"meters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Dimension or allowance identifier used by usage payloads and meter results.","example":"cached_input_tokens"},"included_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Weighted units included in one allowance window, as an exact decimal string.","example":"10000"},"used_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Allowance units already consumed in the current window.","example":"2500"},"remaining_units":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Unconsumed allowance units, clamped at zero.","example":"7500"},"window_started_at":{"type":["string","null"],"format":"date-time","description":"Window started at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-02T00:00:00Z"},"resets_at":{"type":["string","null"],"format":"date-time","description":"Resets at, as a UTC ISO 8601 timestamp. Null when unavailable.","example":"2026-09-03T00:00:00Z"}},"required":["key","included_units","used_units","remaining_units","window_started_at","resets_at"]},"description":"Current state of every rolling allowance window, or null outside windows mode.","example":[{"key":"daily","included_units":"10000","used_units":"2500","remaining_units":"7500","window_started_at":"2026-09-02T00:00:00Z","resets_at":"2026-09-03T00:00:00Z"}]}},"required":["agent_slug","closed_windows","meters"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Policy not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/consumption":{"get":{"operationId":"listAgentCustomerConsumption","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"List consumption","description":"List billed ledger entries with take/skip, dates and overage filters; omitted agent_slug includes all scopes and an empty string selects the shared pool.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Billing scope: an empty string selects the shared pool; omission includes all scopes.","example":"support"},"required":false,"description":"Billing scope: an empty string selects the shared pool; omission includes all scopes.","name":"agent_slug","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Filter by overage status; omission includes both ordinary and overage entries.","example":false},"required":false,"description":"Filter by overage status; omission includes both ordinary and overage entries.","name":"overage","in":"query"},{"schema":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"required":false,"description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"required":false,"description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"to","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentConsumptionEntry"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"The request conflicts with the current configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/products/{id}/rate-card":{"get":{"operationId":"getProductAiRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Get product AI rate card","description":"Get the default AI rate-card reference for a credit product, or 404 when none is attached.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string","description":"Public product identifier for this credit balance.","example":"prd_credits"},"rate_card_id":{"type":"string","description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"}},"required":["product_id","rate_card_id"]}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"setProductAiRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Set product AI rate card","description":"Attach a credits-denominated AI rate card with complete fallback pricing as the credit product's default.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rate_card_id":{"type":"string","minLength":1,"description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"}},"required":["rate_card_id"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string","description":"Public product identifier for this credit balance.","example":"prd_credits"},"rate_card_id":{"type":"string","description":"Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"}},"required":["product_id","rate_card_id"]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"clearProductAiRateCard","tags":["AI > Billing"],"security":[{"bearer":[]}],"summary":"Clear product AI rate card","description":"Detach a credit product's default AI rate card without deleting the card, or return 404 when none is attached.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/analytics":{"get":{"operationId":"getAnalytics","tags":["Analytics"],"security":[{"bearer":[]}],"summary":"Get analytics","description":"Retrieve your pre-computed account's analytics (ARR, revenues, churn, etc).","parameters":[{"schema":{"type":"string","description":"Invoicing Entity ID to filter analytics","example":"ive_47484fjdhy5"},"required":false,"description":"Invoicing Entity ID to filter analytics","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"revenue_last_30_days":{"type":"number","description":"Revenue of the last 30 days. Expressed in the currency's smallest unit."},"churn_30_days":{"type":"number","description":"Churn of the last 30 days. Churn corresponds to the number of customers who churned divided by the number of active customers. A churned customer is one who had a subscription but no longer has an active one."},"churned_revenue_30_days":{"type":"number","description":"Revenue corresponding to the churn of the last 30 days. Expressed in the currency's smallest unit."},"arr":{"type":"number","description":"Computed live Annual Recurring Revenue. Expressed in the currency's smallest unit."},"mrr":{"type":"number","description":"Computed live Monthly Recurring Revenue. Expressed in the currency's smallest unit."},"pending_arr":{"type":"number","description":"Computed pending Annual Recurring Revenue. The sum of ARR from all pending subscriptions. Expressed in the currency's smallest unit."},"active_arr":{"type":"number","description":"Computed pending Annual Recurring Revenue. The sum of ARR from all active subscriptions. Expressed in the currency's smallest unit."},"arr_in_discounts":{"type":"number","description":"Annual Recurring Revenue currently under coupons. Expressed in the currency's smallest unit."},"fixed_arr":{"type":"number","description":"Computed live Annual Recurring Revenue without the discounted amount (coupons). Expressed in the currency's smallest unit."},"active_customers":{"type":"number","description":"Number of customers with an assigned subscriptions."},"arpa":{"type":"number","description":"Average Revenue Per Account (customer)."}},"required":["revenue_last_30_days","churn_30_days","churned_revenue_30_days","arr","mrr","pending_arr","active_arr","arr_in_discounts","fixed_arr","active_customers","arpa"]}}}}}}},"/v1/approvals/requests/{id}":{"get":{"operationId":"getApprovalRequest","tags":["Approval > Requests"],"security":[{"bearer":[]}],"summary":"Get approval request","description":"Retrieve an approval request and its decisions.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}}},"403":{"description":"Access denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}},"404":{"description":"Request or approver not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}}}}},"/v1/approvals/requests/{id}/approve":{"post":{"operationId":"approveApprovalRequest","tags":["Approval > Requests"],"security":[{"bearer":[]}],"summary":"Approve request","description":"Approve the current step of an approval request.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveApprovalRequestCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}}},"400":{"description":"Invalid decision payload.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Access denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}},"404":{"description":"Request or approver not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}},"409":{"description":"Approval request or step cannot be decided in its current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}}}}},"/v1/approvals/requests/{id}/reject":{"post":{"operationId":"rejectApprovalRequest","tags":["Approval > Requests"],"security":[{"bearer":[]}],"summary":"Reject request","description":"Reject an approval request with a required comment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectApprovalRequestCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}}},"400":{"description":"Invalid decision payload.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Access denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}},"404":{"description":"Request or approver not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}},"409":{"description":"Approval request or step cannot be decided in its current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestError"}}}}}}},"/v1/approvals/workflows":{"get":{"operationId":"listApprovalWorkflows","tags":["Approval > Workflows"],"security":[{"bearer":[]}],"summary":"List approval workflows","description":"Retrieve approval workflows with optional filtering.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only return workflows matching this active state.","example":true},"required":false,"description":"Only return workflows matching this active state.","name":"is_active","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedApprovalWorkflow"}}}}}},"post":{"operationId":"createApprovalWorkflow","tags":["Approval > Workflows"],"security":[{"bearer":[]}],"summary":"Create approval workflow","description":"Create a new approval workflow.","requestBody":{"description":"Approval workflow creation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApprovalWorkflow"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalWorkflow"}}}}}}},"/v1/approvals/workflows/{id}":{"get":{"operationId":"getApprovalWorkflow","tags":["Approval > Workflows"],"security":[{"bearer":[]}],"summary":"Get approval workflow","description":"Retrieve a single approval workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalWorkflow"}}}},"404":{"description":"Approval workflow not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateApprovalWorkflow","tags":["Approval > Workflows"],"security":[{"bearer":[]}],"summary":"Update approval workflow","description":"Update an existing approval workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Approval workflow update payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApprovalWorkflow"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalWorkflow"}}}},"404":{"description":"Approval workflow not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteApprovalWorkflow","tags":["Approval > Workflows"],"security":[{"bearer":[]}],"summary":"Delete approval workflow","description":"Delete an existing approval workflow.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Approval workflow deleted."},"404":{"description":"Approval workflow not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/audit-logs":{"get":{"operationId":"listAuditLogs","tags":["Audit logs"],"security":[{"bearer":[]}],"summary":"List audit logs","description":"Retrieve audit logs sorted by happened_at descending, with happened_at filters for event time and created_at filters for recording time, including backdated events.","parameters":[{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"happened_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gte","in":"query"},{"schema":{"type":"string","description":"Return only entries attached to this customer ID.","example":"cus_Typ0px2W0aiEtl"},"required":false,"description":"Return only entries attached to this customer ID.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"Return only entries attached to this subscription ID.","example":"sub_amiaWZ3lzDIWaoT"},"required":false,"description":"Return only entries attached to this subscription ID.","name":"subscription_id","in":"query"},{"schema":{"type":"string","description":"Return only entries attached to this invoice ID.","example":"inv_1eTaiytfA0i2Va"},"required":false,"description":"Return only entries attached to this invoice ID.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"Return only entries attached to this quote ID.","example":"quo_1eTaiytfA0i2Va"},"required":false,"description":"Return only entries attached to this quote ID.","name":"quote_id","in":"query"},{"schema":{"type":"string","description":"Return only entries attached to this transaction ID.","example":"tra_1eTaiytfA0i2Va"},"required":false,"description":"Return only entries attached to this transaction ID.","name":"transaction_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedAuditLog"}}}}}}},"/v1/bank-accounts":{"get":{"operationId":"listBankAccounts","tags":["Bank Accounts"],"security":[{"bearer":[]}],"summary":"List bank accounts","description":"Retrieve existing bank accounts.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBankAccount"}}}}}}},"/v1/bank-accounts/{id}":{"get":{"operationId":"getBankAccount","tags":["Bank Accounts"],"security":[{"bearer":[]}],"summary":"Get bank account","description":"Retrieve a specific bank account by ID.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"anyOf":[{"$ref":"#/components/schemas/StandardBankAccount"},{"$ref":"#/components/schemas/ConnectedBankAccount"}]}]}}}},"404":{"description":"Bank account not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/bank-accounts/{id}/transactions":{"get":{"operationId":"listBankAccountTransactions","tags":["Bank Accounts"],"security":[{"bearer":[]}],"summary":"List bank transactions","description":"Retrieve transactions for a specific connected bank account.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedBankAccountTransaction"}}}},"404":{"description":"Bank account not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/versions":{"get":{"operationId":"listCatalogVersions","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"List catalog versions","description":"Retrieve the product catalog versions: the pending draft followed by published versions. Requires catalog versioning to be enabled.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogVersion"}}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/versions/draft":{"get":{"operationId":"getCatalogDraft","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Get catalog draft","description":"Retrieve the pending catalog draft, or null when no draft exists.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CatalogVersion"},{"type":["object","null"]}]}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"createCatalogDraft","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Create catalog draft","description":"Create the pending draft from the current live catalog. Returns the existing draft when one is already pending.","requestBody":{"description":"Optional metadata to attach to the pending catalog draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCatalogDraft"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVersion"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"discardCatalogDraft","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Discard catalog draft","description":"Archive the pending catalog draft without applying its changes.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVersion"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"No pending draft.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/versions/draft/publish":{"post":{"operationId":"publishCatalogDraft","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Publish catalog draft","description":"Apply the pending draft to the live catalog and mark it as a published version.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublishResult"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"No pending draft.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/versions/{id}":{"get":{"operationId":"getCatalogVersion","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Get catalog version","description":"Retrieve a single catalog version.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVersion"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/versions/{id}/revert":{"post":{"operationId":"revertCatalogVersion","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Revert catalog version","description":"Publish a new catalog version restoring the state of a previous published version (revert). Fails while a draft is pending.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVersion"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/catalog/export":{"get":{"operationId":"exportCatalog","tags":["Catalog"],"security":[{"bearer":[]}],"summary":"Export catalog","description":"Export the live product catalog resources for the authenticated organisation.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogSnapshot"}}}},"403":{"description":"Catalog versioning not enabled.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/companies":{"get":{"operationId":"listCompanies","tags":["Companies"],"security":[{"bearer":[]}],"summary":"List companies","description":"Retrieve all companies that the authentication token has access to.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCompany"}}}}}},"post":{"operationId":"createCompany","tags":["Companies"],"security":[{"bearer":[]}],"summary":"Create company","description":"Create a company with an approved account owner and company creation enabled, returning 403 if the owner is unapproved.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Company name.","example":"Acme"},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["name","address"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Company ID.","example":"cli_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Company name.","example":"Acme"},"logo_url":{"type":["string","null"],"description":"Logo URL of the default invoicing entity."},"favicon_url":{"type":["string","null"],"description":"Favicon URL of the default invoicing entity."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["id","name","logo_url","favicon_url","address"]}}}}}}},"/v1/contracts/clauses":{"get":{"operationId":"listContractClauses","tags":["Contracts > Clauses"],"security":[{"bearer":[]}],"summary":"List contract clauses","description":"Retrieve the contract clauses of the contract library.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedContractClause"}}}}}},"post":{"operationId":"createContractClause","tags":["Contracts > Clauses"],"security":[{"bearer":[]}],"summary":"Create contract clause","description":"Create a contract clause in the contract library.","requestBody":{"description":"Contract clause creation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractClause"}}}},"responses":{"201":{"description":"Contract clause created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractClause"}}}},"400":{"description":"Invalid contract clause.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/contracts/clauses/{id}":{"get":{"operationId":"getContractClause","tags":["Contracts > Clauses"],"security":[{"bearer":[]}],"summary":"Get contract clause","description":"Retrieve a contract clause of the contract library.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractClause"}}}},"404":{"description":"Contract clause not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateContractClause","tags":["Contracts > Clauses"],"security":[{"bearer":[]}],"summary":"Update contract clause","description":"Update a contract clause of the contract library, without changing the clause text of quotes already created.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Contract clause update payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractClause"}}}},"responses":{"200":{"description":"Contract clause updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractClause"}}}},"400":{"description":"Invalid contract clause.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Contract clause not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteContractClause","tags":["Contracts > Clauses"],"security":[{"bearer":[]}],"summary":"Delete contract clause","description":"Delete a contract clause from the contract library, without removing it from quotes already created.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Contract clause deleted."},"404":{"description":"Contract clause not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/contracts/documents":{"get":{"operationId":"listContractDocuments","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"List contract documents","description":"Retrieve the contract documents (terms of service, DPA, SLA...) of the contract library.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedContractDocument"}}}}}},"post":{"operationId":"createContractDocument","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Create contract document","description":"Create a contract document in the contract library.","requestBody":{"description":"Contract document creation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractDocument"}}}},"responses":{"201":{"description":"Contract document created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"description":"Invalid contract document.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/contracts/documents/{id}":{"get":{"operationId":"getContractDocument","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Get contract document","description":"Retrieve a contract document of the contract library.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"404":{"description":"Contract document not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateContractDocument","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Update contract document","description":"Update the name or invoicing entities of a contract document.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Contract document update payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractDocument"}}}},"responses":{"200":{"description":"Contract document updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"description":"Invalid contract document.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Contract document not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteContractDocument","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Delete contract document","description":"Delete a contract document from the contract library, without removing it from quotes already created.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Contract document deleted."},"404":{"description":"Contract document not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/contracts/documents/{id}/contents":{"post":{"operationId":"createContractDocumentContent","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Create contract document content","description":"Add the files of a contract document for a language and countries, as a multipart form. At least one file is required. Send the files in the `files` field: PDF or Word, 5 MB max each, 10 max. Word documents are converted to PDF.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Contract document content creation payload.","content":{"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateContractDocumentContent"},{"type":"object"}]}}}},"responses":{"201":{"description":"Contract document content created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocumentContent"}}}},"400":{"description":"Invalid contract document content.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Contract document not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/contracts/documents/{id}/contents/{contentId}":{"put":{"operationId":"updateContractDocumentContent","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Update contract document content","description":"Update the language, countries or files of a contract document content, as a multipart form. Sent files replace all existing files of the content; without files, they are kept. Quotes already created keep their files. Send the files in the `files` field: PDF or Word, 5 MB max each, 10 max. Word documents are converted to PDF.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"contentId","in":"path"}],"requestBody":{"description":"Contract document content update payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractDocumentContent"}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateContractDocumentContent"},{"type":"object"}]}}}},"responses":{"200":{"description":"Contract document content updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocumentContent"}}}},"400":{"description":"Invalid contract document content.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Contract document content not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteContractDocumentContent","tags":["Contracts > Documents"],"security":[{"bearer":[]}],"summary":"Delete contract document content","description":"Delete a content of a contract document, without removing its files from quotes already created.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"contentId","in":"path"}],"responses":{"204":{"description":"Contract document content deleted."},"404":{"description":"Contract document content not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/coupons":{"get":{"operationId":"listCoupons","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"List coupons","description":"Retrieve existing coupons.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCoupon"}}}}}},"post":{"operationId":"createCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Create coupon","description":"Create a new coupon.","requestBody":{"description":"Create coupon payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCoupon"}}}},"responses":{"201":{"description":"The newly created coupon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}}}}},"/v1/coupons/{id}":{"get":{"operationId":"getCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Get coupon","description":"Retrieve the details of an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Coupon"},{"type":"object","properties":{"deletedAt":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `deleted_at`.","example":null,"deprecated":true}},"required":["deletedAt"]}]}}}},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Update coupon","description":"Update the details of an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCoupon"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Delete coupon","description":"Delete an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Coupon deleted"},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/promotion-codes":{"get":{"operationId":"listPromotionCodes","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"List promotion codes","description":"Retrieve existing promotion codes.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromotionCode"}}}}}},"post":{"operationId":"createPromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Create promotion code","description":"Create a new promotion code.","requestBody":{"description":"Create promotion code payload","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["integer","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["integer","null"],"minimum":1,"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"default":false,"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["code","coupon_id"]}}}},"responses":{"201":{"description":"The newly created promotion code","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}}}}},"/v1/promotion-codes/{id}":{"get":{"operationId":"getPromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Get promotion code","description":"Retrieve the details of an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updatePromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Update promotion code","description":"Update the details of an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["integer","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["integer","null"],"minimum":1,"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"default":false,"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deletePromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Delete promotion code","description":"Delete an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Promotion code deleted"},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/credits":{"get":{"operationId":"listCustomersCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List all credit products","description":"Retrieve credit products for all customers.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCredit"}}}}}}},"/v1/customers/{id}/credits":{"get":{"operationId":"listCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List credit products","description":"Retrieve credit products attached to a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCredit"}}}}}},"post":{"operationId":"createCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Create credit product","description":"Create a credit entity for a given product with an optional balance.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create credit payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredit"}}}},"responses":{"201":{"description":"Credit created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}}},"/v1/customers/{id}/credits/{productId}":{"get":{"operationId":"getCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Get credit product","description":"Retrieve the details of an existing credit product for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}},"put":{"operationId":"updateCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Update credit product","description":"Update the configuration of a customer's credit product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Update credit payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCredit"}}}},"responses":{"200":{"description":"Updated credit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}}},"/v1/customers/{id}/credits/{productId}/transactions":{"get":{"operationId":"listCustomerCreditTransactions","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List credit transactions","description":"Retrieve all credit transactions associated with a credit product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"id","in":"query"},{"schema":{"type":["string","null"],"enum":["topup","usage","expiration"]},"required":false,"name":"type","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"invoice_id","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"created_at","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/purchase":{"post":{"operationId":"purchaseCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Purchase credits","description":"Purchase a number of credits. This action generates an invoice and charges the customer's card immediately; the credits are granted only once the charge succeeds. The customer's payment method must be a card: any other payment method fails with reason `payment_method_not_supported`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit purchase payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditPurchase"}}}},"responses":{"201":{"description":"Invoice ID and balance after purchase","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string"},"new_credit_balance":{"type":"number"}},"required":["invoice_id","new_credit_balance"]}}}}}}},"/v1/customers/{id}/credits/{productId}/transactions/{transactionId}":{"patch":{"operationId":"updateCustomerCreditTopupExpiration","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Update credit topup expiration","description":"Update the expiration date of a topup credit transaction. Only non-expired topup transactions can be updated.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"requestBody":{"description":"Update credit topup expiration payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditTopupExpiration"}}}},"responses":{"200":{"description":"The updated credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/topup":{"post":{"operationId":"topupCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Topup credits","description":"Topup a number of free credits. This action will not charge the customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit topup payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditTopup"}}}},"responses":{"201":{"description":"The created credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/usage":{"post":{"operationId":"createCustomerCreditsUsage","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Create credits usage","description":"Create a usage entry for a credit product. This will impact the balance of the customer by `usage_retained`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit usage entry payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditUsage"}}}},"responses":{"201":{"description":"The created credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/portal-settings":{"get":{"operationId":"getCustomerCreditPortalSettings","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Get credit portal settings","description":"Retrieve whether a customer can buy a credit product from the customer portal, the price they pay, and the prices they can be given.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"responses":{"200":{"description":"Credit portal settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPortalSettings"}}}}}},"put":{"operationId":"updateCustomerCreditPortalSettings","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Update credit portal settings","description":"Enable or disable portal top-ups of a credit product for a customer. Enabling sets the price they pay: one of the product's price configurations, or a price of the customer's own. Enabling requires the customer's credit balance for the product (create it first, even with a 0 balance); otherwise the request fails with reason `credit_balance_required`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit portal settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditPortalSettings"}}}},"responses":{"200":{"description":"Credit portal settings after the update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPortalSettings"}}}}}}},"/v1/customers/{id}/features":{"get":{"operationId":"resolveCustomerFeatures","tags":["Customers > Features"],"security":[{"bearer":[]}],"summary":"Resolve customer features","description":"Resolve feature values for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Resolution date.","example":"2024-12-20T16:04:11Z"},"required":false,"description":"Resolution date.","name":"at","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedCustomerFeatures"}}}}}}},"/v1/customers/{id}/features/{code}":{"put":{"operationId":"setCustomerFeature","tags":["Customers > Features"],"security":[{"bearer":[]}],"summary":"Set customer feature","description":"Set a feature override for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"requestBody":{"description":"Customer feature payload.","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string","enum":["unlimited"]}],"description":"Feature value."},"reason":{"type":["string","null"],"description":"Reason associated with a customer feature override.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date of a customer feature override.","example":null}},"required":["value"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFeatureOverride"}}}}}},"delete":{"operationId":"deleteCustomerFeature","tags":["Customers > Features"],"security":[{"bearer":[]}],"summary":"Delete customer feature","description":"Delete a feature override from a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/customers/{id}/payment-methods":{"get":{"operationId":"listCustomerPaymentMethods","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"List payment methods","description":"Retrieve payment methods attached to a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPaymentMethod"}}}}}},"post":{"operationId":"createCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Create payment method","description":"Import an existing customer payment method from a connected payment provider.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentMethod"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodDetails"}}}}}}},"/v1/customers/{id}/payment-methods/{paymentMethodId}":{"get":{"operationId":"getCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Get payment method","description":"Retrieve the details of an existing customer payment method.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodDetails"}}}}}},"delete":{"operationId":"deleteCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Delete payment method","description":"Delete an existing customer payment method.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/customers/{customerId}/addresses":{"get":{"operationId":"listCustomerAddresses","tags":["Customers > Address"],"security":[{"bearer":[]}],"summary":"List addresses","description":"List active addresses: at most one billing address and multiple shipping addresses per customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAddress"}}}}}}},"post":{"operationId":"createCustomerAddress","tags":["Customers > Address"],"security":[{"bearer":[]}],"summary":"Create address","description":"Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerAddress"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddress"}}}}}}},"/v1/customers/{customerId}/addresses/{addressId}":{"patch":{"operationId":"updateCustomerAddress","tags":["Customers > Address"],"security":[{"bearer":[]}],"summary":"Update address","description":"Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"addressId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerAddress"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddress"}}}}}},"delete":{"operationId":"deleteCustomerAddress","tags":["Customers > Address"],"security":[{"bearer":[]}],"summary":"Delete address","description":"Delete an address. To delete the default shipping address, first select another shipping address or use the billing address.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"addressId","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/customers/{customerId}/shipping":{"get":{"operationId":"getCustomerShippingDestination","tags":["Customers > Shipping"],"security":[{"bearer":[]}],"summary":"Get shipping destination","description":"Get the billing or shipping destination and its resolved address object, or null if no address exists.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingDestination"}}}}}},"put":{"operationId":"setCustomerShippingDestination","tags":["Customers > Shipping"],"security":[{"bearer":[]}],"summary":"Set shipping destination","description":"Select a saved shipping address or use the billing address.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetShippingDestination"}}}},"responses":{"204":{"description":""}}}},"/v2/customers":{"get":{"operationId":"listCustomers","tags":["Customers"],"security":[{"bearer":[]}],"summary":"List customers","description":"Retrieve existing customers.","parameters":[{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["created_at","updated_at"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"type":"string","enum":["valid","invalid","mismatch","unverified","unsupported"],"description":"\nVerification status of the customer tax ID.\n\n- `valid`: Tax ID has been verified and is valid.\n- `invalid`: Tax ID has been verified and is invalid.\n- `mismatch`: Tax ID is valid but is for a different country than the customer's country.\n- `unverified`: Tax ID has not been verified yet.\n- `unsupported`: Tax ID verification for this type not supported yet.\n ","example":"valid"},"required":false,"description":"\nVerification status of the customer tax ID.\n\n- `valid`: Tax ID has been verified and is valid.\n- `invalid`: Tax ID has been verified and is invalid.\n- `mismatch`: Tax ID is valid but is for a different country than the customer's country.\n- `unverified`: Tax ID has not been verified yet.\n- `unsupported`: Tax ID verification for this type not supported yet.\n ","name":"tax_id_status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["corporate","person"]},{"type":"string","description":"corporate,person"}]},"required":false,"name":"type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["corporate","person"]},{"type":"string","description":"corporate,person"}]},"required":false,"name":"type__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","inactive","imported","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","inactive","imported","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"currency__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"currency__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"country__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"country__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"external_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"external_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"billing_email__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"billing_email__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"tax_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"tax_id__isNotNull","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["active","pending","cancelled","paused","trialing","errored","draft","none"]},{"type":"string","description":"active,pending"}]},"required":false,"name":"subscription_status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["active","pending","cancelled","paused","trialing","errored","draft","none"]},{"type":"string","description":"active,pending"}]},"required":false,"name":"subscription_status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"segment_id","in":"query"},{"schema":{"type":"string","description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is `false`, `0`, `null` or an empty string, are ignored.","example":"{\"external_item_id\":\"core_f25\"}"},"required":false,"description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is `false`, `0`, `null` or an empty string, are ignored.","name":"custom_properties","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs","transfer","external","missing","errored"]},{"type":"string","description":"card,direct_debit"}]},"required":false,"name":"payment_method_type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs","transfer","external","missing","errored"]},{"type":"string","description":"card,direct_debit"}]},"required":false,"name":"payment_method_type__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integration_entity_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedCustomer"}}}}}}},"/v2/customers/{id}":{"get":{"operationId":"getCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer","description":"Retrieve the details of an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetails"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers":{"post":{"operationId":"createCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Create customer","description":"Create a new customer.","requestBody":{"description":"Create customer payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomer"}}}},"responses":{"201":{"description":"The newly created customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetailsV1"}}}},"409":{"description":"External ID uniqueness is enforced and another active customer already uses this external ID.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/batch":{"post":{"operationId":"createCustomers","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Create customers batch","description":"Create a batch of new customers.","requestBody":{"description":"Create customers batch payload","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateCustomer"},{"type":"object","properties":{"batch_customer_id":{"type":"string","description":"A unique identifier for the customers in the batch","example":"customer-123"}},"required":["batch_customer_id"]}]},"minItems":1,"maxItems":50}},"required":["customers"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"successes":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CustomerV1"},{"type":"object","properties":{"providers":{"type":"object","properties":{"adyen":{"type":"string"},"stripe":{"type":"string"},"mollie":{"type":"string"},"gocardless":{"type":"string"},"airwallex":{"type":"string"},"paypal":{"type":"string"},"salesforce":{"type":"string"},"hubspot":{"type":"string"},"attio":{"type":"string"},"xero":{"type":"string"},"pennylane":{"type":"string"},"zoho-books":{"type":"string"},"exact-online":{"type":"string"},"quickbooks":{"type":"string"},"netsuite":{"type":"string"},"rillet":{"type":"string"},"campfire":{"type":"string"},"dualentry":{"type":"string"},"datev":{"type":"string"},"anrok":{"type":"string"},"sphere":{"type":"string"},"chargebee":{"type":"string"},"slack":{"type":"string"},"plain":{"type":"string"},"zendesk":{"type":"string"},"pylon":{"type":"string"},"intercom":{"type":"string"},"front":{"type":"string"},"helpscout":{"type":"string"},"claap":{"type":"string"},"grain":{"type":"string"},"gong":{"type":"string"},"jiminny":{"type":"string"},"modjo":{"type":"string"},"posthog":{"type":"string"}},"deprecated":true,"description":"Deprecated field, please use `integrations`."},"current_payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Default payment method of the customer. Only applies to card and direct debit."}]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."}]},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null}},"required":["providers","current_payment_method","bank_account","organisation_id","organisation_invoicing"]},{"type":"object","properties":{"batch_customer_id":{"type":"string","description":"A unique identifier for the customers in the batch","example":"customer-123"}},"required":["batch_customer_id"]}]}},"errors":{"type":"array","items":{"type":"object","properties":{"error":{},"batch_customer_id":{"type":"string"},"customer_payload":{"$ref":"#/components/schemas/CreateCustomer"}},"required":["batch_customer_id","customer_payload"]}}},"required":["successes","errors"]}}}}}}},"/v1/customers/{id}/portal":{"get":{"operationId":"getCustomerPortalUrl","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer portal","description":"Retrieve the URL of the customer portal.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}}}}},"/v1/customers/{id}":{"put":{"operationId":"updateCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Update customer","description":"Update the details of an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomer"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetailsV1"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"External ID uniqueness is enforced and another active customer already uses this external ID.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Delete customer","description":"Delete an existing customer. The customer must be archived prior to the deletion.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Customer deleted"},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/archive":{"put":{"operationId":"archiveCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Archive customer","description":"Archive an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Customer archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerV1"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/unarchive":{"put":{"operationId":"unarchiveCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Unarchive customer","description":"Unarchive an archived customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Customer unarchived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerV1"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"External ID uniqueness is enforced and another active customer already uses this external ID.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/providers-bulk-update":{"post":{"operationId":"bulkUpdateCustomersProviders","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Bulk update providers/customers mapping","description":"Bulk update providers/customers mapping, make sure to check the query response to see if all customers were updated.","parameters":[{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Sync the customer with the provider after updating the mapping. If the provider is a Payment Service Provider, the payment methods of the customers will be imported."},"required":false,"description":"Sync the customer with the provider after updating the mapping. If the provider is a Payment Service Provider, the payment methods of the customers will be imported.","name":"sync","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"provider_name":{"type":"string","enum":["mollie","stripe","gocardless","airwallex","hubspot","attio","salesforce","datev","xero","exact-online","pennylane","quickbooks","netsuite","rillet","anrok"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_account_id":{"type":["string","null"],"description":"ID of the customer on the provider side. Using a null value will reset the previously saved ID."}},"required":["customer_id","provider_name","provider_account_id"]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"successful":{"type":"number","description":"Number of record successfully updated."},"expected":{"type":"number","description":"Number of record expected to be updated."},"updated":{"type":"array","items":{"type":"string"},"description":"Customer IDs that were successfully updated."}},"required":["successful","expected","updated"]}}}},"400":{"description":"Provider mapping cannot be updated.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/taxes/rates":{"get":{"operationId":"getCustomerTaxRates","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer tax rates","description":"Retrieve the eligible tax rates for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","enum":["exempt","standard","reverse_charge","manual","not_eligible"],"description":"Tax rate scheme.\n\n- `exempt`: The customer is exempt from tax.\n- `standard`: The customer is subject to standard tax.\n- `reverse_charge`: The customer is subject to reverse charge tax.\n- `manual`: The customer tax rate is manually set.\n- `not_eligible`: The customer is not eligible for tax.\n  "},"rate":{"type":"number","description":"Tax rate percentage."}},"required":["scheme","rate"]}}}}}}}},"/v1/customers/{id}/usage":{"get":{"operationId":"listCustomerUsage","tags":["Customers > Usage"],"security":[{"bearer":[]}],"summary":"List customer usage","description":"List one usage row per aggregator for a single customer over a period. Use `GET /v1/aggregators/{id}/usage/group-by-customer` for the inverse: one row per customer for a single aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUsageItem"}}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/usage/{aggregator_id}":{"get":{"operationId":"getCustomerUsage","tags":["Customers > Usage"],"security":[{"bearer":[]}],"summary":"Get customer usage for an aggregator","description":"Get the usage of a customer for a specific aggregator over a period.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"aggregator_id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUsage"}}}},"404":{"description":"Customer or aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/usage/{aggregator_id}/timeseries":{"get":{"operationId":"getCustomerUsageTimeseries","tags":["Customers > Usage"],"security":[{"bearer":[]}],"summary":"Get customer usage timeseries","description":"Get the usage of a customer for an aggregator bucketed by month, day or hour.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"aggregator_id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.","name":"aggregator_filter_id","in":"query"},{"schema":{"type":"string","enum":["month","day","hour"],"default":"month","description":"Bucket size for the timeseries."},"required":false,"description":"Bucket size for the timeseries.","name":"group_by","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUsageTimeseries"}}}},"404":{"description":"Customer or aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/usage/{aggregator_id}/events":{"get":{"operationId":"getCustomerUsageEvents","tags":["Customers > Usage"],"security":[{"bearer":[]}],"summary":"Get customer usage events","description":"List raw billable events for a customer and a specific aggregator over a period.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"aggregator_id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-01-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date-time","description":"ISO-8601 date string.","example":"2026-02-01T00:00:00Z"},"required":true,"description":"ISO-8601 date string.","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.","name":"aggregator_filter_id","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerUsageEvent"}}}},"404":{"description":"Customer or aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/organisations":{"get":{"operationId":"listOrganisations","tags":["Organisations"],"security":[{"bearer":[]}],"summary":"List organisations","description":"Retrieve organisations with their billing details and child customer IDs.","parameters":[{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["created_at","updated_at"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedOrganisation"}}}},"400":{"description":"Invalid cursor, filters, or page exceeds 100,000 child customers.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/organisations/{id}":{"get":{"operationId":"getOrganisation","tags":["Organisations"],"security":[{"bearer":[]}],"summary":"Get organisation","description":"Retrieve the details of an existing organisation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Organisation not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"patchOrganisation","tags":["Organisations"],"security":[{"bearer":[]}],"summary":"Patch organisation","description":"Update the details of an existing organisation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchOrganisation"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Organisation not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/segments":{"get":{"operationId":"listCustomersSegments","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"List segments","description":"Retrieve all customer segments.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSegment"}}}}}},"post":{"operationId":"createCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Create segment","description":"Create a new customer segment.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]},"minItems":1}},"required":["operator","conditions"]},"minItems":1}},"required":["name","rules"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}}}}},"/v1/customers/segments/{id}":{"get":{"operationId":"getCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Get segment","description":"Retrieve the details of an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}},"404":{"description":"Segment not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Update segment","description":"Update an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]},"minItems":1}},"required":["operator","conditions"]},"minItems":1}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["active","pending","errored","expired"]}}},"required":["field","operator"],"title":"Payment method status"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","enum":["integration"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"]},"description":"Names of integrations connected to your account. A customer matches `in` when it is linked to at least one of them, and `not_in` when it is linked to none. An integration covers all its connections, such as several Stripe accounts; a disconnected one has no linked customers. Connections are resolved when the segment is saved: one added later is only included once the segment is saved again.","example":["chargebee"]}},"required":["field","operator"],"title":"Integration"},{"type":"object","properties":{"field":{"type":"string","enum":["subscription_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["draft","voided","archived","pending","trialing","active","paused","errored","cancelled"]}}},"required":["field","operator"],"title":"Subscription status"},{"type":"object","properties":{"field":{"type":"string","enum":["product_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Product ID"},{"type":"object","properties":{"field":{"type":"string","enum":["invoice_status"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["error","draft","open","to_pay","to_pay_batch","grace_period","partially_paid","paid","late","voided","closed","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"]}}},"required":["field","operator"],"title":"Invoice status"},{"type":"object","properties":{"field":{"type":"string","enum":["smart_segment.payment_risk"]},"operator":{"type":"string","enum":["in"]}},"required":["field","operator"],"title":"Smart segment"},{"type":"object","properties":{"field":{"type":"string","enum":["paid_invoice_count","paid_late_invoice_count","late_payment_rate","average_late_payment_delay_days"]},"operator":{"type":"string","enum":["eq","gt","gte","lt","lte","between"]},"value":{"type":"array","items":{"type":"number"}}},"required":["field","operator"],"title":"Payment behavior metric"},{"type":"object","properties":{"field":{"type":"string","enum":["contract_end_date","current_subscription_start_date","first_subscription_start_date","customer_created_at"]},"operator":{"type":"string","enum":["after","before","between"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Date condition"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}},"404":{"description":"Segment not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Delete segment","description":"Delete an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Segment deleted"}}}},"/v1/exports":{"post":{"operationId":"createExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Create export","description":"Prepare an export of a given type for download. You can check the export readiness status using the GET endpoint. Once the export is ready, download the export using the download endpoint.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExport"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}}}},"get":{"operationId":"listExports","tags":["Exports"],"security":[{"bearer":[]}],"summary":"List exports","description":"List previously created exports, most recent first.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExport"}}}}}}},"/v1/exports/{exportId}":{"get":{"operationId":"getExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Get export","description":"Retrieve the details of an existing export.","parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/exports/{exportId}/download":{"get":{"operationId":"downloadExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Download export","description":"Download the file associated with a specific export, returned as a downloadable file. We recommend enabling redirect following in your HTTP client.","parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"302":{"description":"Redirect to a short-lived download URL"}}}},"/v1/features":{"get":{"operationId":"listFeatures","tags":["Features"],"security":[{"bearer":[]}],"summary":"List features","description":"List feature definitions.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFeature"}}}}}},"post":{"operationId":"createFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Create feature","description":"Create a feature definition.","requestBody":{"description":"Feature creation payload.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Feature code.","example":"sso"},"name":{"type":"string","minLength":1,"description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"value_type":{"type":"string","enum":["boolean"],"description":"Type of feature value."},"default_value":{"type":["boolean","null"],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":false}},"required":["code","name","value_type","default_value"]},{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9][a-z0-9_-]*$","description":"Feature code.","example":"sso"},"name":{"type":"string","minLength":1,"description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"value_type":{"type":"string","enum":["number"],"description":"Type of feature value."},"resolution_strategy":{"type":"string","enum":["max","sum","replace"],"description":"Strategy used to combine multiple product feature values for number features.","example":"max"},"default_value":{"type":["number","null"],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":0}},"required":["code","name","value_type","resolution_strategy","default_value"]}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}}}}}},"/v1/features/{code}":{"get":{"operationId":"getFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Get feature","description":"Retrieve a feature definition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}}},"404":{"description":"Feature not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Update feature","description":"Update a feature definition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"requestBody":{"description":"Feature update payload.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"value_type":{"type":"string","enum":["boolean"]},"default_value":{"type":["boolean","null"],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":false}},"required":["value_type"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"value_type":{"type":"string","enum":["number"]},"resolution_strategy":{"type":"string","enum":["max","sum","replace"],"description":"Strategy used to combine multiple product feature values for number features.","example":"max"},"default_value":{"type":["number","null"],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":0}},"required":["value_type","resolution_strategy"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Feature name.","example":"Single sign-on"},"description":{"type":["string","null"],"description":"Feature description.","example":"Allow users to authenticate with SAML SSO."},"default_value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"null"}],"description":"Default value used when no product or customer feature value applies. Null means no default.","example":false}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}}},"404":{"description":"Feature not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Delete feature","description":"Delete an archived feature definition that is not in use.","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"204":{"description":"Feature deleted."},"400":{"description":"Feature is active or assigned to a product or customer.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Feature not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/features/{code}/archive":{"put":{"operationId":"archiveFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Archive feature","description":"Archive a feature definition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}}},"404":{"description":"Feature not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/features/{code}/unarchive":{"put":{"operationId":"unarchiveFeature","tags":["Features"],"security":[{"bearer":[]}],"summary":"Unarchive feature","description":"Unarchive a feature definition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}}},"404":{"description":"Feature not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Download file","description":"Download an existing file content.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}},"application/msword":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"format":"binary"}},"application/vnd.ms-excel":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary"}},"application/vnd.ms-powerpoint":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"format":"binary"}},"text/plain":{"schema":{"format":"binary"}},"text/csv":{"schema":{"format":"binary"}},"image/jpeg":{"schema":{"format":"binary"}},"image/png":{"schema":{"format":"binary"}},"image/gif":{"schema":{"format":"binary"}},"image/svg+xml":{"schema":{"format":"binary"}},"application/json":{"schema":{"format":"binary"}},"application/xml":{"schema":{"format":"binary"}}}}}}},"/v1/files":{"get":{"operationId":"listFiles","tags":["Files"],"security":[{"bearer":[]}],"summary":"List files","description":"Retrieve existing files.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"customer_id__isNotNull","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFile"}}}}}},"post":{"operationId":"createFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Create file","description":"Create a new file.","requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the file to be uploaded.","example":"invoice_2024.pdf"},"customer_id":{"type":"string","description":"ID of the customer to link the file to.","example":"cus_QalW2vTAdkR6IY"}},"required":["name","customer_id"]},{"type":"object"}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"File ID.","example":"fil_2QdJDDUej969ev"},"name":{"type":"string","description":"File name.","example":"invoice_2024.pdf"},"type":{"type":"string","enum":["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","csv","jpeg","png","gif","svg","json","xml"],"description":"\nFile type based on the MIME type.\n\nSupported file types:\n- `pdf`: PDF documents\n- `doc`: Microsoft Word documents (legacy)\n- `docx`: Microsoft Word documents\n- `xls`: Microsoft Excel spreadsheets (legacy)\n- `xlsx`: Microsoft Excel spreadsheets\n- `ppt`: Microsoft PowerPoint presentations (legacy)\n- `pptx`: Microsoft PowerPoint presentations\n- `txt`: Plain text files\n- `csv`: Comma-separated values files\n- `jpeg`: JPEG images\n- `png`: PNG images\n- `gif`: GIF images\n- `svg`: SVG vector images\n- `json`: JSON data files\n- `xml`: XML data files\n  ","example":"pdf"},"mimetype":{"type":"string","description":"MIME type of the file.","example":"application/pdf"},"customer_id":{"type":["string","null"],"description":"ID of the customer linked to the file.","example":"cus_QalW2vTAdkR6IY"},"summary":{"type":["string","null"],"description":"AI-generated summary of the file content"},"created_at":{"type":"string","format":"date-time","description":"Date when the file was created.","example":"2024-11-12T07:38:39.222Z"}},"required":["id","name","type","mimetype","customer_id","summary","created_at"]}}}}}}},"/v1/files/uploads":{"post":{"operationId":"createFileUpload","tags":["Files"],"security":[{"bearer":[]}],"summary":"Create file upload","description":"Stage a file upload: returns a pre-signed URL to PUT the raw file bytes to, and an upload ID usable for 24 hours.","x-hidden":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"description":"Name of the file, including its extension.","example":"SLA.docx"},"mime_type":{"type":"string","minLength":1,"description":"MIME type of the file.","example":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}},"required":["filename","mime_type"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Upload ID. Pass `{ upload_id }` in place of an inline file in MCP tools that accept files.","example":"upl_3fJk9sLmQp2xVn8R"},"upload_url":{"type":"string","description":"Pre-signed URL. Send the raw file bytes with an HTTP PUT, e.g. `curl -T SLA.docx \"<upload_url>\"`."},"method":{"type":"string","enum":["PUT"],"description":"HTTP method to use on `upload_url`."},"expires_at":{"type":"string","format":"date-time","description":"Date after which `upload_url` stops accepting uploads.","example":"2024-12-20T16:04:11Z"},"max_size_bytes":{"type":"integer","description":"Maximum accepted file size, in bytes.","example":26214400}},"required":["id","upload_url","method","expires_at","max_size_bytes"]}}}}}}},"/v1/files/uploads/{id}/download":{"get":{"operationId":"downloadFileUpload","tags":["Files"],"security":[{"bearer":[]}],"summary":"Download file upload","description":"Download the content of a staged file upload.","x-hidden":true,"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}},"application/msword":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"format":"binary"}},"application/vnd.ms-excel":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary"}},"application/vnd.ms-powerpoint":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"format":"binary"}},"text/plain":{"schema":{"format":"binary"}},"text/csv":{"schema":{"format":"binary"}},"image/jpeg":{"schema":{"format":"binary"}},"image/png":{"schema":{"format":"binary"}},"image/gif":{"schema":{"format":"binary"}},"image/svg+xml":{"schema":{"format":"binary"}},"application/json":{"schema":{"format":"binary"}},"application/xml":{"schema":{"format":"binary"}}}}}}},"/v1/files/{id}":{"delete":{"operationId":"deleteFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Delete file","description":"Delete an existing file.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/integrations/components/token":{"post":{"operationId":"createComponentToken","tags":["Integrations"],"security":[{"bearer":[]}],"summary":"Create component token","description":"Create a new token for embedded components.","requestBody":{"description":"Create component token payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComponentToken"}}}},"responses":{"201":{"description":"The newly created token","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type":{"type":"string","enum":["bearer"]}},"required":["token","token_type"]}}}}}}},"/v1/invoicing-entities":{"get":{"operationId":"listInvoicingEntities","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"List invoicing entities","description":"Retrieve existing invoicing entities.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoicingEntity"}}}}}},"post":{"operationId":"createInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Create invoicing entity","description":"Create a new invoicing entity to send invoices from.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency used for accounting purposes.","example":"USD"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","minimum":0,"description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","minimum":0,"description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"quote_footer":{"type":["string","null"],"description":"The footer text to be used in quotes.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true}},"required":["name","country","currency","accounting_currency"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","credit_note_wallet_refund_enabled","standalone_credit_note_creation_enabled","fx_conversion_display_enabled","created_at","updated_at","deleted_at"]}}}}}}},"/v1/invoicing-entities/{id}":{"get":{"operationId":"getInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Get invoicing entity","description":"Retrieve a specific invoicing entity.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","credit_note_wallet_refund_enabled","standalone_credit_note_creation_enabled","fx_conversion_display_enabled","created_at","updated_at","deleted_at"]}}}}}},"put":{"operationId":"updateInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Update invoicing entity","description":"Update an existing invoicing entity.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency used for accounting purposes.","example":"USD"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"default_payment_delay":{"type":"integer","minimum":0,"description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","minimum":0,"description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:\n- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)\n- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)\n- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)\n- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)\n\nA code or a name is accepted (e.g. `ON` or `Ontario`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.","example":"CA"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered. It cannot be changed after creation.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"credit_note_wallet_refund_enabled":{"type":"boolean","description":"When enabled and no `refund_method` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit `refund_method` always wins. Requires wallets to be enabled at the workspace level.","example":false},"standalone_credit_note_creation_enabled":{"type":"boolean","description":"Whether credit notes without an original invoice can be created under this invoicing entity. Defaults to `true`.","example":true},"fx_conversion_display_enabled":{"type":"boolean","description":"Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to `true`.","example":true},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","credit_note_wallet_refund_enabled","standalone_credit_note_creation_enabled","fx_conversion_display_enabled","created_at","updated_at","deleted_at"]}}}}}},"delete":{"operationId":"deleteInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Delete invoicing entity","description":"Soft deletes an invoicing entity. This action won't delete the associated invoices.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/agents/monitoring/analyses":{"get":{"operationId":"listMonitoringAnalyses","tags":["AI > Monitoring"],"security":[{"bearer":[]}],"summary":"List monitoring analyses","description":"Retrieve the customer health analyses produced by the monitoring agent, sorted by `created_at` descending. Filter on `customer_id` with `limit=1` to get the latest health score of a customer, or on `customer_id__in` to get the analyses of several customers at once.","parameters":[{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Set to `true` to include `total` in the response.","example":false},"required":false,"description":"Set to `true` to include `total` in the response.","name":"include_total","in":"query"},{"schema":{"type":"string","description":"Return only analyses of this customer. Accepts the Hyperline ID or your own external ID.","example":"cus_Typ0px2W0aiEtl"},"required":false,"description":"Return only analyses of this customer. Accepts the Hyperline ID or your own external ID.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"Comma-separated list of up to 100 Hyperline customer IDs. Return only analyses of these customers. Cannot be combined with `customer_id`.","example":"cus_Typ0px2W0aiEtl,cus_3Fm8vNq1ZsKdYb"},"required":false,"description":"Comma-separated list of up to 100 Hyperline customer IDs. Return only analyses of these customers. Cannot be combined with `customer_id`.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","enum":["in_progress","completed","skipped","failed"],"default":"completed","description":"Return only analyses with this status. Defaults to `completed`, the analyses that carry a score.","example":"completed"},"required":false,"description":"Return only analyses with this status. Defaults to `completed`, the analyses that carry a score.","name":"status","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only analyses created at or after this date.","example":"2026-09-01T00:00:00.000Z"},"required":false,"description":"Return only analyses created at or after this date.","name":"created_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only analyses created at or before this date.","example":"2026-09-30T23:59:59.999Z"},"required":false,"description":"Return only analyses created at or before this date.","name":"created_at__lte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedMonitoringAnalysis"}}}},"400":{"description":"Invalid cursor or customer filters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/agents/monitoring/analyses/{id}":{"get":{"operationId":"getMonitoringAnalysis","tags":["AI > Monitoring"],"security":[{"bearer":[]}],"summary":"Get monitoring analysis","description":"Retrieve one customer health analysis produced by the monitoring agent.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringAnalysis"}}}},"404":{"description":"Monitoring analysis not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/oauth/userinfo":{"get":{"operationId":"getUserInfo","tags":["OAuth2"],"security":[{"bearer":[]}],"summary":"Get user info","description":"Returns user information for the authenticated access token.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"given_name":{"type":["string","null"],"description":"User given name.","example":"John"},"family_name":{"type":["string","null"],"description":"User family name.","example":"Doe"},"name":{"type":["string","null"],"description":"User full name.","example":"John Doe"},"picture":{"type":["string","null"],"format":"uri","description":"User picture URL.","example":"https://..."},"email":{"type":"string","format":"email","description":"User email.","example":"john@doe.com"},"email_verified":{"type":"boolean","description":"Indicates if the user email is verified.","example":true}},"required":["given_name","family_name","name","picture","email","email_verified"]}}}}}}},"/oauth/authorize":{"get":{"operationId":"authorize","tags":["OAuth2"],"summary":"Authorize","description":"Initiates OAuth authorization flow.","parameters":[{"schema":{"type":"string","description":"Application's client ID."},"required":true,"description":"Application's client ID.","name":"client_id","in":"query"},{"schema":{"type":"string","description":"Name of the sign-in connection enabled for your application. Omit to use the default login flow."},"required":false,"description":"Name of the sign-in connection enabled for your application. Omit to use the default login flow.","name":"connection","in":"query"},{"schema":{"type":"string","description":"Identifier of the target API. Should be left empty by default."},"required":false,"description":"Identifier of the target API. Should be left empty by default.","name":"audience","in":"query"},{"schema":{"type":"string","description":"A space-separated list of permissions your app requires. Should be left empty by default.","example":"customers.read customers.write"},"required":false,"description":"A space-separated list of permissions your app requires. Should be left empty by default.","name":"scope","in":"query"},{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string","description":"The URL to which Hyperline will redirect the browser after authorization has been granted by the user. It must match one of the callback URL you set when registering your app."},"required":true,"description":"The URL to which Hyperline will redirect the browser after authorization has been granted by the user. It must match one of the callback URL you set when registering your app.","name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"A random string generated by your app to prevent CSRF attacks. This value will be included in the query parameter when redirecting to the `redirect_uri` after authorizing your app."},"required":true,"description":"A random string generated by your app to prevent CSRF attacks. This value will be included in the query parameter when redirecting to the `redirect_uri` after authorizing your app.","name":"state","in":"query"},{"schema":{"type":"string","description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","example":"https://api.hyperline.co/mcp"},"required":false,"description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","name":"resource","in":"query"},{"schema":{"type":"string","description":"PKCE code challenge. Required for public clients (e.g., MCP clients)."},"required":false,"description":"PKCE code challenge. Required for public clients (e.g., MCP clients).","name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256","plain"],"description":"PKCE code challenge method. S256 is recommended for security."},"required":false,"description":"PKCE code challenge method. S256 is recommended for security.","name":"code_challenge_method","in":"query"},{"schema":{"type":"string","description":"OAuth prompt parameter. MCP clients send 'consent' when requesting offline_access."},"required":false,"description":"OAuth prompt parameter. MCP clients send 'consent' when requesting offline_access.","name":"prompt","in":"query"}],"responses":{"302":{"description":""}}}},"/oauth/tokens":{"post":{"operationId":"generateTokens","tags":["OAuth2"],"summary":"Generate tokens","description":"Exchange authorization code for access token or refresh an existing token.","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"client_id":{"type":"string","description":"Application's client ID."},"client_secret":{"type":"string","description":"Application's client secret."},"resource":{"type":"string","description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","example":"https://api.hyperline.co/mcp"}},"required":["client_id"]},{"oneOf":[{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"],"description":"To exchange an auth code for an app access token, use `authorization_code`."},"code":{"type":"string","description":"The auth code received when creating the authorization."},"redirect_uri":{"type":"string","description":"Must match the value set at the `GET /authorize` endpoint."},"code_verifier":{"type":"string","description":"PKCE code verifier (RFC 7636). The original random string used to generate the code_challenge sent during authorization. Required when code_challenge was used."}},"required":["grant_type","code","redirect_uri"]},{"type":"object","properties":{"grant_type":{"type":"string","enum":["refresh_token"],"description":"To renew an app access token with a refresh token, use `refresh_token`."},"refresh_token":{"type":"string","description":"The refresh token received when creating the authorization."}},"required":["grant_type","refresh_token"]}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"Access token with which you will be able to access the Hyperline API on the organisation's behalf."},"refresh_token":{"type":"string","description":"Refresh token with which you will be able to retrieve a new access token on this endpoint. The refresh token does not expire."},"expires_in":{"type":"number","description":"The number of seconds left before the app access token expires. Be sure to renew your app access token before this reaches zero."},"token_type":{"type":"string","enum":["bearer"]}},"required":["access_token","expires_in","token_type"]}}}}}}},"/oauth/revoke":{"post":{"operationId":"revokeToken","tags":["OAuth2"],"summary":"Revoke token","description":"Revoke an access or refresh token.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Application's client ID."},"client_secret":{"type":"string","description":"Application's client secret. Required for confidential clients; omitted when revoking a workspace-bound refresh token issued to a dynamically registered public client."},"token":{"type":"string","description":"The refresh token to revoke."}},"required":["client_id","token"]}}}},"responses":{"204":{"description":"Token revoked"}}}},"/oauth/register":{"post":{"operationId":"registerClient","tags":["OAuth2"],"summary":"Register OAuth client","description":"Register a dynamic OAuth client per RFC 7591.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"description":"Array of redirect URIs for the client. Localhost, supported native app callbacks, and the HTTPS callbacks of supported MCP clients are accepted.","example":["http://localhost:3000/callback"]},"client_name":{"type":"string","description":"Human-readable name of the client.","example":"Claude Desktop"},"client_uri":{"type":"string","format":"uri","description":"URL of the client's home page."},"logo_uri":{"type":"string","format":"uri","description":"URL of the client's logo."},"scope":{"type":"string","description":"Space-separated list of requested scopes.","example":"read write"},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]},"description":"Grant types the client will use.","example":["authorization_code","refresh_token"]},"response_types":{"type":"array","items":{"type":"string","enum":["code"]},"description":"Response types the client will use.","example":["code"]},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_post"],"description":"Authentication method for token endpoint. All clients are treated as public (no secret issued)."},"software_id":{"type":"string","description":"Unique identifier for the client software."},"software_version":{"type":"string","description":"Version of the client software."},"contacts":{"type":"array","items":{"type":"string","format":"email"},"description":"Contact emails for the client developers."},"tos_uri":{"type":"string","format":"uri","description":"URL to the client's terms of service."},"policy_uri":{"type":"string","format":"uri","description":"URL to the client's privacy policy."}},"required":["redirect_uris"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Unique client identifier.","example":"dyn_abc123xyz789"},"client_id_issued_at":{"type":"number","description":"Unix timestamp when client_id was issued."},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Registered redirect URIs."},"client_name":{"type":"string","description":"Human-readable name of the client."},"client_uri":{"type":"string","description":"URL of the client's home page."},"logo_uri":{"type":"string","description":"URL of the client's logo."},"scope":{"type":"string","description":"Space-separated list of granted scopes."},"grant_types":{"type":"array","items":{"type":"string"},"description":"Grant types the client can use."},"response_types":{"type":"array","items":{"type":"string"},"description":"Response types the client can use."},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_post"],"description":"Authentication method for token endpoint."}},"required":["client_id","client_id_issued_at","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"OAuth dynamic client registration error code.","example":"invalid_redirect_uri"},"error_description":{"type":"string","description":"Human-readable OAuth dynamic client registration error.","example":"Redirect URI must use HTTPS."}},"required":["error","error_description"]}}}}}}},"/oauth/callback":{"get":{"operationId":"oauthCallback","tags":["OAuth2"],"summary":"OAuth callback","description":"Handles the authorization callback and sends the user to the consent page.","parameters":[{"schema":{"type":"string","description":"The authorization code from the authorization server."},"required":false,"description":"The authorization code from the authorization server.","name":"code","in":"query"},{"schema":{"type":"string","description":"The state parameter containing encoded client redirect info."},"required":false,"description":"The state parameter containing encoded client redirect info.","name":"state","in":"query"},{"schema":{"type":"string","description":"Error code if authorization failed."},"required":false,"description":"Error code if authorization failed.","name":"error","in":"query"},{"schema":{"type":"string","description":"Human-readable error description."},"required":false,"description":"Human-readable error description.","name":"error_description","in":"query"}],"responses":{"302":{"description":""}}}},"/v1/payments":{"post":{"operationId":"createPayment","tags":["Payments"],"security":[{"bearer":[]}],"summary":"Create payment","description":"Initiate a new payment (limited to one-time): generate an invoice and charge it directly or with a checkout session","requestBody":{"description":"Create payment payload","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["one_time"],"description":"\nPayment type.\n\n- `one_time`: One-time payment, generating one-off invoice.\n  ","example":"one_time"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_Typ0px2W0aiEtl"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name. Allow to override the value from the catalog.","example":"Product name"},"amount":{"type":"number","description":"Product unit amount. Allow to override the value from the catalog. Monetary amount in currency's smallest unit. Multiplied by `units_count` to get the line item amount."},"units_count":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Count of units of the product, as a positive integer. The line item amount is the product unit amount multiplied by this count.","example":3}},"required":["id"]},"minItems":1,"deprecated":true,"description":"Deprecated field, please use `products`."},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name. Allow to override the value from the catalog.","example":"Product name"},"amount":{"type":"number","description":"Product unit amount. Allow to override the value from the catalog. Monetary amount in currency's smallest unit. Multiplied by `units_count` to get the line item amount."},"units_count":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Count of units of the product, as a positive integer. The line item amount is the product unit amount multiplied by this count.","example":3}},"required":["id"]},"minItems":1,"description":"Products composing the related invoice."},"purchase_order":{"type":"string","description":"Purchase order added on the generated invoice."},"custom_note":{"type":"string","description":"Custom note added on the generated invoice."},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage overriding the catalog coupon value, applied to the eligible line items amount (excluding tax), between 0 (excluded) and 100. Cannot be combined with `discount_amount`.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_amount","line_item_indexes"],"title":"Inline coupon"},{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the coupon.","example":"Black Friday 2026"},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Percentage of the eligible line items amount (excluding tax) to discount, between 0 (excluded) and 100.","example":10},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["discount_percent"],"additionalProperties":false,"title":"Inline percent coupon"}]},"description":"Coupons applied to the generated invoice before the checkout is created, so the checkout email already shows the discounted amount. `line_item_indexes` refer to the position of the products in `products`. Only supported with the `checkout` charging method."}},"required":["type","customer_id"]},{"anyOf":[{"type":"object","properties":{"charging_method":{"type":"string","enum":["immediately"],"description":"\nCharging method.\n\n- `immediately`: Customer's payment method will be charged directly to pay the invoice.\n- `checkout`: Dedicated checkout page will be created for the customer to pay the invoice.\n  "},"payment_method_type":{"type":"string","enum":["transfer","external"],"description":"Type of payment method to use to pay the invoice. If not specified, the payment_method_id or the default customer payment method is used."},"payment_method_id":{"type":"string","description":"ID of the payment method to use to pay the invoice. Ignored if payment_method_type is specified.","example":"pm_1ryTrMj4TTAT1N"}},"required":["charging_method"]},{"type":"object","properties":{"charging_method":{"type":"string","enum":["checkout"],"description":"\nCharging method.\n\n- `immediately`: Customer's payment method will be charged directly to pay the invoice.\n- `checkout`: Dedicated checkout page will be created for the customer to pay the invoice.\n  "},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated"]},"minItems":1},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email"},"customMessage":{"type":"string"}},"required":["email"],"description":"Details to send email to the payer receiving the checkout."},"redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user after the completion of the checkout."},"cancelled_redirect_url":{"type":"string","format":"uri","description":"URL to which Hyperline redirects the user opening the checkout link once the checkout is cancelled, instead of the expired checkout page. Overrides the account-wide cancelled checkout redirect URL. `checkout_id`, `customer_id` and `invoice_id` are appended as query parameters."}},"description":"Only applies to `checkout` charging method."}},"required":["charging_method","available_payment_methods"]}]}]}}}},"responses":{"200":{"description":"The reference to the created invoice and optionally the checkout","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","description":"Created invoice ID."},"checkout":{"type":"object","properties":{"id":{"type":"string","description":"Checkout session ID."},"url":{"type":"string","description":"URL of the hosted Hyperline checkout page. Only defined if the status is `opened`."}},"required":["id","url"],"description":"Payment checkout session."}},"required":["invoice_id"]}}}}}}},"/v1/price-books":{"get":{"operationId":"listPriceBooks","tags":["Price books"],"security":[{"bearer":[]}],"summary":"List price books","description":"Retrieve existing price books.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPriceBook"}}}}}},"post":{"operationId":"createPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Create price book","description":"Create a new price book.","requestBody":{"description":"Create price book payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceBook"}}}},"responses":{"201":{"description":"The newly created price book.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}}}}},"/v1/price-books/{id}":{"get":{"operationId":"getPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Get price book","description":"Retrieve the details of an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updatePriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Update price book","description":"Update the details of an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update price book payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePriceBook"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deletePriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Delete price book","description":"Delete an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Price book deleted."},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-books/{id}/products":{"post":{"operationId":"addProductsToPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Add products to price book","description":"Add products to a price book by copying their default price configurations.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Product IDs to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProductsToPriceBook"}}}},"responses":{"204":{"description":"Products added to price book."},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-books/{id}/products/{productId}":{"delete":{"operationId":"deleteProductFromPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Remove product from price book","description":"Remove a product and its price configurations from a price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"responses":{"204":{"description":"Product removed from price book."},"404":{"description":"Price book or product not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products/{id}/features":{"get":{"operationId":"listProductFeatures","tags":["Products > Features"],"security":[{"bearer":[]}],"summary":"List product features","description":"List feature values assigned to a product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductFeature"}}}}}}}},"/v1/products/{id}/features/{code}":{"put":{"operationId":"setProductFeature","tags":["Products > Features"],"security":[{"bearer":[]}],"summary":"Set product feature","description":"Set a feature value for a product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"requestBody":{"description":"Product feature payload.","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string","enum":["unlimited"]}],"description":"Feature value."}},"required":["value"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeature"}}}}}},"delete":{"operationId":"deleteProductFeature","tags":["Products > Features"],"security":[{"bearer":[]}],"summary":"Delete product feature","description":"Delete a feature value from a product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"code","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/products":{"get":{"operationId":"listProducts","tags":["Products"],"security":[{"bearer":[]}],"summary":"List products","description":"Retrieve existing products including bundle items and the first 50 price configurations per product; paginate through `GET /v1/price-configurations` filtered by `product_id` to retrieve all configurations.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"description__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"description__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"},{"schema":{"type":"string","description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. A slug that matches no custom property returns a `400` error.","example":"{\"external_item_id\":\"core_f25\"}"},"required":false,"description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. A slug that matches no custom property returns a `400` error.","name":"custom_properties","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProduct"}}}}}},"post":{"operationId":"createProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Create product","description":"Create a new product.","requestBody":{"description":"Create product payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProduct"}}}},"responses":{"201":{"description":"The newly created product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}}}},"/v1/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Get product","description":"Retrieve the details of an existing product. Only the first 50 price configurations are returned, to retrieve all of them use `GET /v1/price-configurations`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}}},"put":{"operationId":"updateProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Update product","description":"Update the details of an existing product; a product imported from a billing provider only accepts changes to `description`, `accounting` and `custom_properties`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update product payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"public_description":{"type":["string","null"],"maxLength":5000,"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"],"maxLength":5000}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean"},"is_available_on_subscription":{"type":"boolean"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]}},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"}},"required":["name"]}}}},"responses":{"200":{"description":"The newly created product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Delete product","description":"Delete an archived product that is not in use.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Product deleted."},"400":{"description":"Product is active or is attached to another resource.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products/{id}/archive":{"put":{"operationId":"archiveProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Archive product","description":"Archive an existing product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products/{id}/unarchive":{"put":{"operationId":"unarchiveProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Unarchive product","description":"Unarchive an archived product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product unarchived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-configurations":{"get":{"operationId":"listPriceConfigurations","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"List price configurations","description":"Retrieve existing price configurations.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"price_book_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"price_book_id__isNotNull","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPriceConfiguration"}}}}}},"post":{"operationId":"createPriceConfiguration","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Create price configuration","description":"Create a new price configuration on an existing product.","requestBody":{"description":"Create price configuration payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceConfiguration"}}}},"responses":{"201":{"description":"The newly created price configuration","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PriceConfiguration"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]}]}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-configurations/{id}":{"get":{"operationId":"getPriceConfiguration","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Get price configuration","description":"Retrieve the details of an existing price configuration.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The requested price configuration.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PriceConfiguration"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]}]}}}},"404":{"description":"Price configuration not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deletePriceConfiguration","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Delete price configuration","description":"Delete an existing price configuration.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/price-configurations/{id}/prices":{"put":{"operationId":"updatePrices","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Update prices","description":"Update prices of an existing price configuration.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Prices payload","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreatePrice"},"description":"New price tiers, replacing the existing ones. Their type must match the price configuration type; a fee price configuration accepts a single price."}}}},"responses":{"200":{"description":"The updated price configuration","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PriceConfiguration"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["volume"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["packaged"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bulk"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bps"]},"aggregator_filter_id":{"type":["string","null"],"description":"ID of the metering filter attached to this price configuration."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","aggregator_filter_id","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated, use `countries`. The single country this price configuration is eligible in, or `null` when it applies to every country — or to several, which this field cannot express.","example":"FR","deprecated":true},"countries":{"type":["array","null"],"items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"description":"Countries this price configuration is eligible in. `null` means it applies to every country; an empty array means it applies only to customers that have no country set."},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this price configuration in external providers."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","countries","plan_id","billing_interval","commitment_interval","updated_at","archived_at","integrations","type","allow_on_portal","prices"],"title":"Bundle"}]}]}}}}}}},"/v1/quotes":{"post":{"operationId":"createQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Create quote","description":"Create a new quote.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuote"}},"multipart/form-data":{"schema":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft","approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n  ","example":"draft"},"owner_email":{"type":"string","format":"email","description":"Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation. If not specified, the Hyperline account owner will be assigned.","example":"joe@acme.com"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price every product of the quote from, instead of the live products catalog. A product's own `catalog_version_id` takes precedence, and explicit `prices` always win over both.","example":"pcv_9x8v7u6t5s4r"},"comments":{"type":"string","description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":"string","description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"amount":{"type":["number","null"],"description":"Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored — the amount is always derived from the linked invoice's `amount_excluding_tax`.","example":20000},"contract_value":{"type":["number","null"],"description":"What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for `subscription` and `subscription_update` quotes, unless set manually. Not set on `one_off` quotes. When specified, overrides the computed value.","example":18000},"collect_payment_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"contract_clause_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the contract clauses used in the quote terms.","example":["ccl_QalW2vTAdkR6IY"]},"require_tax_id":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"anyOf":[{"type":"string","enum":["all","matching","none"]},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display per-phase value breakdown on the quote.","example":false},"display_discounts_on_total":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.","example":false},"display_first_invoice_amount":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display attached documents in the quote preview.","example":false},"subscription_update_display":{"type":"string","enum":["quote_update_details","subscription_details","both"],"description":"Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.","example":"quote_update_details"},"display_subscription_on_update":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"deprecated":true,"description":"Deprecated. Use subscription_update_display. False displays quote update details; true displays both sections.","example":false},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"When `true`, the invoice issued after signature stays in `draft` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to `false`.","example":false},"automatically_start_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, please use the phase activation strategy `quote_signature` instead.","example":true,"deprecated":true}},"required":["customer_id"]},{"anyOf":[{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the quote template. If not specified, a subscription configuration or an `invoice` payload must be defined.","example":"quot_9hNWq4c84Z146W"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"Subscription configuration constituting the quote."}},"required":["template_id"],"title":"From a template"},{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."},"estimated_count":{"type":["number","null"],"minimum":0,"maximum":1000000000000,"description":"Estimated number of units, for recurring usage-based and connected seat products (ignored on any other product, and not priced for a usage-based product with several filtered price groups). It prices the quote value and is shown as an estimate on the quote, but is never billed: invoices use the measured usage or seat count.","example":200}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}}],"description":"Subscription configuration constituting the quote."}},"required":["expires_at","subscription"],"title":"Custom"},{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"invoice":{"$ref":"#/components/schemas/CreateQuoteInvoice"}},"required":["expires_at","invoice"],"title":"One-off"}]},{"type":"object"}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedQuote"}}}}}},"get":{"operationId":"listQuotes","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"List quotes","description":"Retrieve existing quotes.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","draft","pending_approval","changes_requested","approved","pending_signature","expired","signed","voided"]},{"type":"string","description":"all,draft"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","draft","pending_approval","changes_requested","approved","pending_signature","expired","signed","voided"]},{"type":"string","description":"all,draft"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"template_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"template_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"crm_opportunity_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"crm_opportunity_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedQuote"}}}}}}},"/v1/quotes/templates":{"get":{"operationId":"listQuoteTemplates","tags":["Quotes > Templates"],"security":[{"bearer":[]}],"summary":"List quote templates","description":"Retrieve existing quote templates.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_template_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedQuoteTemplate"}}}}}}},"/v1/quotes/templates/{id}":{"get":{"operationId":"getQuoteTemplate","tags":["Quotes > Templates"],"security":[{"bearer":[]}],"summary":"Get quote template","description":"Retrieve the details of an existing quote template.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteTemplate"}}}},"404":{"description":"Quote template not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}":{"get":{"operationId":"getQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Get quote","description":"Retrieve the details of an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Update quote","description":"Update an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"\nUpdate quote payload.\n\nThis endpoint updates quote-level fields before a quote is finalized. On draft quotes, pass `subscription` to create or replace the draft subscription configuration attached to the quote, or pass `invoice` on a one-off quote to delete the previous draft invoice and create a fresh one linked to the quote. The `subscription` and `invoice` payloads use the same shape as quote creation.\n\nDraft quote subscription configuration must be updated through this endpoint, not `PUT /v2/subscriptions/{subscription_id}`. Keep phase and contract activation strategies compatible with the quote signature flow, such as `quote_signature` for phases that start on quote signature. Do not switch the quote flow to `checkout`, because checkout activation is a separate flow and requires a checkout session.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuote"}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateQuote"},{"type":"object"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/duplicate":{"post":{"operationId":"duplicateQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Duplicate quote","description":"Create a draft duplicate of an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/download":{"get":{"operationId":"downloadQuote","tags":["Quotes"],"summary":"Download quote","description":"Download an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^(fr|en|de|it|lt|nl|es|pt|pl)-[A-Z]{2}$","description":"Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.","example":"fr-FR"},"required":false,"description":"Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.","name":"locale","in":"query"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/approve":{"post":{"operationId":"approveQuote","tags":["Quotes > Approvals"],"security":[{"bearer":[]}],"summary":"Approve quote","description":"Approve an existing quote (acting as the account owner).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/approvals":{"get":{"operationId":"getQuoteApprovals","tags":["Quotes > Approvals"],"security":[{"bearer":[]}],"summary":"Get quote approvals","description":"Retrieve quote approvals in newest-first order, currently containing one preview for draft or changes-requested quotes or one execution for other statuses.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuoteApproval"}}}}},"404":{"description":"Quote not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/finalize":{"post":{"operationId":"finalizeQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Finalize quote","description":"Finalize a draft quote by submitting it for approval or marking it approved when no approval is required.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeQuote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/redraft":{"post":{"operationId":"redraftQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Redraft quote","description":"Switch a quote that is pending approval, has changes requested, is approved or awaits signature back to draft so it can be edited again, cancelling its pending approval requests, resetting captured signatures and cancelling its electronic signature request.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/send":{"post":{"operationId":"sendQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Send quote","description":"Send an existing quote by email for signature.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendQuote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/signers":{"get":{"operationId":"listQuoteSigners","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"List quote signers","description":"Retrieve the signature workflow of a quote, step by step, with the signature status of each signer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuoteSigner"}}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"setQuoteSigners","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Set quote signers","description":"Replace the signature workflow of a quote with several signers on the customer side and optional countersigners, signing step by step.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetQuoteSigners"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuoteSigner"}}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/sign":{"post":{"operationId":"signQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Sign quote","description":"Manually mark the quote as signed externally. Built-in Hyperline signature flow won't be used.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/void":{"post":{"operationId":"voidQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Void quote","description":"Void an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidQuote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{quoteId}/files/{id}/download":{"get":{"operationId":"downloadQuoteFile","tags":["Quotes"],"summary":"Download quote file","description":"Download a file (attachment or manually signed file) attached to an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"quoteId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}},"application/msword":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"format":"binary"}},"application/vnd.ms-excel":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary"}},"application/vnd.ms-powerpoint":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"format":"binary"}},"text/plain":{"schema":{"format":"binary"}},"text/csv":{"schema":{"format":"binary"}},"image/jpeg":{"schema":{"format":"binary"}},"image/png":{"schema":{"format":"binary"}},"image/gif":{"schema":{"format":"binary"}},"image/svg+xml":{"schema":{"format":"binary"}},"application/json":{"schema":{"format":"binary"}},"application/xml":{"schema":{"format":"binary"}}}},"404":{"description":"Quote or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/refresh":{"post":{"operationId":"refreshSubscriptions","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Refresh subscriptions","description":"Triggers refresh of subscriptions usage data and related open invoices. This action is used when the automatic billing update upon ingestion option is disabled for the account.","responses":{"200":{"description":""}}}},"/v1/subscriptions/templates":{"get":{"operationId":"listSubscriptionTemplates","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"List subscription templates","description":"Retrieve existing subscription templates.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionTemplate"}}}}}},"post":{"operationId":"createSubscriptionTemplate","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Create subscription template","description":"Create a new subscription template.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"}},"required":["name"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionTemplateSimple"}}}}}}},"/v1/subscriptions/templates/{id}":{"get":{"operationId":"getSubscriptionTemplate","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Get subscription template","description":"Retrieve an existing subscription template with its configurations details.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionTemplate"}}}}}},"patch":{"operationId":"updateSubscriptionTemplate","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Update subscription template","description":"Update the name or description of a subscription template.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionTemplateSimple"}}}}}},"delete":{"operationId":"deleteSubscriptionTemplate","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Delete subscription template","description":"Delete a subscription template. Fails if a quote template depends on it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""},"400":{"description":"Template is referenced by a quote template"}}}},"/v1/subscriptions/templates/{id}/configurations":{"post":{"operationId":"createSubscriptionTemplateConfiguration","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Create subscription template configuration","description":"Add a configuration (currency/country, phases, products, contract terms) to a subscription template.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["currency","country"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."}}},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]},"description":"Phases of the subscription template configuration. A product can omit `price` and `prices` to set its price later: it is saved without prices, and applying the configuration (creating a subscription, a quote or a transition from the template) returns a 400 error until all its products are priced. Until then, create the subscription with explicit products instead, keeping `template_id` for reporting."}},"required":["phases"]}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}},"/v1/subscriptions/templates/{templateId}/configurations/{id}":{"put":{"operationId":"updateSubscriptionTemplateConfiguration","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Update subscription template configuration","description":"Replace an existing configuration for a subscription template.","parameters":[{"schema":{"type":"string"},"required":true,"name":"templateId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ES-CE","ES-ML","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["currency","country"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."}}},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]},"description":"Phases of the subscription template configuration. A product can omit `price` and `prices` to set its price later: it is saved without prices, and applying the configuration (creating a subscription, a quote or a transition from the template) returns a 400 error until all its products are priced. Until then, create the subscription with explicit products instead, keeping `template_id` for reporting."}},"required":["phases"]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"delete":{"operationId":"deleteSubscriptionTemplateConfiguration","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Delete subscription template configuration","description":"Delete a configuration from a subscription template.","parameters":[{"schema":{"type":"string"},"required":true,"name":"templateId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/subscriptions/{id}/update":{"post":{"operationId":"createSubscriptionUpdate","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription update","description":"Create an update to apply on an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdate"}}}},"responses":{"201":{"description":"Subscription update created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/update-many":{"post":{"operationId":"createSubscriptionUpdates","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription updates","description":"Create multiple updates to apply at once to an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdates"}}}},"responses":{"201":{"description":"Subscription updates created","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Cancel subscription","description":"Cancel an existing subscription, or remove the scheduled reinstatement of a cancelled one (empty body).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscription"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"400":{"description":"Invalid cancellation, e.g. the subscription is already cancelled with no scheduled reinstatement, or a body was sent to remove a scheduled reinstatement.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/reinstate":{"post":{"operationId":"reinstateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Reinstate subscription","description":"Reinstate a subscription scheduled for cancellation, or a fully-cancelled one using `reactivate_at` (a future date schedules it) and `invoicing_mode` (or `charge_line_items`) to control how the cancelled gap is invoiced.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reactivate_at":{"type":"string","format":"date-time","description":"Date a fully-cancelled subscription resumes from. May be in the past (after the cancellation date). Defaults to now. A future date schedules the reinstatement; calling again with another date reschedules it, and cancelling the subscription removes it. Ignored for scheduled-cancellation reinstatement.","example":"2024-12-20T16:04:11Z"},"invoicing_mode":{"type":"string","enum":["charge_full_period","prorate_remaining_period","resume_at_next_cycle"],"description":"How the paused/cancelled gap is invoiced when the subscription resumes. `charge_full_period`: bill the frozen periods as if never paused. `prorate_remaining_period`: skip the gap and bill the prorated remainder from the resume date. `resume_at_next_cycle` (default): skip the gap with no catch-up invoice."},"charge_line_items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the subscription product to charge. Must be a product the resume would bill.","example":"itm_FJKlqUb8COXw55"},"unit_amount":{"type":"number","minimum":0,"description":"Unit amount excluding tax, in the currency's smallest unit. Defaults to the product's amount for the resumed period, billed as one unit.","example":5000},"units_count":{"type":"integer","minimum":1,"description":"Number of units to charge at `unit_amount`. Defaults to 1. Ignored when `unit_amount` is omitted.","example":1}},"required":["product_id"]},"description":"Custom charge: bill exactly these lines on an immediate resume instead of applying `invoicing_mode`. The lines cover the stopped period (pause or cancellation date to resume date). Requires the `invoices_create` permission. Fully-cancelled subscriptions only. Not allowed with a future `reactivate_at`."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"400":{"description":"Invalid reinstatement, e.g. `charge_line_items` with a future `reactivate_at`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"The invoices_create permission is required to bill `charge_line_items`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/pause":{"post":{"operationId":"pauseSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Pause subscription","description":"Pause a subscription. If the subscription is already paused, updates its reactivation date.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reactivate_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will be automatically reactivated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. A date on or before the pause date resumes it at the next scheduled run.","example":"2024-12-20T16:04:11Z"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/activate":{"post":{"operationId":"activateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Activate subscription","description":"Manually start a subscription for the first time.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/reactivate":{"post":{"operationId":"reactivateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Reactivate subscription","description":"Reactivate a paused subscription. `reactivate_at` may be in the past (after the pause date) or in the future to schedule it; `invoicing_mode` (or `charge_line_items`) controls how the paused gap is invoiced.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reactivate_at":{"type":"string","format":"date-time","description":"Date the subscription resumes from. May be in the past (after the pause date). Defaults to now. A future date schedules the reactivation.","example":"2024-12-20T16:04:11Z"},"invoicing_mode":{"type":"string","enum":["charge_full_period","prorate_remaining_period","resume_at_next_cycle"],"description":"How the paused/cancelled gap is invoiced when the subscription resumes. `charge_full_period`: bill the frozen periods as if never paused. `prorate_remaining_period`: skip the gap and bill the prorated remainder from the resume date. `resume_at_next_cycle` (default): skip the gap with no catch-up invoice."},"charge_line_items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the subscription product to charge. Must be a product the resume would bill.","example":"itm_FJKlqUb8COXw55"},"unit_amount":{"type":"number","minimum":0,"description":"Unit amount excluding tax, in the currency's smallest unit. Defaults to the product's amount for the resumed period, billed as one unit.","example":5000},"units_count":{"type":"integer","minimum":1,"description":"Number of units to charge at `unit_amount`. Defaults to 1. Ignored when `unit_amount` is omitted.","example":1}},"required":["product_id"]},"description":"Custom charge: bill exactly these lines on an immediate resume instead of applying `invoicing_mode`. The lines cover the stopped period (pause or cancellation date to resume date). Requires the `invoices_create` permission. Not allowed with a future `reactivate_at`."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"403":{"description":"The invoices_create permission is required to bill `charge_line_items`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/renew":{"post":{"operationId":"renewSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Renew subscription","description":"\nThis action will move the subscription into the future up to a specific date (exclusive), as if the renewals had occurred. As a result, the corresponding future invoices will be generated.\n\nIf the subscription is currently pending, this action will activate it. A limit of 36 renewals applies.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewSubscription"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/simulate-updates":{"post":{"operationId":"simulateSubscriptionUpdates","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Simulate subscription updates","description":"Simulate the effect of updates on a subscription without actually applying them.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdates"}}}},"responses":{"200":{"description":"Simulation results","content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["amount"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/preview-timeline":{"get":{"operationId":"previewSubscriptionTimeline","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Preview subscription timeline","description":"Preview a subscription's upcoming billing timeline: its future lifecycle events — renewals and phase changes — in chronological order, each with the invoice document(s) it would issue, plus why the projection stopped. Amounts are best-effort estimates (metered usage is assumed to be 0). Pass `starts_at` to preview a subscription that is still pending an activation event (a manual activation, checkout, quote signature, or a manually-started contract); the projection assumes the subscription starts at that instant.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":36,"default":12,"description":"Maximum number of events to project (1–36, default 12); combined with `until`, whichever limit is reached first stops the projection."},"required":false,"description":"Maximum number of events to project (1–36, default 12); combined with `until`, whichever limit is reached first stops the projection.","name":"max_events","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only project events strictly before this instant; combined with `max_events`, whichever limit is reached first stops the projection.","example":"2024-12-20T16:04:11Z"},"required":false,"description":"Only project events strictly before this instant; combined with `max_events`, whichever limit is reached first stops the projection.","name":"until","in":"query"},{"schema":{"type":"string","format":"date-time","description":"The instant to assume the subscription starts. Only applied when the subscription is still pending an activation event (a manual activation, checkout, quote signature, or a manually-started contract) and therefore has no start date yet; the projection then assumes it starts at this instant. Ignored for a subscription that already has a known start.","example":"2024-12-20T16:04:11Z"},"required":false,"description":"The instant to assume the subscription starts. Only applied when the subscription is still pending an activation event (a manual activation, checkout, quote signature, or a manually-started contract) and therefore has no start date yet; the projection then assumes it starts at this instant. Ignored for a subscription that already has a known start.","name":"starts_at","in":"query"}],"responses":{"200":{"description":"Projected subscription timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPreviewTimeline"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/estimates":{"get":{"operationId":"listSubscriptionProductEstimates","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"List subscription estimates","description":"Retrieve the estimated quantities currently sold for the subscription's usage-based and connected seat products, resolved across the signed quotes it comes from: a later signed update quote replaces the earlier estimates from its start, so each period has a single current estimate to compare with the measured usage.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionProductEstimate"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions":{"post":{"operationId":"createSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription","description":"Create a new subscription from a plan or manually with products.","requestBody":{"description":"\nCreate subscription payload.\n\nAt least a `template_id`, a `template_configuration_id`, a set of `products`, or `phases` must be specified in addition to the required fields.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscription"}}}},"responses":{"201":{"description":"The newly created subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}},"get":{"operationId":"listSubscriptions","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"List subscriptions","description":"Retrieve existing subscriptions. By default, draft, voided, cancelled and archived subscriptions are not included (`status=all` applies the same exclusion) — pass `status=any` to list every status, or `status__in=active,cancelled` to pick the ones you need.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["checkout","contract_start_date","quote","start_date","manually"]},{"type":"string","description":"checkout,contract_start_date"}]},"required":false,"name":"activation_strategy","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["checkout","contract_start_date","quote","start_date","manually"]},{"type":"string","description":"checkout,contract_start_date"}]},"required":false,"name":"activation_strategy__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","any","inactive","active","errored","cancelled","paused","pending","draft","voided","archived"]},{"type":"string","description":"all,any"}],"description":"\nSubscription status filter.\n\n- `active`, `pending`, `paused`, `errored`, `cancelled`, `draft`, `voided`, `archived`: match that status.\n- `inactive`: shortcut for `pending` + `paused`.\n- `all`: every status except `draft`, `voided`, `cancelled` and `archived` — the same exclusion as omitting the filter.\n- `any`: every status, no exclusion.\n\nUse `status__in` with comma-separated values to combine statuses. When the filter is omitted, `draft`, `voided`, `cancelled` and `archived` subscriptions are excluded.\n"},"required":false,"description":"\nSubscription status filter.\n\n- `active`, `pending`, `paused`, `errored`, `cancelled`, `draft`, `voided`, `archived`: match that status.\n- `inactive`: shortcut for `pending` + `paused`.\n- `all`: every status except `draft`, `voided`, `cancelled` and `archived` — the same exclusion as omitting the filter.\n- `any`: every status, no exclusion.\n\nUse `status__in` with comma-separated values to combine statuses. When the filter is omitted, `draft`, `voided`, `cancelled` and `archived` subscriptions are excluded.\n","name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","any","inactive","active","errored","cancelled","paused","pending","draft","voided","archived"]},{"type":"string","description":"all,any"}],"description":"Comma-separated list of subscription statuses to include. Same values as `status`."},"required":false,"description":"Comma-separated list of subscription statuses to include. Same values as `status`.","name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"plan_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"plan_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_quote_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"original_quote_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"purchase_order__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"purchase_order__isNotNull","in":"query"},{"schema":{"type":"string","description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is `false`, `0`, `null` or an empty string, are ignored.","example":"{\"external_item_id\":\"core_f25\"}"},"required":false,"description":"Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with `__contains` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is `false`, `0`, `null` or an empty string, are ignored.","name":"custom_properties","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_drafts","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integration_entity_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"cancel_at__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"cancel_at__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"cancel_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only subscriptions whose active contract starts on or after this date.","example":"2026-01-01T00:00:00.000Z"},"required":false,"description":"Return only subscriptions whose active contract starts on or after this date.","name":"contract_start__gte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only subscriptions whose active contract starts on or before this date.","example":"2026-12-31T23:59:59.999Z"},"required":false,"description":"Return only subscriptions whose active contract starts on or before this date.","name":"contract_start__lte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only subscriptions whose active contract ends on or after this date.","example":"2026-10-01T00:00:00.000Z"},"required":false,"description":"Return only subscriptions whose active contract ends on or after this date.","name":"contract_end__gte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return only subscriptions whose active contract ends on or before this date.","example":"2026-12-31T23:59:59.999Z"},"required":false,"description":"Return only subscriptions whose active contract ends on or before this date.","name":"contract_end__lte","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Return only subscriptions whose active contract renews automatically (`true`) or not (`false`).","example":true},"required":false,"description":"Return only subscriptions whose active contract renews automatically (`true`) or not (`false`).","name":"renew_automatically","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscription"}}}}}}},"/v2/subscriptions/transitions":{"get":{"operationId":"listSubscriptionTransitions","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"List subscription transitions","description":"Retrieve existing subscription transitions.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["scheduled","draft","pending_approval","changes_requested","completed","cancelled","failed","pending_quote_signature"]},{"type":"string","description":"scheduled,draft"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["scheduled","draft","pending_approval","changes_requested","completed","cancelled","failed","pending_quote_signature"]},{"type":"string","description":"scheduled,draft"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"target_subscription_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"target_subscription_id__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"transition_date__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"transition_date__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"transitioned_at__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"transitioned_at__isNotNull","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionTransition"}}}}}},"post":{"operationId":"createSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Create subscription transition","description":"Submit a subscription transition configured from a subscription, plan, or template. A matching workflow returns it pending approval; otherwise it follows the requested schedule.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"name":{"type":"string","description":"An optional name for the transition"},"calculation_method":{"type":"string","enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"application_schedule":{"type":"string","enum":["scheduled","immediately","last_renewal"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"transition_date":{"type":"string","format":"date-time","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"target_subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]}}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"The configuration of the subscription to transition to. It is billed in the source subscription's currency, even when the customer's currency has changed: a template configuration in another currency is refused."}},"required":["source_subscription_id","application_schedule","target_subscription"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","pending_approval","changes_requested","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","last_renewal","quote_signature","scheduled_after_quote_signature"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}}}}},"/v2/subscriptions/{id}":{"get":{"operationId":"getSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Get subscription","description":"Retrieve the details of an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"include_live_billing","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","name","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","minimum_invoice_fee","minimum_invoice_fee_products","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"Phases of the subscription."},"quote":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the quote from which the subscription was created.","example":"quo_38YwqvItBH3d8a"},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","approved","pending_signature","voided","signed"],"description":"Status of the quote from which the subscription was created.","example":"signed"}},"required":["id","status"]},"plan":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV"},"name":{"type":"string","description":"Name of the plan that the subscription is linked to.","example":"My example plan"}},"required":["id","name"]},"template":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Name of the template that the subscription is linked to.","example":"My example template"},"configurationId":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}},"required":["id","name","configurationId"]},"checkout_session":{"$ref":"#/components/schemas/CheckoutSession"},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","paypal","transfer","transfer_automated","external"],"description":"Payment method type used to pay the subscription."},"payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Payment method details used to pay the subscription."}]},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T22:00:00.000Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-30T21:59:59.999Z"}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration","current_period_started_at","current_period_ends_at"],"description":"Contract terms linked to the subscription."}},"required":["phases","quote","plan","template","checkout_session","payment_method_type","payment_method","contract_terms"]},{"type":"object","properties":{"live_billing":{"$ref":"#/components/schemas/LiveBilling"}}}]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Update subscription","description":"Update configuration of a subscription including phases and products.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"\nUpdate subscription payload.\n\nThis endpoint supports comprehensive subscription updates including:\n- Basic subscription fields (name, purchase order, etc.)\n- Phase management: update current phase, create or delete pending phases\n- Product management within phases: update quantities, prices, or remove products\n- Coupon management within phases\n\nPending phases will be replaced by the ones provided in the array.\n\nNote: The payload structure matches the response from GET /v2/subscriptions/:id, allowing you to retrieve a subscription, modify it, and update it using the same structure.\n\nExample:\n- GET /v2/subscriptions/:id returns phases [A, B, C]\n- PUT /v2/subscriptions/:id with phases [A, C] will delete phase B\n- PUT /v2/subscriptions/:id with phases [A, B, C, D] will create phase D\n\nDate fields can only be updated before a subscription is active. Other fields can be updated at any time.\n\nWhen the update matches an approval workflow, the endpoint returns HTTP 202 with the current subscription. The requested update remains pending until approved.\n\nSubscriptions attached to draft quotes cannot have their configuration updated through this endpoint. Use `PATCH /v1/quotes/{id}` with the quote creation `subscription` payload shape instead.\n\nA product's billing periodicity (`payment_interval`) cannot be changed through this endpoint once the phases would share no periodicity at all, because the current billing cycle cannot then be preserved. Use `POST /v2/subscriptions/{id}/transitions` with `billing_cycle_transition_method: \"align_to_new_billing_cycle\"` and the calculation method you want instead.\n\nA phase's `billing_cycle_alignment` cannot be changed from `anniversary` to `calendar_period` through this endpoint, unless the subscription is pending and has never been invoiced. Use `POST /v2/subscriptions/{id}/transitions` instead.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscription"}}}},"responses":{"200":{"description":"The updated subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"202":{"description":"The subscription update was submitted for approval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v2/subscriptions/{id}/phases":{"get":{"operationId":"listSubscriptionPhases","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"List subscription phases","description":"Retrieve the details of the phases for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionPhase"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/{id}/phases/{phaseId}":{"get":{"operationId":"getSubscriptionPhase","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"Get subscription phase","description":"Retrieve the details of a phase for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"phaseId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: `once`, `forever`, `duration`. Can be overridden at attach time.","example":"duration"},"duration":{"type":["object","null"],"properties":{"count":{"type":"number","description":"Number of periods the coupon applies for.","example":3},"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period unit the coupon applies for. Valid values: `days`, `weeks`, `months`, `years`.","example":"months"}},"required":["count","period"],"description":"Default duration applied when `repeat` is `duration`. Required when `repeat` is `duration`, must be null otherwise.","example":{"count":3,"period":"months"}},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","repeat","duration","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied.","example":["itm_FJKlqUb8COXw55"]},"product_scope":{"type":"string","enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`.","example":"include"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Read-only key/value pairs describing where this coupon comes from, set when it was imported from a billing provider (e.g. `chargebee_discount_id`, `chargebee_duration_type`, `chargebee_period`, `chargebee_period_unit` for Chargebee). Null when the coupon was not imported. It cannot be set or changed through the API.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","product_scope","apply_at","expires_at","properties"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","name","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","minimum_invoice_fee","minimum_invoice_fee_products","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]}}}},"404":{"description":"Subscription or phase not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/{id}/refresh-seat-products":{"post":{"operationId":"refreshSubscriptionSeatProducts","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Refresh seat products","description":"Triggers 'count' updates on connected seat products within the subscription. This action will use the dataloader query to retrieve and update the number of units for each seat product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription update ID.","example":"supd_MkTDgpM6ej6f8l"},"application_schedule":{"type":"string","enum":["immediately","next_period","custom","scheduled"],"description":"\nIndicates when the subscription should be updated.\n\n- `immediately`: The subscription will be updated immediately.\n- `next_period`: The subscription will be updated at the end of the current billing period.\n- `custom`: The subscription will be updated at a custom date.\n"},"apply_at":{"type":"string","format":"date","description":"Date when the subscription should be updated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-11-30T18:24:34.496Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"],"description":"\nIndicates when the subscription should be billed.\n\n- `immediately`: The subscription will be billed immediately.\n- `next_invoice`: The subscription will be billed at the next invoice.\n- `custom`: The subscription will be billed at a custom date.\n"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"description":"\nIndicates how the products price should be calculated.\n\n- `pro_rata`: The price will be calculated proportionally to the time elapsed since the last billing period.\n- `pay_in_full`: The price will be calculated for the entire billing period.\n- `do_not_charge`: The price will not be calculated.\n"},"adjustment_amount":{"type":["number","null"],"description":"Amount to adjust the subscription price."},"subscription_id":{"type":"string","description":"Subscription ID.","example":"sub_7aWtG7Gb_fwGno"},"product_id":{"type":"string","description":"Product ID.","example":"itm_G6nU9iSC7eoDsk"},"previous_count":{"type":"number","description":"Previous count.","example":2},"new_count":{"type":"number","description":"New count.","example":7},"next_refresh_date":{"anyOf":[{"type":"string","format":"date"},{"type":"string"},{"type":"null"}],"description":"The next refresh date. Exists if your seat item is configured to be refreshed periodically.","example":null}},"required":["id","application_schedule","apply_at","payment_schedule","calculation_method","adjustment_amount","subscription_id","product_id","previous_count","new_count"]}}}}}}}},"/v2/subscriptions/{id}/next-phase":{"post":{"operationId":"transitionSubscription","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"Transition subscription to next phase","description":"Update a subscription and transition it to the next available phase.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transition_date":{"type":"string","format":"date-time","description":"Date of application of the transition. Use it if different than immediately to calculate pro-rata and display past or future dates on invoices. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v2/subscriptions/transitions/preview":{"post":{"operationId":"previewSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Preview subscription transition","description":"Preview all invoices and credit notes emitted by a subscription transition and the next renewal invoice without applying the transition.","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"transition_id":{"type":"string","description":"The ID of an existing subscription transition to preview. Use this instead of providing a full payload to preview a transition that has already been scheduled."}},"required":["transition_id"],"title":"From existing transition"},{"type":"object","properties":{"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"name":{"type":"string","description":"An optional name for the transition"},"calculation_method":{"type":"string","enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"application_schedule":{"type":"string","enum":["scheduled","immediately","last_renewal"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"transition_date":{"type":"string","format":"date-time","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"target_subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"shipping_address_id":{"type":"string","description":"Active shipping address ID belonging to the subscription customer. Omit to use the customer shipping destination: billing address or default shipping address.","example":"cad_abc123"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_refund_method":{"type":"string","enum":["wallet","original_payment_method","external"],"description":"Override the refund destination for credit notes generated by `refund_prorata` / `refund_custom` cancellation strategies. When omitted, falls back to the invoicing entity's `creditNoteWalletRefundEnabled` setting."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"Deprecated field, please use `template_id`.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Initial term"},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. If omitted at creation, the billing cycles alignment configured in the account subscription settings applies.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"minimum_invoice_fee":{"type":["number","null"],"minimum":0,"description":"Phase minimum fee in minor currency units, after discounts and before tax. Null disables it and clears the product selection.","example":10000},"minimum_invoice_fee_products":{"type":["array","null"],"items":{"type":"string"},"description":"Catalog product IDs eligible for the phase minimum fee. Null or an empty list includes all billed debit products in the phase.","example":["itm_aaaaaaaaaaaaaa"]},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"catalog_version_id":{"type":["string","null"],"description":"ID of a published catalog version to price this product from, instead of the live products catalog. Ignored when `price` or `prices` is set. The product must be priced in that version.","example":"pcv_9x8v7u6t5s4r"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `phase_duration`: For the usage contained within the subscription phase.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"children_usage_aggregation":{"type":["string","null"],"enum":["sum","max"],"description":"\nControls whether a parent organization's metered usage is billed on the combined usage of the parent and its direct children, and how per-member values are combined.\n\n- `null`: Organization-based usage is disabled. Only the subscription customer's own usage is billed.\n- `sum`: The usage values of the parent and each direct child are added together (organization total).\n- `max`: Only the single highest-consuming member (parent or one direct child) is billed.\n Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"credits_balance_auto_creation_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether to create the customer credit balance as soon as the product is added to the subscription. Defaults to the credit product's `credits_balance_auto_creation_enabled` (`true` when unset). Set to `false` to create the balance by hand before activation, e.g. on quote-based renewals where the balance must not start consuming before signature; the first top-up creates it if still missing."}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":["string","null"],"enum":["once","forever","custom","duration"],"description":"\nCoupon frequency. Required for inline coupons. Optional when an existing coupon `id` is provided: if omitted, defaults to the catalog coupon's repeat value.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":["array","null"],"items":{"type":"string"},"minItems":1,"description":"Products the coupon is scoped to on this subscription, read together with `product_scope`: the only discounted products when `include`, the products never discounted when `exclude`, null when `all`. When sent without `product_scope`, it is an `include` list, except that a coupon already stored as `exclude` keeps `exclude` when its phase is updated; when empty or omitted, the catalog coupon's scope is copied."},"product_scope":{"type":["string","null"],"enum":["all","include","exclude"],"description":"Which products the coupon discounts on this subscription. `all`: every product (`product_ids` must be empty). `include`: only the products in `product_ids`. `exclude`: every product except those in `product_ids` (lines without a product stay discounted). When sent, it replaces the catalog coupon's scope together with `product_ids`. When omitted, it is inferred: `include` if `product_ids` is non-empty, else the catalog coupon's scope. On a phase update, a coupon already stored as `exclude` keeps `exclude` when `product_ids` is sent without `product_scope`."}}}]}}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"The configuration of the subscription to transition to. It is billed in the source subscription's currency, even when the customer's currency has changed: a template configuration in another currency is refused."}},"required":["source_subscription_id","application_schedule","target_subscription"],"title":"From new payload"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"transition_documents":{"type":"array","items":{"$ref":"#/components/schemas/SimulateInvoiceDetails"},"description":"All invoices and credit notes that would be emitted at transition time, including each credit note when a proration refund is split across source invoices. Empty when no transition documents are emitted, for example with `do_not_charge`. Use each document's `type` to distinguish invoices from credit notes."},"next_invoice_after_transition":{"allOf":[{"$ref":"#/components/schemas/SimulateInvoiceDetails"},{"anyOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/InvoiceDeprecated"},{"type":"object","properties":{"public_url":{"type":["string","null"],"format":"uri","description":"Public URL of the invoice page where the customer can pay the invoice."}}}]},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["integrations"]}]},{"type":"null"}],"description":"The invoice that would be emitted at the next renewal after the transition. Null if no renewal invoice would be emitted."}]}},"required":["transition_documents","next_invoice_after_transition"]}}}}}}},"/v2/subscriptions/transitions/{id}":{"get":{"operationId":"getSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Get subscription transition","description":"Retrieve the details of an existing subscription transition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","pending_approval","changes_requested","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","last_renewal","quote_signature","scheduled_after_quote_signature"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}},"404":{"description":"Subscription transition not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/transitions/{id}/cancel":{"post":{"operationId":"cancelSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Cancel subscription transition","description":"Cancel a scheduled subscription transition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","pending_approval","changes_requested","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","last_renewal","quote_signature","scheduled_after_quote_signature"],"description":"When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved — use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) and a separate invoice for the new configuration."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}},"404":{"description":"Subscription transition not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/taxes/rates":{"get":{"operationId":"listTaxRates","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"List tax rates","description":"Retrieve existing custom and default tax rate mappings.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"name__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"description__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"description__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTaxRate"}}}}}},"post":{"operationId":"createTaxRate","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"Create tax rate","description":"Create a custom rate or a code mapping for a default rate.","requestBody":{"description":"Tax rate creation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxRate"}}}},"responses":{"201":{"description":"Tax rate created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}}},"400":{"description":"Invalid tax rate mapping.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/taxes/rates/{id}":{"get":{"operationId":"getTaxRate","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"Get tax rate","description":"Retrieve an existing custom or default tax rate mapping.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}}},"404":{"description":"Tax rate not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateTaxRate","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"Update tax rate","description":"Update an existing custom or default tax rate mapping.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Tax rate update payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxRate"}}}},"responses":{"200":{"description":"Tax rate updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}}},"400":{"description":"Invalid tax rate update.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Tax rate not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteTaxRate","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"Delete tax rate","description":"Delete an existing custom or default tax rate mapping.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Tax rate deleted."},"400":{"description":"Tax rate is currently in use.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Tax rate not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/apps":{"get":{"operationId":"listApps","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"List apps","description":"Retrieve existing third-party apps.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}}},"post":{"operationId":"createApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Create app","description":"Create a new third-party app.","requestBody":{"description":"Create app payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApp"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","properties":{"client_secret":{"type":"string","description":"OAuth client secret"}},"required":["client_secret"]}]}}}}}}},"/v1/apps/{id}":{"put":{"operationId":"updateApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Update app","description":"Update an existing third-party app.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update app payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApp"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}}}},"delete":{"operationId":"deleteApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Delete app","description":"Delete an existing third-party app.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"App deleted"}}}},"/v1/transactions":{"post":{"operationId":"createTransaction","tags":["Transactions"],"security":[{"bearer":[]}],"summary":"Create transaction","description":"Record a settled offline payment, refund, or chargeback in the customer's currency without requiring an invoice.","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Positive transaction amount in the customer's currency's smallest unit.","example":31500},"date":{"type":"string","format":"date-time","description":"Date when the offline transaction settled.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer","external"],"description":"Offline payment method: bank transfer or external payment.","example":"transfer"},"bank_account_id":{"type":"string","description":"Bank account for a transfer, in the customer's currency; not allowed for external payments.","example":"bac_2QdJDDUej969ev"},"type":{"type":"string","enum":["one_time"],"description":"Type of offline transaction to record."},"reference":{"type":"string","description":"Optional reference identifying the offline payment.","example":"PAYMENT-2026-001"}},"required":["customer_id","amount","date","payment_method_type","type"]},{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Positive transaction amount in the customer's currency's smallest unit.","example":31500},"date":{"type":"string","format":"date-time","description":"Date when the offline transaction settled.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer","external"],"description":"Offline payment method: bank transfer or external payment.","example":"transfer"},"bank_account_id":{"type":"string","description":"Bank account for a transfer, in the customer's currency; not allowed for external payments.","example":"bac_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"Type of offline transaction to record."},"original_transaction_id":{"type":"string","description":"Original payment transaction ID for a refund or chargeback.","example":"tra_2QdJDDUej969ev"}},"required":["customer_id","amount","date","payment_method_type","type"]},{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Positive transaction amount in the customer's currency's smallest unit.","example":31500},"date":{"type":"string","format":"date-time","description":"Date when the offline transaction settled.","example":"2024-11-12T07:38:39.222Z"},"type":{"type":"string","enum":["chargeback"],"description":"Type of offline transaction to record."},"original_transaction_id":{"type":"string","description":"Original payment transaction ID for a refund or chargeback.","example":"tra_2QdJDDUej969ev"}},"required":["customer_id","amount","date","type","original_transaction_id"]}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback External failed"}]}}}},"400":{"description":"Invalid offline transaction.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Customer, bank account, or original transaction not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"get":{"operationId":"listTransactions","tags":["Transactions"],"security":[{"bearer":[]}],"summary":"List transactions","description":"Retrieve transactions across all invoices and transactions without an invoice allocation.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTransaction"}}}}}}},"/v1/transactions/{id}":{"delete":{"operationId":"deleteTransaction","tags":["Transactions"],"security":[{"bearer":[]}],"summary":"Delete transaction","description":"Delete an offline transaction with no invoice allocations, wallet funding, or dependent transactions.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":""},"400":{"description":"Transaction cannot be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Transaction not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"get":{"operationId":"getTransaction","tags":["Transactions"],"security":[{"bearer":[]}],"summary":"Get transaction","description":"Retrieve the details of an existing transaction.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Payment External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Payment External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Refund External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"refund"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Refund External failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Chargeback External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"chargeback"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice receiving the allocated amount.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"number","description":"Transaction amount allocated to the invoice, in the currency's smallest unit.","example":31500}},"required":["invoice_id","amount"]},"description":"Invoice allocations currently associated with the transaction."}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","integrations","allocations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Chargeback External failed"}]}}}},"404":{"description":"Transaction not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/transactions/{id}/refund":{"post":{"operationId":"refundTransaction","tags":["Transactions"],"security":[{"bearer":[]}],"summary":"Refund transaction","description":"Refund a settled banking transaction for its full amount. The related invoice will switch back to to pay status. Use the create credit note endpoint if you want to cancel (and optionally refund) the initial invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The created refund transaction.","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Card/debit"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"Payment method type used for the transaction."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Card/debit failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Transfer"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"],"description":"Payment method type used for the transaction."},"bank_account":{"$ref":"#/components/schemas/BankAccount"}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Transfer failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction Wallet"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"],"description":"Payment method type used for the transaction."},"wallet_id":{"type":"string","description":"ID of the wallet used for a wallet transaction.","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction Wallet failed"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]}],"title":"Transaction External"},{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund","chargeback"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n- `chargeback`: The transaction records funds withdrawn after a payment dispute.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date when the transaction was settled. For provider transactions, this is derived from provider settlement data when available.","example":"2024-11-12T07:38:39.222Z"},"created_at":{"type":"string","format":"date-time","description":"Date the transaction was recorded in Hyperline, independent of its processing date.","example":"2026-11-12T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Date the transaction or its invoice allocations were last updated in Hyperline. Use the updated_at filters to sync changes incrementally.","example":"2026-11-12T11:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"original_transaction_id":{"type":["string","null"],"description":"Original payment transaction ID for a refund or chargeback.","example":null},"reversed_at":{"type":["string","null"],"format":"date-time","description":"Date when a chargeback withdrawal was reversed.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Deprecated field. Use transactions where `type` is `chargeback`; `original_transaction_id` identifies the affected payment transaction.","deprecated":true,"example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","paypal","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","rillet","campfire","dualentry","datev","anrok","sphere","chargebee","slack","plain","zendesk","pylon","intercom","front","helpscout","claap","grain","gong","jiminny","modjo","posthog"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."},"created_at":{"type":["string","null"],"format":"date-time","description":"Creation date of the entity in the provider, when it was imported from there. Exposed on products, coupons and subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"},"activated_at":{"type":["string","null"],"format":"date-time","description":"Activation date of the entity in the provider, when it was imported from there. Exposed on subscriptions; `null` when the provider does not report one.","example":"2024-12-20T16:04:11Z"}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","settled_at","created_at","updated_at","refunded_at","original_transaction_id","reversed_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"],"description":"Payment method type used for the transaction."}},"required":["payment_method_type"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","mandate_invalid","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}],"title":"Transaction External failed"}]}}}},"404":{"description":"Transaction not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/users/roles":{"get":{"operationId":"listUserRoles","tags":["Users > Roles"],"security":[{"bearer":[]}],"summary":"List user roles","description":"Retrieve existing user roles.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserRole"}}}}}}},"/v1/users/roles/{id}":{"get":{"operationId":"getUserRole","tags":["Users > Roles"],"security":[{"bearer":[]}],"summary":"Get user role","description":"Retrieve the details of an existing user role.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"404":{"description":"User role not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/users":{"get":{"operationId":"listUsers","tags":["Users"],"security":[{"bearer":[]}],"summary":"List users","description":"Retrieve existing users.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"first_name__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"first_name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"last_name__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"last_name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUser"}}}}}}},"/v1/users/{id}":{"get":{"operationId":"getUser","tags":["Users"],"security":[{"bearer":[]}],"summary":"Get user","description":"Retrieve the details of an existing user.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/arr-history":{"get":{"operationId":"getSubscriptionArrHistory","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Get subscription ARR history","description":"List the ARR evolutions for a subscription in reverse chronological order.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return evolutions that occurred at or after this UTC date and time.","example":"2026-01-01T00:00:00Z"},"required":false,"description":"Return evolutions that occurred at or after this UTC date and time.","name":"occurred_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return evolutions that occurred at or before this UTC date and time.","example":"2026-12-31T23:59:59Z"},"required":false,"description":"Return evolutions that occurred at or before this UTC date and time.","name":"occurred_at__lte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedArrHistoryEntry"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/arr-history":{"get":{"operationId":"getCustomerArrHistory","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer ARR history","description":"List the subscription-level ARR evolutions for a customer in reverse chronological order.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"number","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Maximum number of items to return (1-100).","example":50},"required":false,"description":"Maximum number of items to return (1-100).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."},"required":false,"description":"Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page.","name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return evolutions that occurred at or after this UTC date and time.","example":"2026-01-01T00:00:00Z"},"required":false,"description":"Return evolutions that occurred at or after this UTC date and time.","name":"occurred_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Return evolutions that occurred at or before this UTC date and time.","example":"2026-12-31T23:59:59Z"},"required":false,"description":"Return evolutions that occurred at or before this UTC date and time.","name":"occurred_at__lte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedArrHistoryEntry"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/valuation":{"get":{"operationId":"getSubscriptionValuation","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Get subscription valuation","description":"Compute valuation metrics for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionValuation"}}}}}}},"/v1/quotes/{id}/valuation":{"get":{"operationId":"getQuoteValuation","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Get quote valuation","description":"Compute valuation metrics for an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionValuation"}}}}}}},"/v1/customers/{id}/valuation":{"get":{"operationId":"getCustomerValuation","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer valuation","description":"Compute aggregated valuation metrics across all active subscriptions for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerValuation"}}}}}}},"/v1/wallets/settings":{"get":{"operationId":"getWalletSettings","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Get wallet settings","description":"Retrieve the global settings of the wallets.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSettings"}}}}}},"patch":{"operationId":"updateWalletSettings","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Update wallet settings","description":"Update the global settings of the wallets.","requestBody":{"description":"Update wallet settings payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWalletSettings"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSettings"}}}}}}},"/v2/wallets":{"get":{"operationId":"listWallets","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"List wallets","description":"Retrieve existing wallets.","parameters":[{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWallet"}}}}}}},"/v1/wallets":{"post":{"operationId":"createWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Create wallet","description":"Create a new wallet.","requestBody":{"description":"Create wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWallet"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}}}}},"/v1/wallets/{id}":{"get":{"operationId":"getWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Get wallet","description":"Retrieve the details of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Update wallet","description":"Update the details of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWallet"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/wallets/{id}/load":{"post":{"operationId":"loadWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Load wallet","description":"Load free credits or paid credits from a paid invoice, an existing transaction, or a new transaction onto a wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Load wallet payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadWallet"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/wallets/{id}/transactions":{"get":{"operationId":"listWalletTransactions","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"List wallet transactions","description":"Retrieve all transactions of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","enum":["credit_free","credit_paid","debit"],"description":"Filter transactions by their type.","example":"credit_paid"},"required":false,"description":"Filter transactions by their type.","name":"type","in":"query"},{"schema":{"type":["number","null"],"description":"Filter transactions by their exact amount, expressed in the currency's smallest unit.","example":12000},"required":false,"description":"Filter transactions by their exact amount, expressed in the currency's smallest unit.","name":"amount","in":"query"},{"schema":{"type":"string","description":"Filter transactions by the invoice they are attached to.","example":"inv_QalW2vTAdkR6IY"},"required":false,"description":"Filter transactions by the invoice they are attached to.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"Filter transactions whose comment contains this value, case-insensitive.","example":"Offline payment received"},"required":false,"description":"Filter transactions whose comment contains this value, case-insensitive.","name":"comment","in":"query"}],"responses":{"200":{"description":"Paginated list of wallet transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWalletTransaction"}}}}}}},"/v1/wallets/{id}/transactions/{transactionId}/revert":{"post":{"operationId":"revertWalletLoad","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Revert wallet load","description":"Revert a credit wallet transaction. Voids its related credit note when applicable and creates a debit transaction.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"responses":{"200":{"description":"The debit transaction created by the revert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransaction"}}}},"404":{"description":"Wallet or transaction not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/webhooks/endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"List webhook endpoints","description":"Retrieve all webhook endpoints.","parameters":[{"schema":{"type":"number","minimum":1,"maximum":250},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"iterator","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWebhookEndpoint"}}}}}},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Create webhook endpoint","description":"Create a new webhook endpoint.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"secret":{"type":"string","pattern":"^[a-zA-Z0-9+/=]{32,100}$","description":"Webhook endpoint verification secret (base64 encoded random bytes). If not defined, a secret is automatically generated and only accessible in the UI."},"rate_limit":{"type":"number","description":"Webhook rate limit (per second)."},"event_types":{"type":"array","items":{"type":"string","enum":["custom_action","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","credit_note.ready","credit_note.allocations_updated","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.activated","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","feature.created","feature.updated","feature.archived","feature.recovered","feature.deleted","product.feature.assigned","product.feature.updated","product.feature.unassigned","customer.feature.assigned","customer.feature.updated","customer.feature.unassigned","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed","journal_entry.created","revrec_schedule.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]}},"required":["url"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}},"/v1/webhooks/endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Get webhook endpoint","description":"Retrieve an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}},"put":{"operationId":"updateWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Update webhook endpoint","description":"Update an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"rate_limit":{"type":"number","description":"Webhook rate limit (per second)."},"event_types":{"type":"array","items":{"type":"string","enum":["custom_action","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","credit_note.ready","credit_note.allocations_updated","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.activated","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","feature.created","feature.updated","feature.archived","feature.recovered","feature.deleted","product.feature.assigned","product.feature.updated","product.feature.unassigned","customer.feature.assigned","customer.feature.updated","customer.feature.unassigned","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed","journal_entry.created","revrec_schedule.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]}},"required":["url"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Delete webhook endpoint","description":"Delete an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/webhooks/messages":{"get":{"operationId":"listWebhookMessages","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"List webhook messages","description":"\nRetrieve all webhook messages sent.\n\nPlease note that, by default, this endpoint is limited to retrieving 90 days' worth of data relative to now. Messages that date back more than 90 days are still accessible, but their payloads are expunged.\nIf an iterator is provided, the endpoint retrieves data spanning 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the before or after parameter as appropriate.\n","parameters":[{"schema":{"type":["string","null"],"format":"date","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"},"required":false,"description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"before","in":"query"},{"schema":{"type":["string","null"],"format":"date","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"},"required":false,"description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"after","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"Event types to consider.","enum":["custom_action","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","credit_note.ready","credit_note.allocations_updated","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.activated","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","feature.created","feature.updated","feature.archived","feature.recovered","feature.deleted","product.feature.assigned","product.feature.updated","product.feature.unassigned","customer.feature.assigned","customer.feature.updated","customer.feature.unassigned","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed","journal_entry.created","revrec_schedule.completed"],"example":["customer.created"]},"required":false,"description":"Event types to consider.","name":"event_types","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":250},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"iterator","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWebhookMessage"}}}}}}}},"webhooks":{}}