{"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":"ID of the product billed by the line item.","example":"itm_KbLcWt2qm5p1S2"},"price_configuration_id":{"type":["string","null"],"description":"ID of the catalog price configuration linked to the 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":"ID of the custom tax rate applied to the 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."},"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","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.\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 issuing 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"},"created_at":{"type":"string","format":"date-time","description":"Date the invoice was created in Hyperline, including drafts and scheduled invoices issued later. For imported invoices, this is the import date. Never changes afterwards.","example":"2026-10-12T09:30:00.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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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","created_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"]},"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","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.\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 issuing 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"},"created_at":{"type":"string","format":"date-time","description":"Date the invoice was created in Hyperline, including drafts and scheduled invoices issued later. For imported invoices, this is the import date. Never changes afterwards.","example":"2026-10-12T09:30:00.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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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","created_at","updated_at","properties","custom_properties","additional_display_fields","original_invoice_id","original_invoice_number","line_items","coupons","transactions","public_url"]},"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 number 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":"ID of the product billed by the 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":"ID of the catalog price configuration linked to the 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":"ID of the catalog price configuration linked to the 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":"ID of the customer the invoice is billed to.","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","voided"],"default":"paid","description":"Status the invoice is created in. Default to `paid`.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `to_pay`: Invoice is awaiting payment. Requires `payment_method_strategy`.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice is recorded as already voided, to import an invoice voided in another system. No credit note is generated, and it cannot have transactions or a settlement date.\n","example":"paid"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity issuing 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":"ID of the 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":"ID of the 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":"ID of the bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"},"reference":{"type":"string","description":"Optional reference identifying the offline payment.","example":"PAYMENT-2026-001"}},"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":"ID of the connected provider account that processed the transaction. 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"]},"reference":{"type":"string","description":"Optional reference identifying the offline payment.","example":"PAYMENT-2026-001"}},"required":["amount","process_at"],"title":"External transaction"}]}},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"ID of the catalog coupon to apply to the invoice.","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":"ID of the product billed by the 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":"ID of the catalog price configuration linked to the 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":"ID of the product billed by the 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":"ID of the catalog price configuration linked to the 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":"ID of the catalog price configuration linked to the 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"},"due_at":{"type":"string","format":"date-time","description":"Due date of a draft invoice. Must not be before the issue date. Kept when the invoice is finalized manually, after approval or as a scheduled invoice, unless it falls before the issue date set at finalization. Any other automatic finalization recomputes it from the customer's payment delay. An invoice settled at finalization without a charge (zero amount) takes its issue date as due date.","example":"2026-11-12T00: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":"ID of the catalog coupon to apply to the invoice.","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":"ID of the reference invoice, to fill a missing one 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":"Billable event ID.","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":"Journal entry line ID."},"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":"ID of the journal entry the line belongs to."},"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":"ID of the 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":"ID of the ledger account the line is posted to."},"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":"ID of the invoice line item the line relates to."},"rule_id":{"type":["string","null"],"description":"ID of the accounting rule applied to the line."},"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":"ID of the product the line relates to."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity that owns the line."},"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":"Journal entry ID."},"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":"ID of the invoicing entity that owns the entry."},"ledger_id":{"type":"string","description":"ID of the ledger the entry belongs to."},"invoice_id":{"type":["string","null"],"description":"ID of the invoice the entry relates to."},"customer_id":{"type":["string","null"],"description":"ID of the customer the entry relates to."},"invoice_line_item_id":{"type":["string","null"],"description":"ID of the invoice line item the entry relates to."},"subscription_id":{"type":["string","null"],"description":"ID of the subscription the entry relates to."},"transaction_id":{"type":["string","null"],"description":"ID of the payment transaction the entry relates to."},"reversal_for_entry_id":{"type":["string","null"],"description":"ID of the journal entry this entry reverses. Null unless the entry is a reversal."},"schedule_id":{"type":["string","null"],"description":"ID of the revenue recognition schedule created with the 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":"Ledger ID."},"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":"ID of the invoicing entity that owns the 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 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":"ID of the ledger the close state belongs to."},"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":"ID 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":"ID of the API key used."},"app_id":{"type":["string","null"],"description":"ID of the third-party app that called the API."},"user_id":{"type":["string","null"],"description":"ID 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":"ID of the user who acted."},"api_credential_id":{"type":["string","null"],"description":"ID 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":"Ledger close event ID."},"ledger_id":{"type":"string","description":"ID of the ledger closed or reopened."},"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":"Ledger account ID."},"ledger_id":{"type":"string","description":"ID of the ledger the account belongs to."},"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":"Export ID."},"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"]},"RevenuePolicyCustomPropertyFilter":{"type":"object","properties":{"custom_field_id":{"type":"string","minLength":1,"description":"ID of the customer or subscription custom property the filter matches.","example":"cfi_9xQ1z4Ha7Gk2Lm"},"values":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Values the property must hold one of. A multi-select property matches when one of its selected values is listed; any other type matches its value as text.","example":["enterprise"]}},"required":["custom_field_id","values"]},"RevenuePolicyMatchConditions":{"type":"object","properties":{"customer_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customers whose contracts the policy governs."},"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":"Contract currencies the policy governs."},"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":"Customer countries the policy governs."},"product_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the products of which a contract must hold at least one for the policy to govern it."},"customer_segment_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer segments of which the contract's customer must belong to at least one for the policy to govern it. Optional on create and update; omitted means none.","example":["seg_7Gk2Lm9xQ1z4Ha"]},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicyCustomPropertyFilter"},"description":"Customer or subscription custom property filters. Every filter must match: the contract's customer (customer property) or subscription (subscription property) holds one of its values. A contract with no value for the property does not match. Optional on create and update; omitted means none."}},"required":["customer_ids","currencies","countries","product_ids","customer_segment_ids","custom_property_filters"],"description":"Which contracts the policy governs. Every non-empty list must match; an empty list matches any contract."},"RevenuePolicyServicePeriodObligationMapping":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable identifier of the obligation across contracts and assessment versions, unique in the configuration.","example":"platform"},"name":{"type":"string","minLength":1,"description":"Name of the obligation."},"kind":{"type":"string","enum":["service_period"],"description":"How the obligation is delivered: `service_period` over its service periods, `consumption` as its units are consumed, `point_in_time` at the start of its first service period, `milestone` on the day a reviewer records its delivery. For an `allocated` obligation the kind sets when it is recognized; its products' accounting rules only supply the accounts."},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"`allocated` takes a share of the transaction price; `excluded` keeps its commercial amount and the recognition it has without a policy."},"granularity":{"type":"string","enum":["day","month","quarter","year"],"description":"How the `service_period` obligation spreads over its periods (`day`, `month`, `quarter`, `year`), resolved: `month` when it was left out."},"product_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"IDs of the products forming the obligation."}},"required":["key","name","kind","treatment","granularity","product_ids"],"additionalProperties":false,"title":"Service period"},"RevenuePolicyOtherObligationMapping":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable identifier of the obligation across contracts and assessment versions, unique in the configuration.","example":"platform"},"name":{"type":"string","minLength":1,"description":"Name of the obligation."},"kind":{"type":"string","enum":["consumption","point_in_time","milestone"],"description":"How the obligation is delivered: `service_period` over its service periods, `consumption` as its units are consumed, `point_in_time` at the start of its first service period, `milestone` on the day a reviewer records its delivery. For an `allocated` obligation the kind sets when it is recognized; its products' accounting rules only supply the accounts."},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"`allocated` takes a share of the transaction price; `excluded` keeps its commercial amount and the recognition it has without a policy."},"product_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"IDs of the products forming the obligation."}},"required":["key","name","kind","treatment","product_ids"],"additionalProperties":false,"title":"Consumption, point in time or milestone"},"RevenuePolicyObligationMapping":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyServicePeriodObligationMapping"},{"$ref":"#/components/schemas/RevenuePolicyOtherObligationMapping"}],"discriminator":{"propertyName":"kind","mapping":{"service_period":"#/components/schemas/RevenuePolicyServicePeriodObligationMapping","consumption":"#/components/schemas/RevenuePolicyOtherObligationMapping","point_in_time":"#/components/schemas/RevenuePolicyOtherObligationMapping","milestone":"#/components/schemas/RevenuePolicyOtherObligationMapping"}}},"RevenuePolicyBreakageAtExpiry":{"type":"object","properties":{"breakage":{"type":"string","enum":["recognize_at_expiry"],"description":"What an expired, unconsumed entitlement does to revenue: `recognize_at_expiry` recognizes it when the grant lapses, `review` waits for a reviewer's decision, `proportional` recognizes the expected breakage as the grant is consumed (consumed units ÷ (1 − expected breakage rate), capped at the grant's units) and the rest when it lapses. A grant that never expires only counts its consumed units."}},"required":["breakage"],"additionalProperties":false,"title":"At expiry"},"RevenuePolicyBreakageReview":{"type":"object","properties":{"breakage":{"type":"string","enum":["review"],"description":"What an expired, unconsumed entitlement does to revenue: `recognize_at_expiry` recognizes it when the grant lapses, `review` waits for a reviewer's decision, `proportional` recognizes the expected breakage as the grant is consumed (consumed units ÷ (1 − expected breakage rate), capped at the grant's units) and the rest when it lapses. A grant that never expires only counts its consumed units."}},"required":["breakage"],"additionalProperties":false,"title":"Reviewed"},"RevenuePolicyBreakageProportional":{"type":"object","properties":{"breakage":{"type":"string","enum":["proportional"],"description":"What an expired, unconsumed entitlement does to revenue: `recognize_at_expiry` recognizes it when the grant lapses, `review` waits for a reviewer's decision, `proportional` recognizes the expected breakage as the grant is consumed (consumed units ÷ (1 − expected breakage rate), capped at the grant's units) and the rest when it lapses. A grant that never expires only counts its consumed units."},"expected_breakage_percent":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":100,"description":"Share of an expiring grant expected to lapse unconsumed, in percent, greater than 0 and less than 100. Kept by a contract term for the version it is assessed under.","example":10}},"required":["breakage","expected_breakage_percent"],"additionalProperties":false,"title":"Proportional"},"RevenuePolicyConsumption":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyBreakageAtExpiry"},{"$ref":"#/components/schemas/RevenuePolicyBreakageReview"},{"$ref":"#/components/schemas/RevenuePolicyBreakageProportional"}],"discriminator":{"propertyName":"breakage","mapping":{"recognize_at_expiry":"#/components/schemas/RevenuePolicyBreakageAtExpiry","review":"#/components/schemas/RevenuePolicyBreakageReview","proportional":"#/components/schemas/RevenuePolicyBreakageProportional"}},"description":"Recognition of consumption obligations."},"RevenuePolicyDefaultAccounts":{"type":["object","null"],"properties":{"deferred_revenue_ledger_account_id":{"type":"string","minLength":1,"description":"ID of the deferred revenue account an allocated product takes when its rules give none. A liability account of the policy's ledger."},"unbilled_revenue_ledger_account_id":{"type":"string","minLength":1,"description":"ID of the unbilled revenue account an allocated product takes when its rules give none. An asset account of the policy's ledger, other than the deferred revenue one."}},"required":["deferred_revenue_ledger_account_id","unbilled_revenue_ledger_account_id"],"description":"Default Deferred and Unbilled revenue accounts of an allocated product: its accounting rules give its Revenue, Deferred and Unbilled accounts, and this pair only fills a Deferred or Unbilled account they leave empty (a one-off product's, a credit product's Unbilled). Products of one contract may post to different Deferred and Unbilled accounts: what the contract bills is attributed to them by allocated share. Null: no fallback. Kept by a contract term for the version it is assessed under."},"RevenuePolicyUnconditionalReview":{"type":"object","properties":{"mode":{"type":"string","enum":["exceptions_and_overrides","every_contract"],"description":"`exceptions_and_overrides` reviews only contracts with an exception or an override, `every_contract` reviews every contract, `conditional` reviews contracts meeting one of the conditions."}},"required":["mode"],"additionalProperties":false,"title":"Unconditional"},"RevenuePolicyConditionalReview":{"type":"object","properties":{"mode":{"type":"string","enum":["conditional"],"description":"`exceptions_and_overrides` reviews only contracts with an exception or an override, `every_contract` reviews every contract, `conditional` reviews contracts meeting one of the conditions."},"conditions":{"type":"object","properties":{"transaction_price_at_least":{"type":["array","null"],"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 of the threshold.","example":"EUR"},"amount":{"type":"number","minimum":0,"description":"Transaction price from which a contract is reviewed. Expressed in currency's smallest unit.","example":5000000}},"required":["currency","amount"]},"description":"Review a contract whose transaction price reaches the amount set for its currency, or null for no such condition."},"allocation_shift_percent_at_least":{"type":["number","null"],"minimum":0,"description":"Review a contract when the allocation moves at least this share of the transaction price from or to one obligation, in percent, or null for no such condition.","example":10},"has_free_product":{"type":["boolean","null"],"description":"Review a contract holding a product sold for free, or null for no such condition."}},"required":["transaction_price_at_least","allocation_shift_percent_at_least","has_free_product"],"description":"Conditions of a `conditional` review: a contract meeting any of them is reviewed. Only a `conditional` review takes them."}},"required":["mode","conditions"],"additionalProperties":false,"title":"Conditional"},"RevenuePolicyReview":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyUnconditionalReview"},{"$ref":"#/components/schemas/RevenuePolicyConditionalReview"}],"discriminator":{"propertyName":"mode","mapping":{"exceptions_and_overrides":"#/components/schemas/RevenuePolicyUnconditionalReview","every_contract":"#/components/schemas/RevenuePolicyUnconditionalReview","conditional":"#/components/schemas/RevenuePolicyConditionalReview"}},"description":"Which contracts need a reviewer's approval before they drive recognition."},"RevenuePolicyConfig":{"type":"object","properties":{"eligibility":{"type":"object","properties":{"collectability":{"type":"string","enum":["assumed","review"],"description":"`assumed` for every matching contract, or `review` to have a reviewer confirm collectability on each one."}},"required":["collectability"],"description":"How a contract is confirmed as a contract to account for."},"obligations":{"type":"object","properties":{"mappings":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicyObligationMapping"},"description":"Groups of products forming one performance obligation. A product belongs to at most one mapping."},"unmapped_products":{"type":"string","enum":["own_obligation","excluded","exception"],"description":"What a product no mapping names becomes: its own obligation, excluded from the allocation, or an exception for a reviewer."}},"required":["mappings","unmapped_products"],"description":"How the products of a contract form performance obligations."},"allocation":{"type":"object","properties":{"method":{"type":"string","enum":["relative_ssp","commercial_price"],"description":"`relative_ssp` allocates by relative standalone selling price, `commercial_price` keeps each obligation's commercial amount."},"catalog_price_fallback":{"type":"boolean","description":"Whether a product with no standalone selling price in effect at the term start takes its base catalog price (no price book, customer or segment price; matched on the contract's currency, the customer's country, the product's billing interval and the commitment), valued at the term's quantities without discounts. The catalog price is read when the term is first assessed and kept for the term. Defaults to `true` when omitted; `false` leaves such a product without a price (`missing_standalone_selling_price`)."},"discounts":{"type":"string","enum":["proportional","discounted_products"],"description":"How a discount the subscription applies to some of the contract's products and not others (a coupon scoped to products) is allocated. `proportional` spreads it with the rest of the transaction price by relative standalone selling price. `discounted_products` keeps it on the products it targets: the transaction price plus those discounts is allocated by relative standalone selling price, then each obligation takes its products' discounts back (a contract where they exceed an obligation's share raises `discount_exceeds_allocation`). A coupon on every product stays proportional. Only with `relative_ssp`; defaults to `proportional` when omitted."}},"required":["method","catalog_price_fallback","discounts"],"description":"How the transaction price is allocated across obligations."},"recognition":{"type":"object","properties":{"consumption":{"$ref":"#/components/schemas/RevenuePolicyConsumption"},"default_accounts":{"$ref":"#/components/schemas/RevenuePolicyDefaultAccounts"}},"required":["consumption","default_accounts"],"description":"How the obligations are recognized."},"review":{"$ref":"#/components/schemas/RevenuePolicyReview"},"modifications":{"type":"object","properties":{"amendment":{"type":"string","enum":["prospective","review"],"description":"A contract amendment is applied `prospective`ly, or held for `review`."},"cancellation":{"type":"string","enum":["prospective","review"],"description":"A contract cancellation is applied `prospective`ly, or held for `review`."}},"required":["amendment","cancellation"],"description":"How contract changes are assessed."}},"required":["eligibility","obligations","allocation","recognition","review","modifications"],"description":"How the policy assesses and recognizes the contracts it governs."},"RevenuePolicyVersion":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Revenue policy version ID.","example":"rpv_7Gk2Lm9xQ1z4Ha"},"version":{"type":"integer","description":"Version number, starting at 1.","example":1},"status":{"type":"string","enum":["draft","published"],"description":"`draft` while it can still change, `published` once it governs contracts. A published version never changes."},"effective_from":{"type":"string","format":"date-time","description":"The version governs the contract terms starting on or after this date.","example":"2026-01-01T00:00:00Z"},"running_contracts_inclusion_enabled":{"type":"boolean","description":"Whether the version was published including the running contracts: it then also governs the contracts whose current term started before its effective date, each one waiting for a reviewer's approval as a transition before it changes anything in the books. False on a draft and on a version published for new contracts only.","example":false},"config":{"$ref":"#/components/schemas/RevenuePolicyConfig"},"published_at":{"type":["string","null"],"format":"date-time","description":"When the version was published, or null for a draft.","example":"2024-12-20T16:04:11Z"},"published_by_user_id":{"type":["string","null"],"description":"ID of the user who published the version, or null when it is a draft or was published with an API key."},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","version","status","effective_from","running_contracts_inclusion_enabled","config","published_at","published_by_user_id","created_at"],"description":"Latest published version of the policy, or null when no version is published yet."},"RevenuePolicy":{"type":"object","properties":{"id":{"type":"string","description":"Revenue policy ID.","example":"rpol_3fJ8kZx1Lq9a2B"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"name":{"type":"string","description":"Name of the revenue policy.","example":"Enterprise contracts"},"description":{"type":["string","null"],"description":"Free-text description of the revenue policy."},"priority":{"type":"integer","description":"Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies.","example":10},"match_conditions":{"$ref":"#/components/schemas/RevenuePolicyMatchConditions"},"published_version":{"$ref":"#/components/schemas/RevenuePolicyVersion"},"draft_version":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"description":"Draft version of the policy, or null when there is none."}]},"assessment_count":{"type":"integer","description":"Number of contracts assessed under the policy."},"archived_at":{"type":["string","null"],"format":"date-time","description":"When the policy was archived. An archived policy matches no new contract; null while it is live.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","ledger_id","name","description","priority","match_conditions","published_version","draft_version","assessment_count","archived_at","created_at"]},"RevenuePolicyPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicy"}}},"required":["meta","data"]},"RevenuePolicyDetail":{"type":"object","properties":{"id":{"type":"string","description":"Revenue policy ID.","example":"rpol_3fJ8kZx1Lq9a2B"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"name":{"type":"string","description":"Name of the revenue policy.","example":"Enterprise contracts"},"description":{"type":["string","null"],"description":"Free-text description of the revenue policy."},"priority":{"type":"integer","description":"Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies.","example":10},"match_conditions":{"$ref":"#/components/schemas/RevenuePolicyMatchConditions"},"published_version":{"$ref":"#/components/schemas/RevenuePolicyVersion"},"draft_version":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"description":"Draft version of the policy, or null when there is none."}]},"assessment_count":{"type":"integer","description":"Number of contracts assessed under the policy."},"archived_at":{"type":["string","null"],"format":"date-time","description":"When the policy was archived. An archived policy matches no new contract; null while it is live.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"},"versions":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"type":"object"}]},"description":"Every version of the policy, newest first."}},"required":["id","ledger_id","name","description","priority","match_conditions","published_version","draft_version","assessment_count","archived_at","created_at","versions"]},"RevenuePolicyMatchConditionsCommand":{"type":"object","properties":{"customer_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customers whose contracts the policy governs."},"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":"Contract currencies the policy governs."},"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":"Customer countries the policy governs."},"product_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the products of which a contract must hold at least one for the policy to govern it."},"customer_segment_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"IDs of the customer segments of which the contract's customer must belong to at least one for the policy to govern it. Optional on create and update; omitted means none."},"custom_property_filters":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicyCustomPropertyFilter"},"default":[],"description":"Customer or subscription custom property filters. Every filter must match: the contract's customer (customer property) or subscription (subscription property) holds one of its values. A contract with no value for the property does not match. Optional on create and update; omitted means none."}},"required":["customer_ids","currencies","countries","product_ids"],"description":"Which contracts the policy governs. Every non-empty list must match; an empty list matches any contract."},"RevenuePolicyServicePeriodObligationMappingInput":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable identifier of the obligation across contracts and assessment versions, unique in the configuration.","example":"platform"},"name":{"type":"string","minLength":1,"description":"Name of the obligation."},"kind":{"type":"string","enum":["service_period"],"description":"How the obligation is delivered: `service_period` over its service periods, `consumption` as its units are consumed, `point_in_time` at the start of its first service period, `milestone` on the day a reviewer records its delivery. For an `allocated` obligation the kind sets when it is recognized; its products' accounting rules only supply the accounts."},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"`allocated` takes a share of the transaction price; `excluded` keeps its commercial amount and the recognition it has without a policy."},"granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"How the `service_period` obligation spreads over its periods (`day`, `month`, `quarter`, `year`). Defaults to `month` when omitted or null; only a `service_period` mapping takes one."},"product_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"IDs of the products forming the obligation."}},"required":["key","name","kind","treatment","product_ids"],"additionalProperties":false,"title":"Service period"},"RevenuePolicyOtherObligationMappingInput":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable identifier of the obligation across contracts and assessment versions, unique in the configuration.","example":"platform"},"name":{"type":"string","minLength":1,"description":"Name of the obligation."},"kind":{"type":"string","enum":["consumption","point_in_time","milestone"],"description":"How the obligation is delivered: `service_period` over its service periods, `consumption` as its units are consumed, `point_in_time` at the start of its first service period, `milestone` on the day a reviewer records its delivery. For an `allocated` obligation the kind sets when it is recognized; its products' accounting rules only supply the accounts."},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"`allocated` takes a share of the transaction price; `excluded` keeps its commercial amount and the recognition it has without a policy."},"product_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"IDs of the products forming the obligation."}},"required":["key","name","kind","treatment","product_ids"],"additionalProperties":false,"title":"Consumption, point in time or milestone"},"RevenuePolicyObligationMappingInput":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyServicePeriodObligationMappingInput"},{"$ref":"#/components/schemas/RevenuePolicyOtherObligationMappingInput"}],"discriminator":{"propertyName":"kind","mapping":{"service_period":"#/components/schemas/RevenuePolicyServicePeriodObligationMappingInput","consumption":"#/components/schemas/RevenuePolicyOtherObligationMappingInput","point_in_time":"#/components/schemas/RevenuePolicyOtherObligationMappingInput","milestone":"#/components/schemas/RevenuePolicyOtherObligationMappingInput"}}},"RevenuePolicyUnconditionalReviewInput":{"type":"object","properties":{"mode":{"type":"string","enum":["exceptions_and_overrides","every_contract"],"description":"`exceptions_and_overrides` reviews only contracts with an exception or an override, `every_contract` reviews every contract, `conditional` reviews contracts meeting one of the conditions."}},"required":["mode"],"additionalProperties":false,"title":"Unconditional"},"RevenuePolicyConditionalReviewInput":{"type":"object","properties":{"mode":{"type":"string","enum":["conditional"],"description":"`exceptions_and_overrides` reviews only contracts with an exception or an override, `every_contract` reviews every contract, `conditional` reviews contracts meeting one of the conditions."},"conditions":{"type":"object","properties":{"transaction_price_at_least":{"type":["array","null"],"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 of the threshold.","example":"EUR"},"amount":{"type":"number","minimum":0,"description":"Transaction price from which a contract is reviewed. Expressed in currency's smallest unit.","example":5000000}},"required":["currency","amount"]},"description":"Review a contract whose transaction price reaches the amount set for its currency, or null for no such condition."},"allocation_shift_percent_at_least":{"type":["number","null"],"minimum":0,"description":"Review a contract when the allocation moves at least this share of the transaction price from or to one obligation, in percent, or null for no such condition.","example":10},"has_free_product":{"type":["boolean","null"],"description":"Review a contract holding a product sold for free, or null for no such condition."}},"description":"Conditions of a `conditional` review: a contract meeting any of them is reviewed. Only a `conditional` review takes them."}},"required":["mode","conditions"],"additionalProperties":false,"title":"Conditional"},"RevenuePolicyReviewInput":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyUnconditionalReviewInput"},{"$ref":"#/components/schemas/RevenuePolicyConditionalReviewInput"}],"discriminator":{"propertyName":"mode","mapping":{"exceptions_and_overrides":"#/components/schemas/RevenuePolicyUnconditionalReviewInput","every_contract":"#/components/schemas/RevenuePolicyUnconditionalReviewInput","conditional":"#/components/schemas/RevenuePolicyConditionalReviewInput"}},"description":"Which contracts need a reviewer's approval before they drive recognition."},"RevenuePolicyConfigInput":{"type":"object","properties":{"eligibility":{"type":"object","properties":{"collectability":{"type":"string","enum":["assumed","review"],"description":"`assumed` for every matching contract, or `review` to have a reviewer confirm collectability on each one."}},"required":["collectability"],"description":"How a contract is confirmed as a contract to account for."},"obligations":{"type":"object","properties":{"mappings":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicyObligationMappingInput"},"description":"Groups of products forming one performance obligation. A product belongs to at most one mapping."},"unmapped_products":{"type":"string","enum":["own_obligation","excluded","exception"],"description":"What a product no mapping names becomes: its own obligation, excluded from the allocation, or an exception for a reviewer."}},"required":["mappings","unmapped_products"],"description":"How the products of a contract form performance obligations."},"allocation":{"type":"object","properties":{"method":{"type":"string","enum":["relative_ssp","commercial_price"],"description":"`relative_ssp` allocates by relative standalone selling price, `commercial_price` keeps each obligation's commercial amount."},"catalog_price_fallback":{"type":"boolean","description":"Whether a product with no standalone selling price in effect at the term start takes its base catalog price (no price book, customer or segment price; matched on the contract's currency, the customer's country, the product's billing interval and the commitment), valued at the term's quantities without discounts. The catalog price is read when the term is first assessed and kept for the term. Defaults to `true` when omitted; `false` leaves such a product without a price (`missing_standalone_selling_price`)."},"discounts":{"type":"string","enum":["proportional","discounted_products"],"description":"How a discount the subscription applies to some of the contract's products and not others (a coupon scoped to products) is allocated. `proportional` spreads it with the rest of the transaction price by relative standalone selling price. `discounted_products` keeps it on the products it targets: the transaction price plus those discounts is allocated by relative standalone selling price, then each obligation takes its products' discounts back (a contract where they exceed an obligation's share raises `discount_exceeds_allocation`). A coupon on every product stays proportional. Only with `relative_ssp`; defaults to `proportional` when omitted."}},"required":["method"],"description":"How the transaction price is allocated across obligations."},"recognition":{"type":"object","properties":{"consumption":{"$ref":"#/components/schemas/RevenuePolicyConsumption"},"default_accounts":{"$ref":"#/components/schemas/RevenuePolicyDefaultAccounts"}},"required":["consumption"],"description":"How the obligations are recognized."},"review":{"$ref":"#/components/schemas/RevenuePolicyReviewInput"},"modifications":{"type":"object","properties":{"amendment":{"type":"string","enum":["prospective","review"],"description":"A contract amendment is applied `prospective`ly, or held for `review`."},"cancellation":{"type":"string","enum":["prospective","review"],"description":"A contract cancellation is applied `prospective`ly, or held for `review`."}},"required":["amendment","cancellation"],"description":"How contract changes are assessed."}},"required":["eligibility","obligations","allocation","recognition","review","modifications"],"description":"How the policy assesses and recognizes the contracts it governs."},"RevenuePolicyRunningContractsPreview":{"type":"object","properties":{"matching_count":{"type":"integer","description":"Running contracts of the policy's ledger it would govern: current term started before the version's effective date, not assessed yet on the ledger, and this policy wins the match among the ledger's live policies (priority respected). Each would wait for a reviewer's approval as a transition. A lower bound when `is_truncated` is true.","example":42},"recognized_count":{"type":"integer","description":"Among them, the contracts that already recognized revenue in their current term: that revenue stays, only the remainder would follow the policy. A lower bound when `is_truncated` is true.","example":30},"is_truncated":{"type":"boolean","description":"True when the scan stopped at its cap (2,000 contracts) and more contracts were not looked at: both counts are then lower bounds.","example":false}},"required":["matching_count","recognized_count","is_truncated"],"description":"Estimate of the running contracts the policy would govern if its draft (else its latest published version) were published with `include_running_contracts`."},"RevenuePolicyAccountsPreviewAccount":{"type":["object","null"],"properties":{"ledger_account":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the ledger account.","example":"lac_2Lm9xQ1z4Ha7Gk"},"code":{"type":"string","description":"Code of the ledger account.","example":"2100"},"name":{"type":"string","description":"Name of the ledger account.","example":"Deferred revenue"}},"required":["id","code","name"],"description":"Ledger account the role posts to."},"source":{"type":"string","enum":["rule","policy_default"],"description":"`rule` when an accounting rule gives the account, `policy_default` when it comes from the policy's default accounts because no rule gives one."},"rule":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Identifier of the accounting rule.","example":"arl_z4Ha7Gk2Lm9xQ1"},"code":{"type":"string","description":"Code of the accounting rule.","example":"R-12"},"name":{"type":["string","null"],"description":"Name of the accounting rule, or null."}},"required":["id","code","name"],"description":"Accounting rule giving the account, or null when the account comes from the default accounts or from different rules across the contracts of the outcome."}},"required":["ledger_account","source","rule"],"description":"Revenue account, or null when none is found."},"RevenuePolicyResolvedProductAccounts":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"status":{"type":"string","enum":["resolved"],"description":"`resolved` when every contract the scope allows resolves the same accounts, `varies` when they depend on a customer, currency, country or billing interval the scope leaves open, `unknown_product` when no product has this identifier."},"accounts":{"type":"object","properties":{"revenue":{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},"deferred":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},{"description":"Deferred revenue account, or null when neither a rule nor the default accounts give one."}]},"unbilled":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},{"description":"Unbilled revenue account, or null when neither a rule nor the default accounts give one."}]}},"required":["revenue","deferred","unbilled"],"description":"Revenue, Deferred and Unbilled accounts the product's contract schedules would post to."},"problems":{"type":"array","items":{"type":"string","enum":["missing_accounts","accounts_not_distinct"],"description":"A problem of the accounts."},"description":"Why the product cannot be recognized under a policy with these accounts: `missing_accounts` (a role has no account) or `accounts_not_distinct` (two roles share one account). A contract holding it would raise `recognition_rule_incompatible`. Empty when the accounts are usable."}},"required":["product_id","status","accounts","problems"],"additionalProperties":false,"title":"Resolved"},"RevenuePolicyVaryingProductAccounts":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"status":{"type":"string","enum":["varies"],"description":"`resolved` when every contract the scope allows resolves the same accounts, `varies` when they depend on a customer, currency, country or billing interval the scope leaves open, `unknown_product` when no product has this identifier."},"dimensions":{"type":"array","items":{"type":"string","enum":["customer","currency","country","billing_interval"],"description":"`customer`, `currency`, `country` or `billing_interval`."},"description":"What the scope leaves open that changes the accounts; empty when there were too many contracts to tell."},"outcomes":{"type":"array","items":{"type":"object","properties":{"accounts":{"type":"object","properties":{"revenue":{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},"deferred":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},{"description":"Deferred revenue account, or null when neither a rule nor the default accounts give one."}]},"unbilled":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyAccountsPreviewAccount"},{"description":"Unbilled revenue account, or null when neither a rule nor the default accounts give one."}]}},"required":["revenue","deferred","unbilled"],"description":"Revenue, Deferred and Unbilled accounts the product's contract schedules would post to."},"problems":{"type":"array","items":{"type":"string","enum":["missing_accounts","accounts_not_distinct"],"description":"A problem of the accounts."},"description":"Why the product cannot be recognized under a policy with these accounts: `missing_accounts` (a role has no account) or `accounts_not_distinct` (two roles share one account). A contract holding it would raise `recognition_rule_incompatible`. Empty when the accounts are usable."}},"required":["accounts","problems"]},"description":"The distinct sets of accounts the possible contracts resolve (at most 10); empty when there were too many contracts to tell."}},"required":["product_id","status","dimensions","outcomes"],"additionalProperties":false,"title":"Varies"},"RevenuePolicyUnknownProductAccounts":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"status":{"type":"string","enum":["unknown_product"],"description":"`resolved` when every contract the scope allows resolves the same accounts, `varies` when they depend on a customer, currency, country or billing interval the scope leaves open, `unknown_product` when no product has this identifier."}},"required":["product_id","status"],"additionalProperties":false,"title":"Unknown product"},"RevenuePolicyProductAccountsPreview":{"oneOf":[{"$ref":"#/components/schemas/RevenuePolicyResolvedProductAccounts"},{"$ref":"#/components/schemas/RevenuePolicyVaryingProductAccounts"},{"$ref":"#/components/schemas/RevenuePolicyUnknownProductAccounts"}],"discriminator":{"propertyName":"status","mapping":{"resolved":"#/components/schemas/RevenuePolicyResolvedProductAccounts","varies":"#/components/schemas/RevenuePolicyVaryingProductAccounts","unknown_product":"#/components/schemas/RevenuePolicyUnknownProductAccounts"}}},"RevenuePolicyAccountsPreview":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePolicyProductAccountsPreview"},"description":"One answer per product, in no particular order."}},"required":["data"]},"PerPeriodStandaloneSellingPrice":{"type":"object","properties":{"id":{"type":"string","description":"Standalone selling price ID.","example":"ssp_5Tk9Qa2Lm7x0Rb"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"product_id":{"type":"string","description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"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 price.","example":"EUR"},"amount":{"type":"number","description":"Standalone selling price, per the basis. Expressed in currency's smallest unit.","example":1200000},"basis":{"type":"string","enum":["per_period","per_unit_per_period"],"description":"What the amount is for: one interval whatever the quantity (`per_period`), one unit over one interval (`per_unit_per_period`), one consumed unit (`per_unit`), or the whole contract term (`total`)."},"interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"],"description":"Interval unit of the per-period basis (`per_period`, `per_unit_per_period`); the other bases take no interval."},"interval_count":{"type":"integer","exclusiveMinimum":0,"description":"Number of interval units of the per-period basis, at least 1; the other bases take no interval."},"evidence_method":{"type":"string","enum":["observable_price","adjusted_market_assessment","expected_cost_plus_margin","residual"],"description":"How the price was established: observable price, adjusted market assessment, expected cost plus margin, or residual approach."},"evidence_note":{"type":["string","null"],"description":"Free-text justification of the price, or null."},"effective_from":{"type":"string","format":"date-time","description":"From when the price applies. A new price closes the open price of the same product and currency on this date.","example":"2026-01-01T00:00:00Z"},"effective_to":{"type":["string","null"],"format":"date-time","description":"When a later price replaced this one, or null while it is the current price.","example":"2024-12-20T16:04:11Z"},"created_by_user_id":{"type":["string","null"],"description":"ID of the user who created the record, or null when it was created with an API key."},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","ledger_id","product_id","currency","amount","basis","interval_period","interval_count","evidence_method","evidence_note","effective_from","effective_to","created_by_user_id","created_at"],"additionalProperties":false,"title":"Per period"},"NonPeriodicStandaloneSellingPrice":{"type":"object","properties":{"id":{"type":"string","description":"Standalone selling price ID.","example":"ssp_5Tk9Qa2Lm7x0Rb"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"product_id":{"type":"string","description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"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 price.","example":"EUR"},"amount":{"type":"number","description":"Standalone selling price, per the basis. Expressed in currency's smallest unit.","example":1200000},"basis":{"type":"string","enum":["per_unit","total"],"description":"What the amount is for: one interval whatever the quantity (`per_period`), one unit over one interval (`per_unit_per_period`), one consumed unit (`per_unit`), or the whole contract term (`total`)."},"evidence_method":{"type":"string","enum":["observable_price","adjusted_market_assessment","expected_cost_plus_margin","residual"],"description":"How the price was established: observable price, adjusted market assessment, expected cost plus margin, or residual approach."},"evidence_note":{"type":["string","null"],"description":"Free-text justification of the price, or null."},"effective_from":{"type":"string","format":"date-time","description":"From when the price applies. A new price closes the open price of the same product and currency on this date.","example":"2026-01-01T00:00:00Z"},"effective_to":{"type":["string","null"],"format":"date-time","description":"When a later price replaced this one, or null while it is the current price.","example":"2024-12-20T16:04:11Z"},"created_by_user_id":{"type":["string","null"],"description":"ID of the user who created the record, or null when it was created with an API key."},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","ledger_id","product_id","currency","amount","basis","evidence_method","evidence_note","effective_from","effective_to","created_by_user_id","created_at"],"additionalProperties":false,"title":"Per unit or total"},"StandaloneSellingPrice":{"oneOf":[{"$ref":"#/components/schemas/PerPeriodStandaloneSellingPrice"},{"$ref":"#/components/schemas/NonPeriodicStandaloneSellingPrice"}],"discriminator":{"propertyName":"basis","mapping":{"per_period":"#/components/schemas/PerPeriodStandaloneSellingPrice","per_unit_per_period":"#/components/schemas/PerPeriodStandaloneSellingPrice","per_unit":"#/components/schemas/NonPeriodicStandaloneSellingPrice","total":"#/components/schemas/NonPeriodicStandaloneSellingPrice"}}},"StandaloneSellingPricePaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StandaloneSellingPrice"}}},"required":["meta","data"]},"CreatePerPeriodStandaloneSellingPriceCommand":{"type":"object","properties":{"ledger_id":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"product_id":{"type":"string","minLength":1,"description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"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 price.","example":"EUR"},"amount":{"type":"number","minimum":0,"description":"Standalone selling price, per the basis. Expressed in currency's smallest unit.","example":1200000},"basis":{"type":"string","enum":["per_period","per_unit_per_period"],"description":"What the amount is for: one interval whatever the quantity (`per_period`), one unit over one interval (`per_unit_per_period`), one consumed unit (`per_unit`), or the whole contract term (`total`)."},"interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"],"description":"Interval unit of the per-period basis (`per_period`, `per_unit_per_period`); the other bases take no interval."},"interval_count":{"type":"integer","exclusiveMinimum":0,"description":"Number of interval units of the per-period basis, at least 1; the other bases take no interval."},"evidence_method":{"type":"string","enum":["observable_price","adjusted_market_assessment","expected_cost_plus_margin","residual"],"description":"How the price was established: observable price, adjusted market assessment, expected cost plus margin, or residual approach."},"evidence_note":{"type":["string","null"],"description":"Free-text justification of the price, or null."},"effective_from":{"type":"string","format":"date-time","description":"From when the price applies. A new price closes the open price of the same product and currency on this date.","example":"2026-01-01T00:00:00Z"}},"required":["ledger_id","product_id","currency","amount","basis","interval_period","interval_count","evidence_method","effective_from"],"additionalProperties":false,"title":"Per period"},"CreateNonPeriodicStandaloneSellingPriceCommand":{"type":"object","properties":{"ledger_id":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"product_id":{"type":"string","minLength":1,"description":"ID of the product the record relates to.","example":"itm_4Ha7Gk2Lm9xQ1z"},"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 price.","example":"EUR"},"amount":{"type":"number","minimum":0,"description":"Standalone selling price, per the basis. Expressed in currency's smallest unit.","example":1200000},"basis":{"type":"string","enum":["per_unit","total"],"description":"What the amount is for: one interval whatever the quantity (`per_period`), one unit over one interval (`per_unit_per_period`), one consumed unit (`per_unit`), or the whole contract term (`total`)."},"evidence_method":{"type":"string","enum":["observable_price","adjusted_market_assessment","expected_cost_plus_margin","residual"],"description":"How the price was established: observable price, adjusted market assessment, expected cost plus margin, or residual approach."},"evidence_note":{"type":["string","null"],"description":"Free-text justification of the price, or null."},"effective_from":{"type":"string","format":"date-time","description":"From when the price applies. A new price closes the open price of the same product and currency on this date.","example":"2026-01-01T00:00:00Z"}},"required":["ledger_id","product_id","currency","amount","basis","evidence_method","effective_from"],"additionalProperties":false,"title":"Per unit or total"},"CreateStandaloneSellingPriceCommand":{"oneOf":[{"$ref":"#/components/schemas/CreatePerPeriodStandaloneSellingPriceCommand"},{"$ref":"#/components/schemas/CreateNonPeriodicStandaloneSellingPriceCommand"}],"discriminator":{"propertyName":"basis","mapping":{"per_period":"#/components/schemas/CreatePerPeriodStandaloneSellingPriceCommand","per_unit_per_period":"#/components/schemas/CreatePerPeriodStandaloneSellingPriceCommand","per_unit":"#/components/schemas/CreateNonPeriodicStandaloneSellingPriceCommand","total":"#/components/schemas/CreateNonPeriodicStandaloneSellingPriceCommand"}}},"ContractAssessment":{"type":"object","properties":{"id":{"type":"string","description":"Contract assessment ID.","example":"caa_2Lm9xQ1z4Ha7Gk"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"subscription_id":{"type":"string","description":"ID of the subscription holding the contract.","example":"sub_Gk2Lm9xQ1z4Ha7"},"customer_id":{"type":"string","description":"ID of the customer holding the contract.","example":"cus_Lm9xQ1z4Ha7Gk2"},"term_start_at":{"type":"string","format":"date-time","description":"Start of the assessed contract term.","example":"2024-12-20T16:04:11Z"},"term_end_at":{"type":["string","null"],"format":"date-time","description":"End of the assessed contract term: the end of its last day in the subscription's timezone, or null when the subscription cannot be found.","example":"2024-12-20T16:04:11Z"},"timezone":{"type":["string","null"],"description":"Timezone of the subscription, in which the term's start and end are day boundaries, or null when the subscription cannot be found.","example":"Europe/Paris"},"policy_id":{"type":"string","description":"ID of the revenue policy the contract is assessed under.","example":"rpol_3fJ8kZx1Lq9a2B"},"policy_name":{"type":"string","description":"Name of the revenue policy.","example":"Enterprise contracts"},"policy_version":{"type":"integer","description":"Version number of the revenue policy the contract is pinned to."},"latest_version":{"type":"integer","description":"Number of the latest assessment version."},"applied_version":{"type":["integer","null"],"description":"Number of the assessment version driving recognition, or null while none does."},"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":"Contract currency.","example":"EUR"},"transaction_price":{"type":"number","description":"Consideration of the contract term allocated across its obligations. Expressed in currency's smallest unit."},"invoiced_amount":{"type":"number","description":"Amount billed so far on the contract's revenue recognition schedules, net of credit notes and voids, in the contract currency. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Revenue recognized so far on the contract's revenue recognition schedules, in the contract currency. Expressed in currency's smallest unit."},"deferred_amount":{"type":"number","description":"Current deferred revenue position of the contract (billed, not yet recognized), in the contract currency. Expressed in currency's smallest unit."},"unbilled_amount":{"type":"number","description":"Current unbilled revenue position of the contract (recognized, not yet billed), in the contract currency. Expressed in currency's smallest unit."},"calculation_status":{"type":"string","enum":["complete","incomplete"],"description":"Whether the assessment could be computed, or misses an input such as a standalone selling price."},"review_status":{"type":"string","enum":["not_required","pending","approved","rejected"],"description":"Whether the assessment awaits, passed or failed a review."},"recognition_status":{"type":"string","enum":["eligible","held"],"description":"`eligible` when the version may drive recognition, `held` while an input, a review or a blocking exception holds it."},"open_exception_count":{"type":"integer","description":"Number of open exceptions of the contract."},"updated_at":{"type":"string","format":"date-time","description":"When the record last changed.","example":"2024-12-20T16:04:11Z"}},"required":["id","ledger_id","subscription_id","customer_id","term_start_at","term_end_at","timezone","policy_id","policy_name","policy_version","latest_version","applied_version","currency","transaction_price","invoiced_amount","recognized_amount","deferred_amount","unbilled_amount","calculation_status","review_status","recognition_status","open_exception_count","updated_at"]},"ContractAssessmentPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContractAssessment"}}},"required":["meta","data"]},"ContractAssessmentStep":{"type":"object","properties":{"determination":{"type":"string","description":"What the step determined."},"decided_by":{"type":"string","enum":["policy","manual","system"],"description":"Who decided the step: the `policy`, a reviewer (`manual`) or the `system`."},"decision_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the review decisions the step relies on."},"evidence":{"type":"object","additionalProperties":{},"description":"Data the step was decided from. Informational: its keys depend on the step and may grow."},"is_complete":{"type":"boolean","description":"Whether the step could be completed."}},"required":["determination","decided_by","decision_ids","evidence","is_complete"],"description":"One step of the assessment."},"ContractAssessmentVersion":{"type":"object","properties":{"version":{"type":"integer","description":"Version number of the assessment."},"change_kind":{"type":"string","enum":["initial","amendment","cancellation","billing_variance","input_update","transition"],"description":"What produced the version: the initial assessment, an amendment, a cancellation, an invoice billing another amount than planned, a changed input (standalone selling price or override), or the transition of a contract already recognized another way."},"calculation_status":{"type":"string","enum":["complete","incomplete"],"description":"Whether the assessment could be computed, or misses an input such as a standalone selling price."},"review_status":{"type":"string","enum":["not_required","pending","approved","rejected"],"description":"Whether the assessment awaits, passed or failed a review."},"recognition_status":{"type":"string","enum":["eligible","held"],"description":"`eligible` when the version may drive recognition, `held` while an input, a review or a blocking exception holds it."},"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":"Contract currency.","example":"EUR"},"transaction_price":{"type":"number","description":"Consideration of the contract term allocated across its obligations. Expressed in currency's smallest unit."},"allocation_method":{"type":"string","enum":["relative_ssp","commercial_price","manual"],"description":"Allocation method of the version: `relative_ssp`, `commercial_price`, or `manual` when an override set the amounts."},"allocation_rounding":{"type":"object","properties":{"remainder":{"type":"number","description":"Remainder the proportional shares left. Expressed in currency's smallest unit."},"adjustments":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Obligation key."},"amount":{"type":"number","description":"Amount the obligation absorbed. Expressed in currency's smallest unit."}},"required":["key","amount"]},"description":"Obligations that absorbed the remainder."}},"required":["remainder","adjustments"],"description":"How the minor-unit remainder of the proportional allocation was settled."},"steps":{"type":"object","properties":{"contract":{"$ref":"#/components/schemas/ContractAssessmentStep"},"performance_obligations":{"$ref":"#/components/schemas/ContractAssessmentStep"},"transaction_price":{"$ref":"#/components/schemas/ContractAssessmentStep"},"allocation":{"$ref":"#/components/schemas/ContractAssessmentStep"},"recognition":{"$ref":"#/components/schemas/ContractAssessmentStep"}},"required":["contract","performance_obligations","transaction_price","allocation","recognition"],"description":"The five steps of IFRS 15 / ASC 606 for this version: what was determined, from what, and by whom. A complete record is not a certification of compliance."},"transition":{"type":["object","null"],"properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"schedule_id":{"type":"string","description":"Revenue recognition schedule ID."},"product_id":{"type":["string","null"],"description":"Product of the schedule, or null when unknown."},"total_amount":{"type":"number","description":"Amount the schedule was to recognize over its life, in the contract currency. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Revenue the schedule had recognized, in the contract currency. Expressed in currency's smallest unit."},"remaining_amount":{"type":"number","description":"Amount the schedule had left to recognize, in the contract currency. Expressed in currency's smallest unit."},"billed_amount":{"type":"number","description":"Amount billed on the schedule, in the contract currency. Expressed in currency's smallest unit."},"deferred_amount":{"type":"number","description":"Deferred revenue position of the schedule (billed, not yet recognized), in the contract currency. Expressed in currency's smallest unit."},"unbilled_amount":{"type":"number","description":"Unbilled revenue position of the schedule (recognized, not yet billed), in the contract currency. Expressed in currency's smallest unit."}},"required":["schedule_id","product_id","total_amount","recognized_amount","remaining_amount","billed_amount","deferred_amount","unbilled_amount"]},"description":"Revenue recognition schedules of the term when it moved under the policy; empty when it had none."}},"required":["schedules"],"description":"What recognition had already posted for the term when the contract, recognized another way until then, moved under the policy (a running contract reached by a version published including the running contracts, or a term that already had contract schedules), per schedule: what to check before approving its transition review. Revenue already recognized stays; only the remainder follows the policy once a version is applied. Null when the contract was not a transition; later versions carry the first version's figures."},"applied_at":{"type":["string","null"],"format":"date-time","description":"When the version started driving recognition, or null.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["version","change_kind","calculation_status","review_status","recognition_status","currency","transaction_price","allocation_method","allocation_rounding","steps","transition","applied_at","created_at"],"description":"The assessment version shown: the latest one unless another was requested."},"ContractProductSchedulableRecognition":{"type":"object","properties":{"status":{"type":"string","enum":["schedulable"]},"method":{"type":"string","description":"Revenue recognition method of the accounting rule."},"granularity":{"type":["string","null"],"description":"Granularity of the recognition, or null."},"revenue_ledger_account_id":{"type":"string","description":"ID of the revenue ledger account the product posts to."},"deferred_ledger_account_id":{"type":"string","description":"ID of the deferred revenue ledger account the product posts to."},"unbilled_ledger_account_id":{"type":"string","description":"ID of the unbilled revenue ledger account the product posts to."},"revenue_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the revenue account, or null."},"deferred_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the deferred revenue account, or null."},"unbilled_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the unbilled revenue account, or null."}},"required":["status","method","granularity","revenue_ledger_account_id","deferred_ledger_account_id","unbilled_ledger_account_id","revenue_rule_id","deferred_rule_id","unbilled_rule_id"],"additionalProperties":false,"title":"Schedulable"},"ContractProductNotSchedulableRecognition":{"type":"object","properties":{"status":{"type":"string","enum":["not_schedulable"]},"reason":{"type":"string","description":"Why the product cannot be scheduled."}},"required":["status","reason"],"additionalProperties":false,"title":"Not schedulable"},"ContractProductRecognition":{"oneOf":[{"$ref":"#/components/schemas/ContractProductSchedulableRecognition"},{"$ref":"#/components/schemas/ContractProductNotSchedulableRecognition"}],"discriminator":{"propertyName":"status","mapping":{"schedulable":"#/components/schemas/ContractProductSchedulableRecognition","not_schedulable":"#/components/schemas/ContractProductNotSchedulableRecognition"}},"description":"The recognition the product's accounting rule resolves to, or why it cannot be scheduled."},"PerformanceObligationServicePeriodRecognition":{"type":"object","properties":{"kind":{"type":"string","enum":["service_period"]},"granularity":{"type":["string","null"],"enum":["day","month","quarter","year"],"description":"Granularity a `service_period` obligation spreads at, or null for a version assessed before obligations carried one."},"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product the record relates to."},"recognition":{"$ref":"#/components/schemas/ContractProductRecognition"}},"required":["product_id","recognition"]}}},"required":["kind","granularity","products"],"additionalProperties":false,"title":"Service period"},"PerformanceObligationConsumptionRecognition":{"type":"object","properties":{"kind":{"type":"string","enum":["consumption"]},"expected_units":{"type":["number","null"],"description":"Units the obligation entitles to over the term, or null while unknown."},"consumption":{"$ref":"#/components/schemas/RevenuePolicyConsumption"}},"required":["kind","expected_units","consumption"],"additionalProperties":false,"title":"Consumption"},"PerformanceObligationPointInTimeRecognition":{"type":"object","properties":{"kind":{"type":"string","enum":["point_in_time"]},"recognition_day":{"type":["string","null"],"description":"Local day (customer timezone, YYYY-MM-DD) a `point_in_time` obligation is recognized on: the first day of its first service period in the term. Null when unknown."}},"required":["kind","recognition_day"],"additionalProperties":false,"title":"At service start"},"PerformanceObligationMilestoneRecognition":{"type":"object","properties":{"kind":{"type":"string","enum":["milestone"]}},"required":["kind"],"additionalProperties":false,"title":"When delivered"},"PerformanceObligationRecognition":{"oneOf":[{"$ref":"#/components/schemas/PerformanceObligationServicePeriodRecognition"},{"$ref":"#/components/schemas/PerformanceObligationConsumptionRecognition"},{"$ref":"#/components/schemas/PerformanceObligationPointInTimeRecognition"},{"$ref":"#/components/schemas/PerformanceObligationMilestoneRecognition"}],"discriminator":{"propertyName":"kind","mapping":{"service_period":"#/components/schemas/PerformanceObligationServicePeriodRecognition","consumption":"#/components/schemas/PerformanceObligationConsumptionRecognition","point_in_time":"#/components/schemas/PerformanceObligationPointInTimeRecognition","milestone":"#/components/schemas/PerformanceObligationMilestoneRecognition"}},"description":"How the obligation is recognized."},"PerformanceObligation":{"type":"object","properties":{"id":{"type":"string","description":"Performance obligation ID."},"key":{"type":"string","description":"Stable identifier of the obligation across versions.","example":"platform"},"name":{"type":"string","description":"Name of the obligation."},"kind":{"type":"string","enum":["service_period","consumption","point_in_time","milestone"],"description":"How the obligation is delivered: `service_period` over its service periods, `consumption` as its units are consumed, `point_in_time` at the start of its first service period, `milestone` on the day a reviewer records its delivery. For an `allocated` obligation the kind sets when it is recognized; its products' accounting rules only supply the accounts."},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"`allocated` takes a share of the transaction price; `excluded` keeps its commercial amount and the recognition it has without a policy."},"sequence":{"type":"integer","description":"Position of the obligation in the assessment."},"product_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the products forming the obligation."},"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product the record relates to."},"name":{"type":["string","null"],"description":"Name of the product, or null when unknown."},"commercial_amount":{"type":"number","description":"Amount the contract commits for it. Expressed in currency's smallest unit."},"allocated_amount":{"type":["number","null"],"description":"Share of the transaction price allocated to it, or null while not allocated. Expressed in currency's smallest unit."}},"required":["product_id","name","commercial_amount","allocated_amount"]},"description":"Products of the obligation with their commercial and allocated amounts."},"commercial_amount":{"type":"number","description":"Amount the contract commits for it. Expressed in currency's smallest unit."},"standalone_selling_price_amount":{"type":["number","null"],"description":"Standalone selling price of the obligation for the term, or null when unknown. Expressed in currency's smallest unit."},"allocated_amount":{"type":["number","null"],"description":"Share of the transaction price allocated to it, or null while not allocated. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Revenue its schedules recognized so far, in the contract currency. Expressed in currency's smallest unit."},"delivered_on":{"type":["string","null"],"description":"Local day (customer timezone, YYYY-MM-DD) a `milestone` obligation was recorded delivered, or null until then and for any other kind."},"recognition":{"$ref":"#/components/schemas/PerformanceObligationRecognition"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Revenue recognition schedule ID."},"name":{"type":["string","null"],"description":"Name of the schedule's product, or null when unknown."},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"],"description":"Status of the revenue recognition schedule."},"total_amount":{"type":"number","description":"Amount the schedule recognizes over its life, net of cancellations, in the contract currency. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Revenue the schedule recognized so far, in the contract currency. Expressed in currency's smallest unit."}},"required":["id","name","status","total_amount","recognized_amount"]},"description":"Live revenue recognition schedules recognizing the obligation. Only the obligations of the applied version have some."}},"required":["id","key","name","kind","treatment","sequence","product_ids","products","commercial_amount","standalone_selling_price_amount","allocated_amount","recognized_amount","delivered_on","recognition","schedules"]},"AccountingException":{"type":"object","properties":{"id":{"type":"string","description":"Accounting exception ID.","example":"acx_9xQ1z4Ha7Gk2Lm"},"assessment_id":{"type":"string","description":"ID of the contract assessment the exception belongs to.","example":"caa_2Lm9xQ1z4Ha7Gk"},"assessment_version":{"type":"integer","description":"Assessment version that raised the exception."},"subscription_id":{"type":"string","description":"ID of the subscription holding the contract.","example":"sub_Gk2Lm9xQ1z4Ha7"},"customer_id":{"type":"string","description":"ID of the customer holding the contract.","example":"cus_Lm9xQ1z4Ha7Gk2"},"code":{"type":"string","enum":["missing_standalone_selling_price","standalone_selling_price_not_normalizable","unmapped_product","zero_allocation_basis","discount_exceeds_allocation","obligation_not_schedulable","recognition_rule_incompatible","periods_owned_by_invoice_schedules","review_required","override_review_required","override_out_of_date","modification_review_required","allocation_below_recognized","transition_review_required","billing_variance","consumption_breakage_review","milestone_not_delivered"],"description":"What the exception is about."},"severity":{"type":"string","enum":["blocking","informational"],"description":"`blocking` holds the contract's recognition until resolved, `informational` does not."},"status":{"type":"string","enum":["open","resolved","dismissed"],"description":"`open` until a new input, an override, an approval or a dismissal resolves it."},"obligation_key":{"type":["string","null"],"description":"Obligation the exception is about, or null for the whole contract."},"product_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the products the exception is about."},"evidence":{"type":"object","additionalProperties":{},"description":"Data the exception was raised from. Informational: its keys depend on the code and may grow."},"proposed_resolution":{"type":["object","null"],"additionalProperties":{},"description":"Suggested way to resolve the exception, or null. Informational: its keys depend on the code."},"compatibility_key":{"type":"string","description":"Exceptions sharing this key can be decided together in one bulk decision."},"decision_id":{"type":["string","null"],"description":"ID of the review decision that resolved the exception, or null."},"resolved_at":{"type":["string","null"],"format":"date-time","description":"When the exception was resolved, or null while open.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","assessment_id","assessment_version","subscription_id","customer_id","code","severity","status","obligation_key","product_ids","evidence","proposed_resolution","compatibility_key","decision_id","resolved_at","created_at"]},"AccountingVersionReviewDecision":{"type":"object","properties":{"id":{"type":"string","description":"Review decision ID.","example":"ard_Q1z4Ha7Gk2Lm9x"},"kind":{"type":"string","enum":["approval","rejection","exception_dismissal"],"description":"`approval`, `rejection`, `override`, `exception_dismissal` or `delivery`."},"reason":{"type":"string","description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."},"assessment_version":{"type":"integer","description":"Assessment version the decision is about: the version approved or rejected, the one that raised the dismissed exception, or the latest one when the delivery was recorded."},"batch_id":{"type":["string","null"],"description":"ID of the bulk decision, shared by every decision it took. Null for a decision taken alone."},"reviewer_user_id":{"type":["string","null"],"description":"ID of the user who took the decision, or null when it was taken with an API key."},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","kind","reason","assessment_version","batch_id","reviewer_user_id","created_at"],"additionalProperties":false,"title":"Approval, rejection or dismissal"},"AccountingStandaloneSellingPriceOverride":{"type":"object","properties":{"type":{"type":"string","enum":["standalone_selling_price"],"description":"What the override changes."},"obligation_key":{"type":"string","minLength":1,"description":"Obligation the override applies to.","example":"platform"},"amount":{"type":"number","minimum":0,"description":"Standalone selling price of the obligation for the whole contract term. Expressed in currency's smallest unit.","example":1200000},"evidence_method":{"type":"string","enum":["observable_price","adjusted_market_assessment","expected_cost_plus_margin","residual"],"description":"How the price was established: observable price, adjusted market assessment, expected cost plus margin, or residual approach."},"evidence_note":{"type":["string","null"],"description":"Free-text justification of the price, or null."}},"required":["type","obligation_key","amount","evidence_method","evidence_note"],"additionalProperties":false,"title":"Standalone selling price"},"AccountingObligationTreatmentOverride":{"type":"object","properties":{"type":{"type":"string","enum":["obligation_treatment"],"description":"What the override changes."},"obligation_key":{"type":"string","minLength":1,"description":"Obligation the override applies to.","example":"platform"},"treatment":{"type":"string","enum":["allocated","excluded"],"description":"Treatment the obligation takes."}},"required":["type","obligation_key","treatment"],"additionalProperties":false,"title":"Obligation treatment"},"AccountingAllocatedAmountsOverride":{"type":"object","properties":{"type":{"type":"string","enum":["allocated_amounts"],"description":"What the override changes."},"amounts":{"type":"array","items":{"type":"object","properties":{"obligation_key":{"type":"string","minLength":1,"description":"Obligation the override applies to.","example":"platform"},"amount":{"type":"number","minimum":0,"description":"Amount allocated to the obligation. Expressed in currency's smallest unit."}},"required":["obligation_key","amount"]},"minItems":1,"description":"Allocated amount of every allocated obligation, summing to the transaction price."}},"required":["type","amounts"],"additionalProperties":false,"title":"Allocated amounts"},"AccountingConsumptionUnitsOverride":{"type":"object","properties":{"type":{"type":"string","enum":["consumption_units"],"description":"What the override changes."},"obligation_key":{"type":"string","minLength":1,"description":"Obligation the override applies to.","example":"platform"},"expected_units":{"type":"number","minimum":0,"description":"Units the obligation entitles to over the term.","example":100000}},"required":["type","obligation_key","expected_units"],"additionalProperties":false,"title":"Consumption units"},"AccountingOverride":{"oneOf":[{"$ref":"#/components/schemas/AccountingStandaloneSellingPriceOverride"},{"$ref":"#/components/schemas/AccountingObligationTreatmentOverride"},{"$ref":"#/components/schemas/AccountingAllocatedAmountsOverride"},{"$ref":"#/components/schemas/AccountingConsumptionUnitsOverride"}],"discriminator":{"propertyName":"type","mapping":{"standalone_selling_price":"#/components/schemas/AccountingStandaloneSellingPriceOverride","obligation_treatment":"#/components/schemas/AccountingObligationTreatmentOverride","allocated_amounts":"#/components/schemas/AccountingAllocatedAmountsOverride","consumption_units":"#/components/schemas/AccountingConsumptionUnitsOverride"}},"description":"What the reviewer changes on the contract. Applies to every later assessment version until revoked."},"AccountingOverrideReviewDecision":{"type":"object","properties":{"id":{"type":"string","description":"Review decision ID.","example":"ard_Q1z4Ha7Gk2Lm9x"},"kind":{"type":"string","enum":["override"],"description":"`approval`, `rejection`, `override`, `exception_dismissal` or `delivery`."},"reason":{"type":"string","description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."},"override":{"$ref":"#/components/schemas/AccountingOverride"},"batch_id":{"type":["string","null"],"description":"ID of the bulk decision, shared by every decision it took. Null for a decision taken alone."},"reviewer_user_id":{"type":["string","null"],"description":"ID of the user who took the decision, or null when it was taken with an API key."},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When the override or delivery was revoked, or null.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","kind","reason","override","batch_id","reviewer_user_id","revoked_at","created_at"],"additionalProperties":false,"title":"Override"},"AccountingDeliveryReviewDecision":{"type":"object","properties":{"id":{"type":"string","description":"Review decision ID.","example":"ard_Q1z4Ha7Gk2Lm9x"},"kind":{"type":"string","enum":["delivery"],"description":"`approval`, `rejection`, `override`, `exception_dismissal` or `delivery`."},"reason":{"type":"string","description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."},"assessment_version":{"type":"integer","description":"Assessment version the decision is about: the version approved or rejected, the one that raised the dismissed exception, or the latest one when the delivery was recorded."},"delivery":{"type":"object","properties":{"obligation_key":{"type":"string","description":"Key of the `milestone` obligation delivered, in the contract's latest assessment version.","example":"platform"},"delivered_on":{"type":"string","description":"Local day (customer timezone, YYYY-MM-DD) the obligation was delivered: not in the future, not before the contract term starts. Its whole allocated amount is recognized that day (in the first open month when that month is closed), once a version of the contract is applied. An obligation is delivered once until the delivery is revoked; a delivery does not send the contract back to review.","example":"2026-03-31"}},"required":["obligation_key","delivered_on"],"description":"The delivery recorded."},"batch_id":{"type":["string","null"],"description":"ID of the bulk decision, shared by every decision it took. Null for a decision taken alone."},"reviewer_user_id":{"type":["string","null"],"description":"ID of the user who took the decision, or null when it was taken with an API key."},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When the override or delivery was revoked, or null.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["id","kind","reason","assessment_version","delivery","batch_id","reviewer_user_id","revoked_at","created_at"],"additionalProperties":false,"title":"Delivery"},"AccountingReviewDecision":{"oneOf":[{"$ref":"#/components/schemas/AccountingVersionReviewDecision"},{"$ref":"#/components/schemas/AccountingOverrideReviewDecision"},{"$ref":"#/components/schemas/AccountingDeliveryReviewDecision"}],"discriminator":{"propertyName":"kind","mapping":{"approval":"#/components/schemas/AccountingVersionReviewDecision","rejection":"#/components/schemas/AccountingVersionReviewDecision","exception_dismissal":"#/components/schemas/AccountingVersionReviewDecision","override":"#/components/schemas/AccountingOverrideReviewDecision","delivery":"#/components/schemas/AccountingDeliveryReviewDecision"}}},"ContractAssessmentDetail":{"type":"object","properties":{"id":{"type":"string","description":"Contract assessment ID.","example":"caa_2Lm9xQ1z4Ha7Gk"},"ledger_id":{"type":"string","description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"subscription_id":{"type":"string","description":"ID of the subscription holding the contract.","example":"sub_Gk2Lm9xQ1z4Ha7"},"customer_id":{"type":"string","description":"ID of the customer holding the contract.","example":"cus_Lm9xQ1z4Ha7Gk2"},"term_start_at":{"type":"string","format":"date-time","description":"Start of the assessed contract term.","example":"2024-12-20T16:04:11Z"},"term_end_at":{"type":["string","null"],"format":"date-time","description":"End of the assessed contract term: the end of its last day in the subscription's timezone, or null when the subscription cannot be found.","example":"2024-12-20T16:04:11Z"},"timezone":{"type":["string","null"],"description":"Timezone of the subscription, in which the term's start and end are day boundaries, or null when the subscription cannot be found.","example":"Europe/Paris"},"policy_id":{"type":"string","description":"ID of the revenue policy the contract is assessed under.","example":"rpol_3fJ8kZx1Lq9a2B"},"policy_name":{"type":"string","description":"Name of the revenue policy.","example":"Enterprise contracts"},"policy_version":{"type":"integer","description":"Version number of the revenue policy the contract is pinned to."},"latest_version":{"type":"integer","description":"Number of the latest assessment version."},"applied_version":{"type":["integer","null"],"description":"Number of the assessment version driving recognition, or null while none does."},"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":"Contract currency.","example":"EUR"},"transaction_price":{"type":"number","description":"Consideration of the contract term allocated across its obligations. Expressed in currency's smallest unit."},"invoiced_amount":{"type":"number","description":"Amount billed so far on the contract's revenue recognition schedules, net of credit notes and voids, in the contract currency. Expressed in currency's smallest unit."},"recognized_amount":{"type":"number","description":"Revenue recognized so far on the contract's revenue recognition schedules, in the contract currency. Expressed in currency's smallest unit."},"deferred_amount":{"type":"number","description":"Current deferred revenue position of the contract (billed, not yet recognized), in the contract currency. Expressed in currency's smallest unit."},"unbilled_amount":{"type":"number","description":"Current unbilled revenue position of the contract (recognized, not yet billed), in the contract currency. Expressed in currency's smallest unit."},"calculation_status":{"type":"string","enum":["complete","incomplete"],"description":"Whether the assessment could be computed, or misses an input such as a standalone selling price."},"review_status":{"type":"string","enum":["not_required","pending","approved","rejected"],"description":"Whether the assessment awaits, passed or failed a review."},"recognition_status":{"type":"string","enum":["eligible","held"],"description":"`eligible` when the version may drive recognition, `held` while an input, a review or a blocking exception holds it."},"open_exception_count":{"type":"integer","description":"Number of open exceptions of the contract."},"updated_at":{"type":"string","format":"date-time","description":"When the record last changed.","example":"2024-12-20T16:04:11Z"},"invoice_owned_amount":{"type":"number","description":"Total of the term's periods recognized by their invoices' own revenue recognition schedules (invoice-sourced), net of cancellations, in the contract currency. They stay with their invoices and are not part of `transaction_price` nor `recognized_amount`: the contract value is `transaction_price` plus this amount. Expressed in currency's smallest unit."},"invoice_owned_recognized_amount":{"type":"number","description":"Part of `invoice_owned_amount` recognized so far, in the contract currency. Expressed in currency's smallest unit."},"version":{"$ref":"#/components/schemas/ContractAssessmentVersion"},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/PerformanceObligation"},"description":"Performance obligations of the version, in order."},"exceptions":{"type":"array","items":{"$ref":"#/components/schemas/AccountingException"},"description":"Open exceptions of the contract."},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReviewDecision"},"description":"Review decisions on the contract, newest first."},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","description":"Version number of the assessment."},"change_kind":{"type":"string","enum":["initial","amendment","cancellation","billing_variance","input_update","transition"],"description":"What produced the version: the initial assessment, an amendment, a cancellation, an invoice billing another amount than planned, a changed input (standalone selling price or override), or the transition of a contract already recognized another way."},"review_status":{"type":"string","enum":["not_required","pending","approved","rejected"],"description":"Whether the assessment awaits, passed or failed a review."},"recognition_status":{"type":"string","enum":["eligible","held"],"description":"`eligible` when the version may drive recognition, `held` while an input, a review or a blocking exception holds it."},"applied_at":{"type":["string","null"],"format":"date-time","description":"When the version started driving recognition, or null.","example":"2024-12-20T16:04:11Z"},"created_at":{"type":"string","format":"date-time","description":"When the record was created.","example":"2024-12-20T16:04:11Z"}},"required":["version","change_kind","review_status","recognition_status","applied_at","created_at"]},"description":"Every version of the assessment, newest first."}},"required":["id","ledger_id","subscription_id","customer_id","term_start_at","term_end_at","timezone","policy_id","policy_name","policy_version","latest_version","applied_version","currency","transaction_price","invoiced_amount","recognized_amount","deferred_amount","unbilled_amount","calculation_status","review_status","recognition_status","open_exception_count","updated_at","invoice_owned_amount","invoice_owned_recognized_amount","version","obligations","exceptions","decisions","versions"]},"AccountingExceptionPaginated":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/AccountingPaginationMeta"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingException"}}},"required":["meta","data"]},"AccountingExceptionCount":{"type":"object","properties":{"open":{"type":"integer","description":"Contracts with at least one open exception."},"blocking":{"type":"integer","description":"Contracts with at least one open blocking exception, whose recognition is on hold."}},"required":["open","blocking"]},"AccountingExceptionBulkDecisionResult":{"type":"object","properties":{"batch_id":{"type":"string","description":"ID of the bulk decision, shared by every decision it took. Null for a decision taken alone."},"exceptions":{"type":"array","items":{"$ref":"#/components/schemas/AccountingException"},"description":"Open exceptions to decide, of contracts sharing a compatibility key."}},"required":["batch_id","exceptions"]},"AccountingApprovalBulkDecision":{"type":"object","properties":{"kind":{"type":"string","enum":["approval"]}},"required":["kind"],"additionalProperties":false,"title":"Approval"},"AccountingOverrideBulkDecision":{"type":"object","properties":{"kind":{"type":"string","enum":["override"]},"override":{"$ref":"#/components/schemas/AccountingOverride"}},"required":["kind","override"],"additionalProperties":false,"title":"Override"},"AccountingBulkDecision":{"oneOf":[{"$ref":"#/components/schemas/AccountingApprovalBulkDecision"},{"$ref":"#/components/schemas/AccountingOverrideBulkDecision"}],"discriminator":{"propertyName":"kind","mapping":{"approval":"#/components/schemas/AccountingApprovalBulkDecision","override":"#/components/schemas/AccountingOverrideBulkDecision"}},"description":"`approval` approves each contract's latest version; `override` records the same override on each contract."},"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":"ID of the customer the contribution relates to."},"customer_name":{"type":["string","null"],"description":"Related customer name."},"invoice_id":{"type":["string","null"],"description":"ID of the invoice the contribution relates to."},"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":"ID of the revenue recognition schedule the contribution comes from."},"slice_id":{"type":["string","null"],"description":"ID of the revenue recognition slice the contribution comes from."},"subscription_id":{"type":["string","null"],"description":"ID of the subscription the contribution relates to."},"product_id":{"type":["string","null"],"description":"ID of the product the contribution relates to."},"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":"ID of the manual journal entry the schedule was created with."}},"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":"ID of the subscription accruing the unbilled revenue."},"open_invoice_id":{"type":["string","null"],"description":"ID of the subscription's current open invoice."},"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 ID."},"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":"Revenue recognition slice ID."},"schedule_id":{"type":"string","description":"ID of the revenue recognition schedule the slice belongs to."},"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":"ID of the journal entry that recognized the slice."},"reversing_journal_entry_id":{"type":["string","null"],"description":"ID of the journal entry that reversed the slice."},"usage_event_id":{"type":["string","null"],"description":"ID of the usage event the slice relates to."},"milestone_event_id":{"type":["string","null"],"description":"ID of the milestone event the slice relates to."},"last_observed_units":{"type":["string","null"],"description":"Last observed usage units for this slice."},"ledger_id":{"type":"string","description":"ID of the ledger the slice belongs to."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity that owns the slice."},"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":"Revenue recognition schedule ID."},"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."},"source":{"type":"string","enum":["invoice","contract"],"description":"What the schedule recognizes: an `invoice` line, or a `contract`'s committed amounts."},"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":"ID of the credit transaction the schedule relates to."},"deferred_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred revenue ledger account the schedule posts to."},"revenue_ledger_account_id":{"type":"string","description":"ID of the revenue ledger account the schedule posts to."},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred discount ledger account the schedule posts to."},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"ID of the contra-revenue ledger account the schedule posts to."},"unbilled_ledger_account_id":{"type":["string","null"],"description":"ID of the unbilled revenue ledger account the schedule posts to."},"revenue_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the revenue account."},"deferred_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the deferred revenue account."},"unbilled_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the unbilled revenue account."},"contra_revenue_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the contra-revenue account."},"deferred_discount_rule_id":{"type":["string","null"],"description":"ID of the accounting rule giving the deferred discount account."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity that owns the schedule."},"ledger_id":{"type":"string","description":"ID of the ledger the schedule belongs to."},"invoice_id":{"type":["string","null"],"description":"ID of the invoice the schedule relates to."},"invoice_line_item_id":{"type":["string","null"],"description":"ID of the invoice line item the schedule relates to."},"journal_entry_id":{"type":["string","null"],"description":"ID of the manual journal entry the schedule was created with."},"subscription_id":{"type":["string","null"],"description":"ID of the subscription the schedule relates to."},"customer_id":{"type":["string","null"],"description":"ID of the customer the schedule relates to."},"billing_item_id":{"type":["string","null"],"description":"ID of the billing item the schedule relates to."},"billing_item_on_subscription_id":{"type":["string","null"],"description":"ID of the subscription billing item the schedule relates to."},"contract_assessment_id":{"type":["string","null"],"description":"ID of the contract assessment the schedule belongs to. Null unless a revenue policy governs the contract."},"performance_obligation":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Performance obligation ID."},"key":{"type":"string","description":"Stable key of the obligation across assessment versions."},"name":{"type":"string","description":"Name of the obligation."}},"required":["id","key","name"],"description":"Performance obligation the schedule recognizes when a revenue policy governs the contract, else null."},"recognition_held_at":{"type":["string","null"],"format":"date","description":"When recognition was put on hold while the contract assessment waits for an input or a review, else null. A held schedule recognizes nothing until released."},"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","source","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","contract_assessment_id","performance_obligation","recognition_held_at","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":"Adjustment audit record ID."},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the adjustment occurred."},"actor":{"type":"object","properties":{"user_id":{"type":["string","null"],"description":"ID of the user who acted, when authenticated as a user."},"api_credential_id":{"type":["string","null"],"description":"ID of the API key used, 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":"ID of the adjusted slice. Set for point adjustments."},"journal_entry_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the 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"]},"AccountingRevRecInvoiceContractBilling":{"type":"object","properties":{"billed_by_contract":{"type":"boolean","description":"Whether the invoice or credit note billed contract revenue recognition schedules on the ledger. Its lines a contract schedule covers create no schedule of their own."}},"required":["billed_by_contract"]},"AccountingOverview":{"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 of the ledger, in which every amount is.","example":"EUR"},"year":{"type":"integer","description":"Calendar year of the overview.","example":2026},"metrics":{"type":"object","properties":{"recognized":{"type":"number","description":"Revenue recognized over the year: the sum of `months[].recognized`.","example":12450000},"deferred_revenue":{"type":"number","description":"Deferred revenue at the end of the year: the sum of the `closing` steps of the deferred accounts' movements.","example":3200000},"unbilled_revenue":{"type":"number","description":"Unbilled revenue at the end of the year: the sum of the `closing` steps of the unbilled accounts' movements.","example":450000},"remaining_to_recognize":{"type":"number","description":"Revenue left to recognize on the live schedules, today: the sum of `timing`.","example":8900000}},"required":["recognized","deferred_revenue","unbilled_revenue","remaining_to_recognize"],"description":"Headline figures."},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Calendar month, YYYY-MM.","example":"2026-03"},"net_billed":{"type":"number","description":"Invoices less credit notes emitted in the month (excluding tax), in the ledger currency at the rate of their posting entry. A document without a posting entry on the ledger counts nothing."},"recognized":{"type":"number","description":"Revenue recognized for the month (recognized slices, by recognition month)."},"scheduled":{"type":"number","description":"Revenue planned for the month and not recognized yet (pending slices)."},"is_open":{"type":"boolean","description":"Whether the month is after the ledger's last closed month."}},"required":["month","net_billed","recognized","scheduled","is_open"]},"description":"The twelve months of the year, in order."},"movements":{"type":"array","items":{"type":"object","properties":{"ledger_account":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the ledger account.","example":"lac_2Lm9xQ1z4Ha7Gk"},"code":{"type":"string","description":"Code of the ledger account.","example":"2100"},"name":{"type":"string","description":"Name of the ledger account.","example":"Deferred revenue"}},"required":["id","code","name"],"description":"Ledger account of the rollforward."},"type":{"type":"string","enum":["deferred","unbilled"],"description":"`deferred` for a deferred revenue (contract liability) account, `unbilled` for an unbilled revenue (contract asset) account."},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["opening","billing","recognition","credit_notes","accrued","invoiced","other","closing"],"description":"`opening` (balance at the start of the year), `billing` (invoices posted to a deferred account), `recognition` (revenue recognized out of a deferred account), `credit_notes`, `accrued` (revenue recognized into an unbilled account), `invoiced` (invoices and credit notes clearing an unbilled account), `other` (manual and other entries), `closing` (balance at the end of the year)."},"amount":{"type":"number","description":"Movement of the step, signed as the account's balance: positive increases it."}},"required":["key","amount"]},"description":"Steps of the rollforward, so that `opening` plus the steps between equals `closing`."}},"required":["ledger_account","type","steps"]},"description":"Rollforward of each deferred and unbilled revenue account over the year, from posted journal entry lines."},"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":["string","null"],"description":"Identifier of the product, or null for the `other` row.","example":"itm_4Ha7Gk2Lm9xQ1z"},"name":{"type":["string","null"],"description":"Name of the product, or null for the `other` row."},"recognized":{"type":"number","description":"Revenue recognized so far on its schedules."},"remaining":{"type":"number","description":"Revenue left to recognize on its schedules."}},"required":["product_id","name","recognized","remaining"]},"description":"Revenue recognized and remaining by product on the live schedules: the top products, then one `other` row (null `product_id`) folding the rest and the schedules with no product."},"timing":{"type":"object","properties":{"next_12_months":{"type":"number","description":"Planned in the next 12 months from today."},"later":{"type":"number","description":"Planned after the next 12 months."},"not_scheduled":{"type":"number","description":"Not dated yet: the remainder of a held contract or of an event-driven obligation (consumption, milestone)."}},"required":["next_12_months","later","not_scheduled"],"description":"Revenue left to recognize, by when it is planned."},"contracts":{"type":"object","properties":{"recognizing":{"type":"integer","description":"Contracts recognizing revenue, not fully recognized yet."},"on_hold":{"type":"integer","description":"Contracts whose recognition is held, by a missing input (such as a standalone selling price) or a blocking exception."},"to_review":{"type":"integer","description":"Contracts waiting for a reviewer's decision."},"rejected":{"type":"integer","description":"Contracts whose latest version a reviewer rejected."},"recognized":{"type":"integer","description":"Contracts that recognized their whole transaction price."}},"required":["recognizing","on_hold","to_review","rejected","recognized"],"description":"Contracts governed by a revenue policy on the ledger, by status; the counts sum to those contracts."},"attention":{"type":"object","properties":{"open_issues":{"type":"integer","description":"Open accounting exceptions of the ledger's contracts."},"to_mark_delivered":{"type":"integer","description":"Allocated `milestone` obligations of applied contracts not delivered yet."},"first_open_month":{"type":["string","null"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Month ready to close (YYYY-MM): the month after the last closed one, or the month of the ledger's first posted entry when none was closed. Null when that month has not ended yet or the ledger has no posted entry. Not restricted by `customer_segment_id`.","example":"2026-03"}},"required":["open_issues","to_mark_delivered","first_open_month"],"description":"What needs attention on the ledger."}},"required":["currency","year","metrics","months","movements","products","timing","contracts","attention"],"description":"Revenue recognition overview of a ledger for a calendar year. Amounts are whole minor units of the ledger currency (cents for EUR), rounded so every total equals the sum of its parts."},"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":"Accounting rule ID.","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":"ID of the ledger the accounting rules belong 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":"IDs of the products the rule matches. 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":"IDs of the customers the rule matches, 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":"IDs of the coupons the rule matches. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the provider connections the rule matches. 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":"IDs of the bank accounts the rule matches. 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":"ID of the revenue ledger account invoice line revenue is routed to.","example":"lac_abc123def456"},"revenue_ledger_account":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Ledger account ID.","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":"ID of the deferred revenue ledger account used before revenue is recognized.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred discount ledger account used before discounts are recognized.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"ID of the contra revenue ledger account for amounts that reduce revenue.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"ID of the discount ledger account for recognized discounts.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"ID of the accounts receivable ledger account invoices are posted to.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"ID of the cash ledger account payments settle to.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"ID of the payments clearing ledger account used while payments settle.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"ID of the output tax ledger account for tax liability.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"ID of the ledger account debited when an invoice becomes uncollectible. Set on invoice_posted and accounting_software (invoice side) rules. 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":"ID of the allowance for doubtful accounts ledger account. Set on credit_note_created rules.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"ID of the expense ledger account debited for payment provider fees when a payment settles.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"ID of the expense ledger account 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":"ID of the revenue ledger account for payment processing fees. Set on invoice_settled rules.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"ID of the customer credits ledger account 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":"ID of the journal entries are routed to 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":"ID of the ledger the accounting rules belong 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":"IDs of the products the rule matches. 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":"IDs of the customers the rule matches, 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":"IDs of the coupons the rule matches. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"IDs of the provider connections the rule matches. 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":"IDs of the bank accounts the rule matches. 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":"ID of the revenue ledger account invoice line revenue is routed to. 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":"ID of the deferred revenue ledger account used before revenue is recognized. Must be a `liability` account.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred discount ledger account 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":"ID of the contra revenue ledger account for amounts that reduce revenue. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"ID of the discount ledger account for recognized discounts. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"ID of the accounts receivable ledger account invoices are posted to. Must be an `asset` account.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"ID of the cash ledger account payments settle to. Must be an `asset` account.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"ID of the payments clearing ledger account used while payments settle. Must be an `asset` account.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"ID of the output tax ledger account for tax liability. Must be a `liability` account.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"ID of the ledger account debited when an invoice becomes uncollectible. Set on invoice_posted and accounting_software (invoice side) rules. 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":"ID of the allowance for doubtful accounts ledger account. 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":"ID of the expense ledger account 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":"ID of the expense ledger account 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":"ID of the revenue ledger account for payment processing fees. Set on invoice_settled rules. Must be a `revenue` account.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"ID of the customer credits ledger account 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":"ID of the journal entries are routed to 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":"IDs of the products the rule matches. 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":"IDs of the customers the rule matches, 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":"IDs of the coupons the rule matches. Empty means match all.","example":["cpn_abc123def456"]},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the provider connections the rule matches. 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":"IDs of the bank accounts the rule matches. 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":"ID of the revenue ledger account invoice line revenue is routed to. 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":"ID of the deferred revenue ledger account used before revenue is recognized. Must be a `liability` account.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred discount ledger account 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":"ID of the contra revenue ledger account for amounts that reduce revenue. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"ID of the discount ledger account for recognized discounts. Must be a `contra_revenue` account.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"ID of the accounts receivable ledger account invoices are posted to. Must be an `asset` account.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"ID of the cash ledger account payments settle to. Must be an `asset` account.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"ID of the payments clearing ledger account used while payments settle. Must be an `asset` account.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"ID of the output tax ledger account for tax liability. Must be a `liability` account.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"ID of the ledger account debited when an invoice becomes uncollectible. Set on invoice_posted and accounting_software (invoice side) rules. 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":"ID of the allowance for doubtful accounts ledger account. 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":"ID of the expense ledger account 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":"ID of the expense ledger account 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":"ID of the revenue ledger account for payment processing fees. Set on invoice_settled rules. Must be a `revenue` account.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"ID of the customer credits ledger account 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":"ID of the journal entries are routed to 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":"ID of the revenue ledger account invoice line revenue is routed to.","example":"lac_abc123def456"},"deferred_revenue_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred revenue ledger account used before revenue is recognized.","example":"lac_abc123def456"},"deferred_discount_ledger_account_id":{"type":["string","null"],"description":"ID of the deferred discount ledger account used before discounts are recognized.","example":"lac_abc123def456"},"contra_revenue_ledger_account_id":{"type":["string","null"],"description":"ID of the contra revenue ledger account for amounts that reduce revenue.","example":"lac_abc123def456"},"discount_ledger_account_id":{"type":["string","null"],"description":"ID of the discount ledger account for recognized discounts.","example":"lac_abc123def456"},"ar_ledger_account_id":{"type":["string","null"],"description":"ID of the accounts receivable ledger account invoices are posted to.","example":"lac_abc123def456"},"cash_ledger_account_id":{"type":["string","null"],"description":"ID of the cash ledger account payments settle to.","example":"lac_abc123def456"},"payments_clearing_ledger_account_id":{"type":["string","null"],"description":"ID of the payments clearing ledger account used while payments settle.","example":"lac_abc123def456"},"output_tax_ledger_account_id":{"type":["string","null"],"description":"ID of the output tax ledger account for tax liability.","example":"lac_abc123def456"},"uncollectible_debit_ledger_account_id":{"type":["string","null"],"description":"ID of the ledger account debited when an invoice becomes uncollectible. Set on invoice_posted and accounting_software (invoice side) rules. 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":"ID of the allowance for doubtful accounts ledger account. Set on credit_note_created rules.","example":"lac_abc123def456"},"provider_fees_expense_ledger_account_id":{"type":["string","null"],"description":"ID of the expense ledger account debited for payment provider fees when a payment settles.","example":"lac_abc123def456"},"payment_processing_fees_expense_ledger_account_id":{"type":["string","null"],"description":"ID of the expense ledger account 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":"ID of the revenue ledger account for payment processing fees. Set on invoice_settled rules.","example":"lac_abc123def456"},"customer_credits_ledger_account_id":{"type":["string","null"],"description":"ID of the customer credits ledger account 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":"ID of the journal entries are routed to in the accounting provider.","example":"jou_abc123def456"},"trace":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"string","description":"ID of the accounting rule 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":"ID of the ledger the accounting rules belong 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":"ID of the product to resolve rules 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":"ID of the customer to resolve rules against.","example":"cus_abc123def456"},"coupon_id":{"type":"string","description":"ID of the coupon to resolve rules against.","example":"cpn_abc123def456"},"client_provider_id":{"type":"string","description":"ID of the provider connection to resolve rules 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":"ID of the bank account to resolve rules 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":"ID of the customer the usage total belongs to."},"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":"Billable 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":"Resource ID.","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"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"IDs of the products charged on this plan's invoices, 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":"IDs of the price configurations matching `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","credit_product_id","rate_card_id","agents","all_agents_enabled","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","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":"Resource ID.","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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]},"attached_product_id":{"type":["string","null"],"description":"ID of the credit product using this card as its default. Null when none.","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","vendor_defaults","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":"ID of the active custom cost-item version, used to update or delete the item. Null for registry models. An update returns a new ID and preserves historical prices.","example":null},"unlisted_items":{"type":["string","null"],"enum":["free"],"description":"Set on an unlisted cost item whose vendor has a cost vendor default: free means it costs zero on purpose and is not missing a cost. Null otherwise.","example":"free"},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Resource ID.","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","unlisted_items","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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"plan_id":{"type":["string","null"],"description":"ID of the plan that billed this entry. Null on custom terms and on entries recorded before plans were tracked on the ledger.","example":"aiplan_example"},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this entry was drawn against, when it is not the entry's own customer (a parent organisation's). Null when the customer drew from its own balance.","example":null},"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","unlisted"],"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.\n- unlisted: No rate card row lists this item, and the card's vendor default makes the vendor's unlisted items free. Not counted as unpriced.","example":"priced"},"token_classes":{"type":"object","properties":{"input_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact decimal string. Interpret the unit using the field description and denomination.","example":"0.0021"},"output_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact decimal string. Interpret the unit using the field description and denomination.","example":"0.0021"},"cached_input_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact decimal string. Interpret the unit using the field description and denomination.","example":"0.0021"},"cache_write_tokens":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact decimal string. Interpret the unit using the field description and denomination.","example":"0.0021"}},"required":["input_tokens","output_tokens","cached_input_tokens","cache_write_tokens"],"description":"Tokens of an LLM call per class, as exact decimal strings: input_tokens (taken as reported, which must exclude cache reads: the SDK integrations subtract them, a direct consume call is trusted), output_tokens (output, reasoning included), cached_input_tokens (cache reads, from extra.cached_input_tokens) and cache_write_tokens (cache writes, from extra.cache_write_tokens). Disjoint given that input contract; together they are every token of the call, while quantity stays input_tokens + output_tokens. Present on llm_call lines recorded since this field exists; absent on older lines and other kinds.","example":{"input_tokens":"9000","output_tokens":"3400","cached_input_tokens":"20000","cache_write_tokens":"0"}},"usage_extra":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Exact decimal string. Interpret the unit using the field description and denomination.","example":"0.0021"},"description":"Quantities of the LLM call's other usage dimensions (for example web_search), keyed as reported in the call's extra usage, as exact decimal strings, priced or not. Excludes cached_input_tokens and cache_write_tokens (in token_classes) and the reserved names input_tokens, output_tokens, tokens and reasoning_tokens. Present on llm_call lines recorded since this field exists when the call reported such usage; absent otherwise.","example":{"web_search":"2"}}},"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":"ID of the credit transaction, 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","plan_id","balance_customer_id","amount","denomination","breakdown","unpriced_lines","overage","idempotency_key","credit_transaction_id","settled_at","created_at"]},"description":"List of AgentConsumptionEntry."}},"required":["meta","data"]},"ApprovalDelegation":{"type":"object","properties":{"id":{"type":"string","description":"Approval delegation ID.","example":"apd_9dKs02LmPq1a3Z"},"status":{"type":"string","enum":["scheduled","active","expired","revoked"],"description":"Lifecycle status: `scheduled` before `starts_at`, `active` between `starts_at` and `ends_at`, `expired` after `ends_at`, `revoked` once revoked.","example":"active"},"delegator_id":{"type":"string","description":"ID of the user whose approvals are delegated, typically the one out of office.","example":"usr_4sYw1nB8xKe0Qm"},"delegate_id":{"type":"string","description":"ID of the user who approves on behalf of the delegator.","example":"usr_7GhT2pLq9ZcV3r"},"starts_at":{"type":"string","format":"date-time","description":"UTC timestamp when the delegation starts.","example":"2026-12-21T00:00:00Z"},"ends_at":{"type":"string","format":"date-time","description":"UTC timestamp when the delegation ends. Must be in the future.","example":"2027-01-04T00:00:00Z"},"reason":{"type":["string","null"],"description":"Free-text reason, such as an out-of-office period.","example":"Christmas holidays"},"created_at":{"type":"string","format":"date-time","description":"UTC timestamp when the delegation was created.","example":"2024-12-20T16:04:11Z"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"UTC timestamp when the delegation was revoked, or null.","example":"2024-12-20T16:04:11Z"}},"required":["id","status","delegator_id","delegate_id","starts_at","ends_at","reason","created_at","revoked_at"]},"PaginatedApprovalDelegation":{"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/ApprovalDelegation"},"description":"List of ApprovalDelegation."}},"required":["meta","data"]},"ApprovalDelegationError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","description":"Stable reason: approval_user_not_found, approval_actor_not_allowed or approval_delegation_not_found."}},"required":["message"]},"CreateApprovalDelegationCommand":{"type":"object","properties":{"delegator_id":{"type":"string","minLength":1,"description":"ID of the account member whose approvals are delegated. Supply exactly one of `delegator_id` or `delegator_email`.","example":"usr_4sYw1nB8xKe0Qm"},"delegator_email":{"type":"string","format":"email","description":"Email of the account member whose approvals are delegated, matched case-insensitively. Supply exactly one of `delegator_id` or `delegator_email`.","example":"jane@acme.com"},"delegate_id":{"type":"string","minLength":1,"description":"ID of the account member who approves on behalf of the delegator. Supply exactly one of `delegate_id` or `delegate_email`.","example":"usr_7GhT2pLq9ZcV3r"},"delegate_email":{"type":"string","format":"email","description":"Email of the account member who approves on behalf of the delegator, matched case-insensitively. Supply exactly one of `delegate_id` or `delegate_email`.","example":"john@acme.com"},"starts_at":{"type":"string","format":"date-time","description":"UTC timestamp when the delegation starts.","example":"2026-12-21T00:00:00Z"},"ends_at":{"type":"string","format":"date-time","description":"UTC timestamp when the delegation ends. Must be in the future.","example":"2027-01-04T00:00:00Z"},"reason":{"type":["string","null"],"maxLength":500,"description":"Free-text reason, such as an out-of-office period. Maximum 500 characters.","example":"Christmas holidays"},"acting_user_id":{"type":"string","minLength":1,"description":"ID of the account member performing the action, recorded as its author. Supply at most one of `acting_user_id` or `acting_user_email`. With an API key and no acting user, the action is attributed to the API key. With a user token, it must be the authenticated user."},"acting_user_email":{"type":"string","format":"email","description":"Email of the account member performing the action, matched case-insensitively. Supply at most one of `acting_user_id` or `acting_user_email`. With an API key and no acting user, the action is attributed to the API key. With a user token, it must be the authenticated user."}},"required":["starts_at","ends_at"],"additionalProperties":false},"RevokeApprovalDelegationCommand":{"type":"object","properties":{"acting_user_id":{"type":"string","minLength":1,"description":"ID of the account member performing the action, recorded as its author. Supply at most one of `acting_user_id` or `acting_user_email`. With an API key and no acting user, the action is attributed to the API key. With a user token, it must be the authenticated user."},"acting_user_email":{"type":"string","format":"email","description":"Email of the account member performing the action, matched case-insensitively. Supply at most one of `acting_user_id` or `acting_user_email`. With an API key and no acting user, the action is attributed to the API key. With a user token, it must be the authenticated user."}},"additionalProperties":false},"ApprovalRequestQuote":{"type":"object","properties":{"type":{"type":"string","enum":["quote"],"description":"Type of entity requiring approval."},"quote_id":{"type":"string","description":"ID 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":"ID 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":"ID 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":"ID 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":"ID 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":"Decision ID."},"approver_id":{"type":"string","description":"ID of the effective approver, which can be the delegator."},"actor_user_id":{"type":"string","description":"ID of the user who made the decision."},"approval_delegation_id":{"type":["string","null"],"description":"ID of the approval delegation used. 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":"IDs of the user roles that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the users who 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":"Approval request ID."},"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":"Approval workflow version ID."},"version":{"type":"integer","description":"Version of the approval workflow."},"original_workflow_id":{"type":["string","null"],"description":"ID of the original workflow. 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":"ID of the user who requested approval."},"requester_comment":{"type":["string","null"],"description":"Comment supplied when requesting approval."},"current_step_id":{"type":["string","null"],"description":"ID of the current workflow step. 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":"ID of the expected current workflow step. A stale step is rejected instead of deciding the next step."},"approver_id":{"type":"string","minLength":1,"description":"ID 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":"ID of the expected current workflow step. 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":"ID of the expected current workflow step. A stale step is rejected instead of deciding the next step."},"approver_id":{"type":"string","minLength":1,"description":"ID 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":"ID of the expected current workflow step. 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":"IDs of the products 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},"category":{"type":["string","null"],"description":"Approval category of the workflow, `null` for the default category. Only the first matching workflow of a category applies, by priority, and each category with a match requires its own approval: the quote, invoice or subscription update is approved once all of them are.","example":"Discount"},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match, within the same category.","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":"ID of the original workflow 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","category","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},"category":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Approval category of the workflow, `null` for the default category. Only the first matching workflow of a category applies, by priority, and each category with a match requires its own approval: the quote, invoice or subscription update is approved once all of them are.","example":"Discount"},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match, within the same category.","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":"IDs of the user roles that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"IDs of the users who 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},"category":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Approval category of the workflow, `null` for the default category. Only the first matching workflow of a category applies, by priority, and each category with a match requires its own approval: the quote, invoice or subscription update is approved once all of them are.","example":"Discount"},"priority":{"type":"integer","description":"Workflow priority. Lower values are evaluated first when multiple workflows match, within the same category.","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":"IDs of the user roles that can approve the step.","example":["rol_DKL4Xcb5VSa8CQ"]},"approver_user_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"IDs of the users who 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":"ID of the transaction in 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":"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"]},"CollectionQuietHours":{"type":["object","null"],"properties":{"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Start of the quiet hours, in `HH:mm` format.","example":"20:00"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"End of the quiet hours, in `HH:mm` format.","example":"08:00"},"skip_weekends":{"type":"boolean","description":"Whether no collection email is sent on weekends."}},"required":["start_time","end_time","skip_weekends"],"description":"Hours during which no collection email is sent, in the customer's timezone. `null` disables quiet hours."},"CollectionSettings":{"type":"object","properties":{"general_context":{"type":["string","null"],"description":"Context the collection agent reads on every case: tone, business rules, what it may offer."},"sender_email_domain_id":{"type":["string","null"],"description":"ID of the verified email domain the collection emails are sent from. `null` sends from the Hyperline domain."},"quiet_hours":{"$ref":"#/components/schemas/CollectionQuietHours"},"daily_cap_per_customer":{"type":"integer","description":"Maximum number of collection emails sent to a customer per day.","example":1},"credit_note_approval_threshold":{"type":["string","null"],"pattern":"^\\d+(\\.\\d+)?$","description":"Credit note amount, in major units, above which the agent needs an approval. `null` means every credit note needs one.","example":"100"},"automatic_mode_enabled":{"type":"boolean","description":"Whether playbooks in automatic mode may act without a person's approval."}},"required":["general_context","sender_email_domain_id","quiet_hours","daily_cap_per_customer","credit_note_approval_threshold","automatic_mode_enabled"]},"UpdateCollectionSettings":{"type":"object","properties":{"general_context":{"type":["string","null"],"maxLength":10000,"description":"Context the collection agent reads on every case: tone, business rules, what it may offer."},"sender_email_domain_id":{"type":["string","null"],"description":"ID of the verified email domain the collection emails are sent from. `null` sends from the Hyperline domain."},"quiet_hours":{"type":["object","null"],"properties":{"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Start of the quiet hours, in `HH:mm` format.","example":"20:00"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"End of the quiet hours, in `HH:mm` format.","example":"08:00"},"skip_weekends":{"type":"boolean","description":"Whether no collection email is sent on weekends."}},"required":["start_time","end_time","skip_weekends"],"description":"Hours during which no collection email is sent, in the customer's timezone. `null` disables quiet hours."},"daily_cap_per_customer":{"type":"integer","minimum":1,"maximum":20,"description":"Maximum number of collection emails sent to a customer per day."},"credit_note_approval_threshold":{"type":["string","null"],"pattern":"^\\d+(\\.\\d+)?$","description":"Credit note amount, in major units, above which the agent needs an approval. `null` means every credit note needs one."},"automatic_mode_enabled":{"type":"boolean","description":"Whether playbooks in automatic mode may act without a person's approval."}}},"CollectionsSetupStatus":{"type":"object","properties":{"cases_to_open_count":{"type":"integer","description":"Number of cases that would open from the currently late invoices."},"outstanding":{"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.","example":"EUR"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount in major units, as a decimal string.","example":"1250.00"}},"required":["currency","amount"]},"description":"Outstanding amount of these cases per currency, in major units."},"playbooks":{"type":"array","items":{"type":"object","properties":{"playbook_id":{"type":"string","description":"ID of the playbook.","example":"cpb_2bHxVsTaFsPgMf"},"name":{"type":"string","description":"Name of the playbook."},"late_customer_count":{"type":"integer","description":"Number of customers with late invoices on the playbook."},"cases_to_open_count":{"type":"integer","description":"Number of cases that would open from the currently late invoices."},"outstanding":{"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.","example":"EUR"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount in major units, as a decimal string.","example":"1250.00"}},"required":["currency","amount"]},"description":"Outstanding amount of these cases per currency, in major units."}},"required":["playbook_id","name","late_customer_count","cases_to_open_count","outstanding"]},"description":"Breakdown per playbook."},"unmatched_customer_count":{"type":"integer","description":"Number of customers with late invoices no playbook applies to."},"is_truncated":{"type":"boolean","description":"Whether the late invoices were too many to count them all, so the figures are a lower bound."}},"required":["cases_to_open_count","outstanding","playbooks","unmatched_customer_count","is_truncated"]},"CollectionsSetupResult":{"type":"object","properties":{"created_count":{"type":"integer","description":"Number of playbooks created.","example":2}},"required":["created_count"]},"CollectionPlaybookTriggers":{"type":"object","properties":{"days_late":{"type":["integer","null"],"minimum":0,"maximum":365,"description":"Days past the due date of the oldest late invoice. `null` disables this trigger.","example":15},"amount_over":{"type":["string","null"],"pattern":"^\\d+(\\.\\d+)?$","description":"Late balance, in major units, above which a case opens. `null` disables this trigger.","example":"500"},"failed_payments":{"type":["integer","null"],"minimum":1,"maximum":20,"description":"Number of failed payment attempts that opens a case. `null` disables this trigger.","example":2},"broken_promise":{"type":"boolean","description":"Whether a broken payment promise opens a case."}},"required":["days_late","amount_over","failed_payments","broken_promise"],"description":"Conditions that open a case on a customer. A case opens when one of the set conditions is met."},"CollectionPlaybookStep":{"type":"object","properties":{"id":{"type":"string","description":"Playbook step ID."},"position":{"type":"integer","description":"Position of the step in the playbook, from 0."},"kind":{"type":"string","enum":["email","task","call","escalate","pause_service"],"description":"Kind of the step."},"offset_days":{"type":"integer","description":"Days after the case opening when the step runs."},"repeat_every":{"type":["integer","null"],"description":"Days between two runs of the step. `null` runs it once."},"template_id":{"type":["string","null"],"description":"ID of the email template the step sends."},"assignee_role":{"type":["string","null"],"description":"Role of the person a task or call step is assigned to."}},"required":["id","position","kind","offset_days","repeat_every","template_id","assignee_role"]},"CollectionPlaybook":{"type":"object","properties":{"id":{"type":"string","description":"Collection playbook ID.","example":"cpb_2bHxVsTaFsPgMf"},"name":{"type":"string","description":"Name of the playbook.","example":"Late invoices"},"segment_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer segments the playbook applies to. Empty when it only applies as the default playbook or by customer assignment."},"priority":{"type":"integer","description":"Priority of the playbook. When several playbooks match a customer, the highest priority wins."},"reminder_sequence_id":{"type":["string","null"],"description":"ID of the invoice reminder sequence linked to the playbook. Invoice reminders keep running from it."},"triggers":{"$ref":"#/components/schemas/CollectionPlaybookTriggers"},"agent_mode":{"type":"string","enum":["off","suggest","automatic"],"description":"How the collection agent acts on the playbook's cases: `off`, `suggest` (a person approves each action) or `automatic`. Defaults to `suggest` on creation. A playbook without steps cannot be `off`."},"context":{"type":["string","null"],"description":"Context the agent reads on the playbook's cases."},"is_default":{"type":"boolean","description":"Whether the playbook is the default one, applied when no other playbook matches. Setting it moves the default to this playbook."},"silence_checkpoint_days":{"type":"integer","description":"Days without an answer after the last email before the agent reviews the case."},"steps":{"type":"array","items":{"$ref":"#/components/schemas/CollectionPlaybookStep"},"description":"Recovery steps run once a case is open, in order."},"senders":{"type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string","description":"ID of the sender profile."},"is_default":{"type":"boolean","description":"Whether the sender is the playbook's default sender."}},"required":["sender_id","is_default"]},"description":"Sender profiles the playbook's emails are sent as."},"open_cases_count":{"type":"integer","description":"Number of open cases running the playbook."},"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":["id","name","segment_ids","priority","reminder_sequence_id","triggers","agent_mode","context","is_default","silence_checkpoint_days","steps","senders","open_cases_count","created_at","updated_at"]},"CollectionPlaybookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionPlaybook"},"description":"Playbooks, default first then by priority."}},"required":["data"]},"CreateCollectionPlaybook":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Name of the playbook."},"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":50,"description":"IDs of the customer segments the playbook applies to. Empty when it only applies as the default playbook or by customer assignment."},"priority":{"type":"integer","minimum":0,"maximum":10000,"description":"Priority of the playbook. When several playbooks match a customer, the highest priority wins."},"reminder_sequence_id":{"type":["string","null"],"description":"ID of the invoice reminder sequence linked to the playbook. Invoice reminders keep running from it."},"triggers":{"$ref":"#/components/schemas/CollectionPlaybookTriggers"},"agent_mode":{"type":"string","enum":["off","suggest","automatic"],"description":"How the collection agent acts on the playbook's cases: `off`, `suggest` (a person approves each action) or `automatic`. Defaults to `suggest` on creation. A playbook without steps cannot be `off`."},"context":{"type":["string","null"],"maxLength":10000,"description":"Context the agent reads on the playbook's cases."},"silence_checkpoint_days":{"type":"integer","minimum":1,"maximum":30,"description":"Days without an answer after the last email before the agent reviews the case."},"steps":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["email","task","call","escalate","pause_service"],"description":"Kind of the step."},"offset_days":{"type":"integer","minimum":0,"maximum":365,"description":"Days after the case opening when the step runs."},"repeat_every":{"type":["integer","null"],"minimum":1,"maximum":90,"description":"Days between two runs of the step. `null` runs it once."},"template_id":{"type":["string","null"],"enum":["reminder","firm_reminder","final_notice"],"description":"ID of the email template the step sends."},"assignee_role":{"type":["string","null"],"minLength":1,"description":"Role of the person a task or call step is assigned to."}},"required":["kind","offset_days"]},"maxItems":30,"description":"Recovery steps run once a case is open, in order."},"senders":{"type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string","description":"ID of the sender profile."},"is_default":{"type":"boolean","description":"Whether the sender is the playbook's default sender."}},"required":["sender_id","is_default"]},"maxItems":20,"description":"Sender profiles the playbook's emails are sent as."},"is_default":{"type":"boolean","description":"Whether the playbook is the default one, applied when no other playbook matches. Setting it moves the default to this playbook."}},"required":["name"]},"UpdateCollectionPlaybook":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Name of the playbook."},"segment_ids":{"type":"array","items":{"type":"string"},"maxItems":50,"description":"IDs of the customer segments the playbook applies to. Empty when it only applies as the default playbook or by customer assignment."},"priority":{"type":"integer","minimum":0,"maximum":10000,"description":"Priority of the playbook. When several playbooks match a customer, the highest priority wins."},"reminder_sequence_id":{"type":["string","null"],"description":"ID of the invoice reminder sequence linked to the playbook. Invoice reminders keep running from it."},"triggers":{"$ref":"#/components/schemas/CollectionPlaybookTriggers"},"agent_mode":{"type":"string","enum":["off","suggest","automatic"],"description":"How the collection agent acts on the playbook's cases: `off`, `suggest` (a person approves each action) or `automatic`. Defaults to `suggest` on creation. A playbook without steps cannot be `off`."},"context":{"type":["string","null"],"maxLength":10000,"description":"Context the agent reads on the playbook's cases."},"silence_checkpoint_days":{"type":"integer","minimum":1,"maximum":30,"description":"Days without an answer after the last email before the agent reviews the case."},"steps":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["email","task","call","escalate","pause_service"],"description":"Kind of the step."},"offset_days":{"type":"integer","minimum":0,"maximum":365,"description":"Days after the case opening when the step runs."},"repeat_every":{"type":["integer","null"],"minimum":1,"maximum":90,"description":"Days between two runs of the step. `null` runs it once."},"template_id":{"type":["string","null"],"enum":["reminder","firm_reminder","final_notice"],"description":"ID of the email template the step sends."},"assignee_role":{"type":["string","null"],"minLength":1,"description":"Role of the person a task or call step is assigned to."}},"required":["kind","offset_days"]},"maxItems":30,"description":"Recovery steps run once a case is open, in order."},"senders":{"type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string","description":"ID of the sender profile."},"is_default":{"type":"boolean","description":"Whether the sender is the playbook's default sender."}},"required":["sender_id","is_default"]},"maxItems":20,"description":"Sender profiles the playbook's emails are sent as."},"is_default":{"type":"boolean","enum":[true],"description":"Set to `true` to make this playbook the default one. To change the default, set it on another playbook."}}},"CollectionCase":{"type":"object","properties":{"id":{"type":"string","description":"Collection case ID.","example":"ccs_3GeHvsTaFsPgMf"},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Name of the customer."}},"required":["id","name"],"description":"Customer the case recovers."},"playbook_id":{"type":"string","description":"ID of the playbook running the case.","example":"cpb_2bHxVsTaFsPgMf"},"status":{"type":"string","enum":["agent_working","promised","disputed","paused","closed"],"description":"Status of the case."},"close_reason":{"type":["string","null"],"enum":["paid","settled","written_off","merged"],"description":"Why the case was closed. `null` while the case is open."},"owner_user_id":{"type":["string","null"],"description":"ID of the user who owns the case.","example":"usr_8eKnRm5bWdVQk3"},"needs_review":{"type":"boolean","description":"Whether the case waits for a person."},"sender_id":{"type":["string","null"],"description":"ID of the sender profile the case emails are sent as."},"agent_paused_reason":{"type":["string","null"],"description":"Why the agent is paused on the case."},"agent_status":{"type":"string","enum":["idle","thinking"],"description":"`thinking` while an agent run is requested or running on the case, else `idle`."},"agent_run_reason":{"type":["string","null"],"enum":["case_opened","step_due","email_received","silence_checkpoint","partial_payment","payment_unmatched","promise_due","promise_broken","installment_missed","manual","user_instruction","proposal_rejected","proposals_decided","case_closed"],"description":"Why the agent is thinking. `null` when the agent is idle."},"escalation":{"type":["object","null"],"properties":{"reason":{"type":"string","description":"Why the agent escalated."},"suggestion":{"type":["string","null"],"description":"What the agent suggests doing."},"escalated_at":{"type":"string","format":"date-time","description":"Escalation date.","example":"2024-12-20T16:04:11Z"}},"required":["reason","suggestion","escalated_at"],"description":"Set while the agent waits for a person to answer it on the case."},"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 case.","example":"EUR"},"amount_at_open":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Late balance when the case opened, in major units, as a decimal string.","example":"1250.00"},"outstanding_amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount the case invoices still owe in the case currency, in major units, as a decimal string.","example":"1250.00"},"other_currency_invoice_count":{"type":"integer","description":"Number of case invoices in another currency, left out of `outstanding_amount`."},"days_late":{"type":"integer","description":"Days past the due date of the oldest case invoice.","example":21},"invoice_count":{"type":"integer","description":"Number of invoices in the case.","example":2},"next_action_at":{"type":["string","null"],"format":"date-time","description":"Date of the next recovery step.","example":"2024-12-20T16:04:11Z"},"next_step":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Case step ID."},"kind":{"type":"string","enum":["email","task","call","escalate","pause_service"],"description":"Kind of the step."}},"required":["id","kind"],"description":"Next recovery step of the case."},"opened_at":{"type":"string","format":"date-time","description":"Opening date.","example":"2024-12-20T16:04:11Z"},"closed_at":{"type":["string","null"],"format":"date-time","description":"Closing 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":["id","customer","playbook_id","status","close_reason","owner_user_id","needs_review","sender_id","agent_paused_reason","agent_status","agent_run_reason","escalation","currency","amount_at_open","outstanding_amount","other_currency_invoice_count","days_late","invoice_count","next_action_at","next_step","opened_at","closed_at","updated_at"]},"PaginatedCollectionCase":{"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/CollectionCase"},"description":"List of CollectionCase."}},"required":["meta","data"]},"CollectionCaseInvoice":{"type":"object","properties":{"id":{"type":"string","description":"Invoice ID.","example":"inv_0dQ3W1hpbM1yXv"},"invoice_number":{"type":"string","description":"Invoice number."},"status":{"type":"string","description":"Status of the invoice."},"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 case.","example":"EUR"},"total_amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Total amount of the invoice, in major units.","example":"1250.00"},"outstanding_amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount the invoice still owes, in major units.","example":"1250.00"},"due_date":{"type":"string","format":"date-time","description":"Due date of the invoice.","example":"2024-12-20T16:04:11Z"},"is_late":{"type":"boolean","description":"Whether the invoice is past its due date."},"days_late":{"type":"integer","description":"Days past the due date of the oldest case invoice."},"added_at":{"type":"string","format":"date-time","description":"Date the invoice was added to the case.","example":"2024-12-20T16:04:11Z"},"removed_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice left the case, for instance when it was paid. `null` while it is in the case.","example":"2024-12-20T16:04:11Z"},"dispute_status":{"type":["string","null"],"description":"Status of the dispute on the invoice, if any."}},"required":["id","invoice_number","status","currency","total_amount","outstanding_amount","due_date","is_late","days_late","added_at","removed_at","dispute_status"]},"CollectionCasePlanStep":{"type":"object","properties":{"id":{"type":"string","description":"Case step ID."},"kind":{"type":"string","enum":["email","task","call","escalate","pause_service"],"description":"Kind of the step."},"title":{"type":"string","description":"Title of the step."},"status":{"type":"string","enum":["planned","held","sent","skipped","not_needed"],"description":"Status of the step."},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"Date the step runs.","example":"2024-12-20T16:04:11Z"},"executed_at":{"type":["string","null"],"format":"date-time","description":"Date the step ran.","example":"2024-12-20T16:04:11Z"}},"required":["id","kind","title","status","scheduled_at","executed_at"]},"CollectionCaseActivity":{"type":"object","properties":{"id":{"type":"string","description":"Activity ID."},"type":{"type":"string","enum":["case_opened","invoice_added","invoice_removed","status_changed","step_executed","email_sent","email_received","note","promise_recorded","promise_kept","promise_broken","dispute_opened","dispute_resolved","payment_received","case_closed","agent_action","owner_changed","sender_changed","invoice_credited","promise_cancelled","payment_plan_proposed","payment_plan_approved","payment_plan_cancelled","payment_plan_installment_collection","payment_plan_installment_paid","payment_plan_installment_missed","payment_plan_completed","plan_step_changed","blocker_resolved"],"description":"Type of the activity."},"actor_type":{"type":"string","enum":["agent","user","customer","system"],"description":"Who made the change."},"actor_id":{"type":["string","null"],"description":"ID of the actor: the user ID for a user, the agent or sender ID for the agent, the email address for a customer."},"created_at":{"type":"string","format":"date-time","description":"Last update date.","example":"2024-12-20T16:04:11Z"}},"required":["id","type","actor_type","actor_id","created_at"]},"CollectionCaseDetail":{"allOf":[{"$ref":"#/components/schemas/CollectionCase"},{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCaseInvoice"},"description":"Invoices of the case, removed ones included."},"steps":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCasePlanStep"},"description":"Recovery plan of the case, in order."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCaseActivity"},"description":"Activity log of the case, newest first."},"next":{"type":"object","properties":{"kind":{"type":"string","enum":["step","promise_check","silence_checkpoint","awaiting_review","awaiting_customer","none"],"description":"Kind of the next event."},"at":{"type":["string","null"],"format":"date-time","description":"Date of the next event.","example":"2024-12-20T16:04:11Z"},"step_id":{"type":["string","null"],"description":"Case step ID."},"actor":{"type":["string","null"],"enum":["agent","playbook","user"],"description":"Who acts next."}},"required":["kind","at","step_id","actor"],"description":"What happens next on the case."}},"required":["invoices","steps","activities","next"]}]},"PauseCollectionCase":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why the case is paused."}},"required":["reason"]},"CloseCollectionCase":{"type":"object","properties":{"close_reason":{"type":"string","enum":["paid","settled","written_off"],"description":"Why the case was closed. `null` while the case is open."},"reason":{"type":["string","null"],"maxLength":500,"description":"Free-text explanation logged on the case."}},"required":["close_reason"]},"AddCollectionCaseNote":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":10000,"description":"Text of the note."}},"required":["text"]},"CollectionCaseMessage":{"type":"object","properties":{"id":{"type":"string","description":"ID of the case activity the message is logged on."},"direction":{"type":"string","enum":["outbound","inbound"],"description":"`outbound` for an email we sent, `inbound` for a reply."},"actor_type":{"type":"string","enum":["agent","user","customer","system"],"description":"Who made the change."},"actor_id":{"type":["string","null"],"description":"ID of the actor: the user ID for a user, the agent or sender ID for the agent, the email address for a customer."},"email_id":{"type":["string","null"],"description":"ID of the sent email. `null` on an inbound message."},"from":{"type":["string","null"],"description":"Sender email address."},"from_name":{"type":["string","null"],"description":"Sender name."},"to":{"type":"array","items":{"type":"string"},"description":"Recipient email addresses."},"cc":{"type":"array","items":{"type":"string"},"description":"Copied email addresses."},"subject":{"type":["string","null"],"description":"Subject of the email."},"text":{"type":["string","null"],"description":"Text of the email, without the quoted history."},"invoice_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the invoices the email is about."},"attachment_file_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the attached files."},"flags":{"type":"array","items":{"type":"string","enum":["auto_reply","bounce","contact_gone","auth_failed","teammate"]},"description":"What was detected in an inbound email: out of office, promise to pay, dispute…"},"sender":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the sender profile."},"display_name":{"type":"string","description":"Display name of the sender profile."}},"required":["id","display_name"],"description":"Sender profile an outbound email was sent as."},"created_at":{"type":"string","format":"date-time","description":"Date of the message.","example":"2024-12-20T16:04:11Z"}},"required":["id","direction","actor_type","actor_id","email_id","from","from_name","to","cc","subject","text","invoice_ids","attachment_file_ids","flags","sender","created_at"]},"CollectionCaseMessageList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCaseMessage"},"description":"Messages of the case, oldest first."}},"required":["data"]},"CollectionPaymentPromise":{"type":"object","properties":{"id":{"type":"string","description":"Payment promise ID.","example":"cpp_7dQ3W1hpbM1yXv"},"case_id":{"type":"string","description":"ID of the case the promise was made on.","example":"ccs_3GeHvsTaFsPgMf"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Promised amount in major units, as a decimal string.","example":"1250.00"},"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 promised amount.","example":"EUR"},"promised_for":{"type":"string","format":"date-time","description":"Day the customer promised to pay.","example":"2024-12-20T16:04:11Z"},"source":{"type":"string","enum":["portal","email","call","user"],"description":"Where the promise was made."},"status":{"type":"string","enum":["pending","kept","broken","cancelled"],"description":"Status of the promise."},"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":["id","case_id","amount","currency","promised_for","source","status","created_at","updated_at"]},"CollectionPaymentPromiseList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionPaymentPromise"},"description":"Payment promises of the case, newest first."}},"required":["data"]},"CreateCollectionPaymentPromise":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Promised amount in major units, as a decimal string. At most what the case invoices still owe.","example":"1250.00"},"promised_for":{"type":"string","format":"date-time","description":"Day the customer promised to pay.","example":"2024-12-20T16:04:11Z"},"source":{"type":"string","enum":["portal","email","call","user"],"default":"user","description":"Where the promise was made."}},"required":["amount","promised_for"]},"CollectionPaymentPlan":{"type":"object","properties":{"id":{"type":"string","description":"Payment plan ID.","example":"cpln_5dQ3W1hpbM1yXv"},"customer_id":{"type":"string","description":"ID of the customer who pays the plan.","example":"cus_Typ0px2W0aiEtl"},"case_id":{"type":["string","null"],"description":"ID of the case the plan was proposed on.","example":"ccs_3GeHvsTaFsPgMf"},"status":{"type":"string","enum":["proposed","active","completed","defaulted","cancelled"],"description":"Status of the plan."},"total_amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Total of the installments in major units, as a decimal string.","example":"1250.00"},"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 plan.","example":"EUR"},"payment_method_id":{"type":["string","null"],"description":"ID of the saved payment method the installments are debited from. `null` when the customer pays each installment."},"approved_by_user_id":{"type":["string","null"],"description":"ID of the user who approved the plan.","example":"usr_8eKnRm5bWdVQk3"},"accepted_at":{"type":["string","null"],"format":"date-time","description":"Date the customer accepted the plan.","example":"2024-12-20T16:04:11Z"},"installments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Installment ID."},"due_date":{"type":"string","format":"date-time","description":"Due date of the installment.","example":"2024-12-20T16:04:11Z"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount of the installment in major units.","example":"625.00"},"status":{"type":"string","enum":["scheduled","paid","missed","cancelled"],"description":"Status of the installment."},"transaction_id":{"type":["string","null"],"description":"ID of the transaction that paid the installment."},"allocations":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice paid down.","example":"inv_0dQ3W1hpbM1yXv"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount paid down on the invoice, in major units.","example":"625.00"}},"required":["invoice_id","amount"]},"description":"Invoices the installment pays down, oldest first."}},"required":["id","due_date","amount","status","transaction_id","allocations"]},"description":"Installments of the plan, in date order."},"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":["id","customer_id","case_id","status","total_amount","currency","payment_method_id","approved_by_user_id","accepted_at","installments","created_at","updated_at"]},"CollectionPaymentPlanList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionPaymentPlan"},"description":"Payment plans of the customer."}},"required":["data"]},"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":"IDs of the 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":"IDs of the 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":"IDs of the 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":"IDs of the 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":"ID of the coupon the promotion code applies.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"ID of the Hyperline company the promotion code belongs to.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":"ID of the credit product the credits belong to.","example":"itm_3kXODDF42QXtnL"},"customer_id":{"type":"string","description":"ID of the customer holding the credits.","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":"ID of the price 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":"ID of the credit product the credits belong to.","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":"ID of the price 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":"ID of the price 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":"ID of the price 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":"ID of the event 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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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 the 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 the 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 the 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 the 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 the 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 the 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":"ID of the customer holding the credits.","example":"cus_Typ0px2W0aiEtl"},"product_id":{"type":"string","description":"ID of the credit product the credits belong to.","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","flat_per_tier"],"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","flat_per_tier"],"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":["adyen","airwallex","gocardless","mollie","paypal","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"ID of the connected provider holding the payment method. 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.\n\n- adyen: recurring detail reference of a token stored for the customer.\n- airwallex: payment consent ID (`cst_...`).\n- gocardless: mandate ID (`MD...`).\n- mollie: mandate ID (`mdt_...`).\n- paypal: active billing agreement ID (`B-...`) or vault payment token ID.\n- stripe: payment method ID (`pm_...`)."}},"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":"ID of the customer's shipping address to use as shipping destination. 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":"ID of the default price book 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":"ID of the plan the subscription is based on.","example":"plan_34hdd843hReh","deprecated":true},"checkout_session_id":{"type":["string","null"],"description":"ID of the checkout session linked to the subscription.","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":"ID of the parent organisation the customer is attached to.","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":"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":"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":"ID of the default price book 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":"ID of the plan the subscription is based on.","example":"plan_34hdd843hReh","deprecated":true},"checkout_session_id":{"type":["string","null"],"description":"ID of the checkout session linked to the subscription.","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":"ID of the parent organisation the customer is attached to.","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":"ID of the parent organisation the customer is attached to."},"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":"ID of the default price book 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":"ID of the parent organisation the customer is attached to.","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":"ID of the default price book 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 the Hyperline users following the customer.","example":["usr_KMcxRWc1ZQwvJG"]}}},"CustomerUsageItem":{"type":"object","properties":{"aggregator_id":{"type":"string","description":"ID of the aggregator the usage is measured by."},"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":"ID of the aggregator the usage is measured by."},"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":"IDs of the organisation's child customers.","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":"ID of the customer the component token is issued for."}},"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":"Invoicing entity ID.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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":"IDs of the user roles that have access to the 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":"IDs of the user roles that have access to the 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":"IDs of the user roles that have access to the price book."}}},"AddProductsToPriceBook":{"type":"object","properties":{"product_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the products 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":"ID of the custom tax rate applied to the product. 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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","default":true,"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 the 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","default":true,"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","default":true,"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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 consuming the credits."},"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","default":true,"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","default":true,"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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","flat_per_tier"],"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 the 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 the 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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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"}}},"ContractTermsRenewalPriceAdjustment":{"type":"object","properties":{"frequency":{"type":"string","enum":["renewal"],"description":"\nWhen the price adjustment is applied.\n\n- `renewal`: At each contract renewal.\n- `duration`: Every `interval`, during the contract.\n"},"percent":{"type":"number","description":"Percentage applied to the prices each time the adjustment applies (e.g. `7` for +7%, `-5` for -5%).","example":7}},"required":["frequency","percent"],"additionalProperties":false,"title":"Renewal"},"ContractTermsDurationPriceAdjustment":{"type":"object","properties":{"frequency":{"type":"string","enum":["duration"],"description":"\nWhen the price adjustment is applied.\n\n- `renewal`: At each contract renewal.\n- `duration`: Every `interval`, during the contract.\n"},"percent":{"type":"number","description":"Percentage applied to the prices each time the adjustment applies (e.g. `7` for +7%, `-5` for -5%).","example":7},"interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval between two price adjustments.","example":{"count":1,"period":"years"}}},"required":["frequency","percent","interval"],"additionalProperties":false,"title":"Duration"},"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":"ID of the child customer the configuration applies to, 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":"ID of the configuration's subscription, 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"}},"price_adjustment":{"oneOf":[{"$ref":"#/components/schemas/ContractTermsRenewalPriceAdjustment"},{"$ref":"#/components/schemas/ContractTermsDurationPriceAdjustment"},{"type":"null"}],"description":"Price adjustment applied to the subscription prices over the contract. `null` if the contract has no price adjustment.","example":{"frequency":"renewal","percent":7}},"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","price_adjustment","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":"ID of the child customer the configuration applies to, 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":"ID of the configuration's draft invoice, 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 the quote is addressed to.","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 the quote is built from.","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},"name":{"type":["string","null"],"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default).","example":"Acme - Enterprise plan"},"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.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none","unit_price"],"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- `unit_price`: Show only the unit price, without 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","name","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 the quote is addressed to.","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 the quote is built from.","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},"name":{"type":["string","null"],"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default).","example":"Acme - Enterprise plan"},"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.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none","unit_price"],"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- `unit_price`: Show only the unit price, without 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","name","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 the quote is addressed to.","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 the quote is built from.","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},"name":{"type":["string","null"],"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default).","example":"Acme - Enterprise plan"},"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.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none","unit_price"],"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- `unit_price`: Show only the unit price, without 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","name","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 the quote is addressed to.","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 the quote is built from.","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},"name":{"type":["string","null"],"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default).","example":"Acme - Enterprise plan"},"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.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none","unit_price"],"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- `unit_price`: Show only the unit price, without 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","name","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 the quote is addressed to.","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 the quote is built from.","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},"name":{"type":["string","null"],"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default).","example":"Acme - Enterprise plan"},"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.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none","unit_price"],"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- `unit_price`: Show only the unit price, without 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","name","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 quote template's 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"]}]},"CreateQuoteSubscriptionUpdate":{"type":"object","properties":{"source_subscription_id":{"type":"string","description":"ID of the subscription the quote updates. It must belong to the quote's customer.","example":"sub_B6ClkdqNqVNBgY"},"calculation_method":{"type":"string","enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"application_schedule":{"type":"string","enum":["quote_signature","scheduled","last_renewal"],"default":"quote_signature","description":"\nWhen the update is applied to the subscription. Defaults to `quote_signature`.\n\n- `quote_signature`: when the quote is signed.\n- `scheduled`: on `transition_date`, once the quote is signed. The quote must be signed before that date.\n- `last_renewal`: retroactively to the start of the billing period in progress when the quote is created, once the quote is signed. The quote must be signed before that period ends.\n"},"transition_date":{"type":"string","format":"date-time","description":"Date at which the update is applied. Required when `application_schedule` is `scheduled`, ignored otherwise. 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Configuration the subscription has once the update is applied. It is billed in the source subscription's currency."}},"required":["source_subscription_id","target_subscription"],"description":"Update of an existing subscription constituting the quote. When provided, a `subscription_update` quote is created: the update is applied to the subscription once the quote is signed. Cannot be combined with `subscription`, `invoice` or `template_id`."},"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":"ID of the catalog price configuration linked to the 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 issuing 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":"ID of the catalog coupon to apply to the invoice.","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 the quote is addressed to.","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},"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":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"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.","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","unit_price"]},{"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- `unit_price`: Show only the unit price, without 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 the quote is built from. 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription"},{"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_update":{"$ref":"#/components/schemas/CreateQuoteSubscriptionUpdate"}},"required":["expires_at","subscription_update"],"title":"Subscription update"},{"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 invoice"}]}]},"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","unit_price"],"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- `unit_price`: Show only the unit price, without 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},"countersigner_user_id":{"type":["string","null"],"description":"ID of the team member pre-filled as countersigner when setting the signers of a quote created from the template. `null` uses the countersigner from the quote settings.","example":"usr_Dz3fLqW8XyP0Ab"},"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, in the order they are attached to quotes.","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","countersigner_user_id","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"]},"UpdateQuoteSubscriptionUpdate":{"type":"object","properties":{"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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Configuration the subscription has once the update is applied. It replaces the one the quote currently proposes."}},"required":["target_subscription"],"description":"Update of an existing subscription constituting the quote. When provided on a draft `subscription_update` quote, it replaces the configuration the quote proposes. The updated subscription and the application schedule cannot be changed: create a new quote instead. Cannot be combined with `subscription` or `invoice`."},"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},"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."},"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.","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","unit_price"]},{"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- `unit_price`: Show only the unit price, without 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"},"name":{"type":["string","null"],"minLength":1,"description":"Name of the quote, used as the title of the quote document, its public page and its emails. When `null`, the name comes from the quote name setting of your quote settings (`Quote {number}` by default). Can only be changed while the quote is a draft. Set to `null` to go back to the name from the settings.","example":"Acme - Enterprise plan"},"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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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."}]},"subscription_update":{"$ref":"#/components/schemas/UpdateQuoteSubscriptionUpdate"}}},"QuoteApproval":{"oneOf":[{"type":"object","properties":{"quote_id":{"type":"string","description":"ID of the quote the approval applies to.","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":"ID of the original workflow 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":"IDs of the steps 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":"ID of the workflow selected during evaluation. It may differ from the archived workflow 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 the approval applies to."},"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":"Approval request ID."},"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":"ID of the original workflow 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":"Approval decision ID."},"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":"ID of the workflow selected during evaluation. It may differ from the archived workflow 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"},"verification_channel":{"type":"string","enum":["email","sms"],"description":"\nHow the signer receives the access and signature codes sent from the signature page. The email with the quote link always goes by email. SMS is in beta and enabled on request.\n\n- `email`: Codes go to the signer's email address. Setting it clears the phone number.\n- `sms`: Codes go by text message to `phone_number`, which must be sent or already stored.\n\nWhen omitted, the stored value is kept (`email` for a new signer).\n\nRefusals answer with a stable `code`: `quote_signer_sms_not_activated` (SMS not enabled on your account), `quote_signer_sms_phone_number_required` (`sms` without a phone number), `quote_signer_phone_number_without_sms` (a phone number on an `email` signer), `quote_signer_sms_country_unavailable` (country not supported).\n","example":"sms"},"phone_number_masked":{"type":["string","null"],"description":"Phone number receiving the signer's codes by SMS, masked except for its first 4 and last 2 characters, or null when none is stored or it cannot be read.","example":"+336••••••78"},"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","verification_channel","phone_number_masked","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"},"verification_channel":{"type":"string","enum":["email","sms"],"description":"\nHow the signer receives the access and signature codes sent from the signature page. The email with the quote link always goes by email. SMS is in beta and enabled on request.\n\n- `email`: Codes go to the signer's email address. Setting it clears the phone number.\n- `sms`: Codes go by text message to `phone_number`, which must be sent or already stored.\n\nWhen omitted, the stored value is kept (`email` for a new signer).\n\nRefusals answer with a stable `code`: `quote_signer_sms_not_activated` (SMS not enabled on your account), `quote_signer_sms_phone_number_required` (`sms` without a phone number), `quote_signer_phone_number_without_sms` (a phone number on an `email` signer), `quote_signer_sms_country_unavailable` (country not supported).\n","example":"sms"},"phone_number":{"type":["string","null"],"description":"Phone number receiving the signer's codes when `verification_channel` is `sms`, in E.164 format. Spaces, dots, dashes and parentheses are removed. When omitted, the stored number is kept. Supported countries: AD, AL, AT, AX, BA, BE, BG, BR, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GG, GI, GR, HR, HU, IE, IM, IS, IT, JE, LI, LT, LU, LV, MC, MD, ME, MK, MT, NL, NO, PL, PT, RO, RS, SE, SI, SK, SM, UA, XK.","example":"+33612345678"}},"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 countersigner. Optional when `user_id` is set, required otherwise.","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"],"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"]},"QuoteViewer":{"type":"object","properties":{"id":{"type":"string","description":"Quote viewer ID.","example":"quor_7KpLmN2vQ8RsTu"},"email":{"type":"string","format":"email","description":"Email address of the viewer.","example":"legal@customer.com"},"first_name":{"type":["string","null"],"description":"First name of the viewer.","example":"John"},"last_name":{"type":["string","null"],"description":"Last name of the viewer.","example":"Smith"},"language":{"type":["string","null"],"enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and quote page sent to the viewer. Defaults to the customer language.","example":"en"},"status":{"type":"string","enum":["pending","notified","viewed","signed","declined"],"description":"\nViewer status.\n\n- `pending`: Not notified yet.\n- `notified`: The viewer received the quote by email.\n- `viewed`: The viewer opened the quote.\n","example":"viewed"},"notified_at":{"type":["string","null"],"format":"date-time","description":"Date the viewer 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 viewer first opened the quote. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T10:03:00.000Z"},"created_at":{"type":"string","format":"date-time","description":"Viewer 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":"Viewer last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T10:03:00.000Z"}},"required":["id","email","first_name","last_name","language","status","notified_at","viewed_at","created_at","updated_at"]},"SetQuoteViewer":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address of the viewer.","example":"legal@customer.com"},"first_name":{"type":"string","minLength":1,"description":"First name of the viewer.","example":"John"},"last_name":{"type":"string","minLength":1,"description":"Last name of the viewer.","example":"Smith"},"language":{"type":"string","enum":["fr","en","de","it","lt","nl","es","pt","pl"],"description":"Language of the emails and quote page sent to the viewer. Defaults to the customer language.","example":"en"}},"required":["email"],"additionalProperties":false},"SetQuoteViewers":{"type":"object","properties":{"viewers":{"type":"array","items":{"$ref":"#/components/schemas/SetQuoteViewer"},"maxItems":50,"description":"\nViewers of the quote, replaced as a whole.\n\nA viewer can open the quote but does not sign it. Viewers added once the quote was sent receive it by email right away. Setting viewers leaves the signers untouched.\n"}},"required":["viewers"]},"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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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"]},"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 the subscription belongs to.","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 created for the subscription."},"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 subscription phase currently running."},"payment_method_id":{"type":["string","null"],"description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Setting it clears `bank_account_id`. Null uses the customer's payment method. It is reset to null when the payment method is deleted.","example":"pm_abc123"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Setting it clears `payment_method_id`. Null uses the customer's payment method. It is reset to null when the bank account is deleted.","example":"bac_abc123"},"shipping_address_id":{"type":["string","null"],"description":"ID of the customer's active shipping address the subscription ships to. 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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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","payment_method_id","bank_account_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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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"}},"price_adjustment":{"oneOf":[{"$ref":"#/components/schemas/ContractTermsRenewalPriceAdjustment"},{"$ref":"#/components/schemas/ContractTermsDurationPriceAdjustment"},{"type":"null"}],"description":"Price adjustment applied to the subscription prices over the contract. `null` if the contract has no price adjustment.","example":{"frequency":"renewal","percent":7}},"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","price_adjustment","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"]}]},"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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":"ID of the catalog coupon to apply to the subscription.","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":"ID of the coupon as applied to 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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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","flat_per_tier"],"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":"ID of the catalog coupon to apply to the subscription.","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":"ID of the coupon as applied to 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"]},"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. When cancellation reasons are configured in the subscription settings, it is required and must be one of them, unless the \"other\" option is enabled (any text is then accepted)."},"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"]},"CreateSubscription":{"allOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer the subscription belongs to.","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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"}]}],"description":"The subscription to preview, as it would be sent to `POST /v2/subscriptions`. Nothing is created."},"PreviewNewSubscriptionTimelineCustomer":{"type":"object","properties":{"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":"Country the customer would be billed in. Replaces the customer's billing and shipping addresses for tax: pass `zip` (and `state` where relevant) to locate it precisely, e.g. the Canary Islands or a French overseas department.","example":"DE"},"zip":{"type":["string","null"],"maxLength":20,"description":"Zip code of the billing address. With `country`, completes it; without, replaces the zip of the customer's billing address.","example":"10115"},"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"},"type":{"type":"string","enum":["corporate","person"],"description":"Whether the customer would be a company or a person.","example":"corporate"},"tax_id":{"type":["string","null"],"maxLength":64,"description":"Tax ID (VAT number) the customer would have; `null` previews it without one. A tax ID other than the customer's is checked with the tax registry, and counts as unverified when it cannot answer within 2 seconds.","example":"DE811907980"}},"description":"Fields of the customer (`subscription.customer_id`) to change for this preview only. Omitted fields keep the customer's values. The customer is not updated."},"PreviewNewSubscriptionTimeline":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/CreateSubscription"},"customer":{"$ref":"#/components/schemas/PreviewNewSubscriptionTimelineCustomer"},"max_events":{"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."},"until":{"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"},"starts_at":{"type":"string","format":"date-time","description":"Not `subscription.starts_at`: the instant to assume the subscription starts when it would wait for an activation event (a manual activation, checkout, quote signature, or a manually-started contract). Ignored when the subscription has a start date.","example":"2024-12-20T16:04:11Z"}},"required":["subscription"]},"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"]},"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":"Subscription transition ID."},"customer_id":{"type":"string","description":"ID of the customer whose subscription transitions."},"base_subscription_id":{"type":"string","description":"ID of the original subscription the transition is derived from. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"ID of the subscription to transition from."},"target_subscription_id":{"type":["string","null"],"description":"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","last_renewal_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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"}},"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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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."},"payment_method_id":{"type":["string","null"],"description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Setting it clears `bank_account_id`. Null uses the customer's payment method. It is reset to null when the payment method is deleted.","example":"pm_abc123"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Setting it clears `payment_method_id`. Null uses the customer's payment method. It is reset to null when the bank account is deleted.","example":"bac_abc123"},"shipping_address_id":{"type":["string","null"],"description":"ID of the customer's active shipping address the subscription ships to. 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. When omitted, a product already in a phase sent with its `id` keeps its current value. Otherwise, the product takes the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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.","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.","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.","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.","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.","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.","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 of the app."}},"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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ARR evolution ID.","example":"arcg_2V8NqLkW4RxY7P"},"subscription_id":{"type":"string","description":"ID of the subscription whose ARR changed.","example":"sub_2V8NqLkW4RxY7P"},"customer_id":{"type":["string","null"],"description":"ID of the customer whose ARR changed.","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":"ID of the subscription phase the value is computed for.","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":"ID of the subscription phase the value is computed for.","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":"ID of the subscription the valuation is for.","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":"IDs of the products the wallet applies to. 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":"IDs of the products the wallet applies to. 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":"ID of the customer the wallet belongs to.","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":"ID of the customer the wallet belongs to.","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":"ID of the existing payment transaction whose unallocated amount is 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":"ID of the paid invoice whose selected line items are 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":"ID of the bank account used to record 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":"ID of the source or generated invoice of the transaction. Only applies for `credit_paid` and `debit`.","example":null},"original_transaction_id":{"type":["string","null"],"description":"ID of the original wallet transaction reverted by this transaction.","example":null},"reverted_by":{"type":["string","null"],"description":"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":"ID of the source or generated invoice of the transaction. Only applies for `credit_paid` and `debit`.","example":null},"original_transaction_id":{"type":["string","null"],"description":"ID of the original wallet transaction reverted by this transaction.","example":null},"reverted_by":{"type":["string","null"],"description":"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":"ID of the wallet transaction 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":"ID of the invoice or credit note that originated the consumed credit."},"transaction_id":{"type":["string","null"],"description":"ID of the Hyperline payment transaction 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.tax_id_checked","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.electronic_invoice.generated","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.marked_as_spam","email.delivery_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.scheduled","subscription_transition.completed","subscription_transition.cancelled","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":"ID of the event occurrence the message delivers.","example":"evt_9avP4zLks7L1yh"},"payload":{"anyOf":[{"type":"object","properties":{"event_type":{"type":"string","enum":["custom_action","customer.created","customer.updated","customer.tax_id_checked","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.electronic_invoice.generated","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.marked_as_spam","email.delivery_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.scheduled","subscription_transition.completed","subscription_transition.cancelled","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":""}}}},"/v2/invoices":{"get":{"operationId":"listInvoices","tags":["Invoicing"],"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":{"type":"string","description":"Rows that match one of the other `type` values. Values: invoice, refund, document, child_invoice_ref, child_creditnote_ref."},"required":false,"description":"Rows that match one of the other `type` values. Values: invoice, refund, document, child_invoice_ref, child_creditnote_ref.","name":"type__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `type` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: invoice, refund, document, child_invoice_ref, child_creditnote_ref."},"required":false,"description":"Rows that match none of these `type` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: invoice, refund, document, child_invoice_ref, child_creditnote_ref.","name":"type__notIn","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":{"type":"string","description":"Rows that match one of the other `status` values. Values: 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."},"required":false,"description":"Rows that match one of the other `status` values. Values: 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.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: 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."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: 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.","name":"status__notIn","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","description":"Rows that match one of the other `origin` values. Values: subscription, quote, wallet, customer_credits, invoice, manual, import."},"required":false,"description":"Rows that match one of the other `origin` values. Values: subscription, quote, wallet, customer_credits, invoice, manual, import.","name":"origin__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `origin` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: subscription, quote, wallet, customer_credits, invoice, manual, import."},"required":false,"description":"Rows that match none of these `origin` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: subscription, quote, wallet, customer_credits, invoice, manual, import.","name":"origin__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values.","name":"customer_id__notIn","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","description":"Rows whose `subscription_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `subscription_id` is one of these values. Comma-separated, max 100 values.","name":"subscription_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `subscription_id` is none of these values. Comma-separated, max 100 values. Rows where `subscription_id` is empty are not returned; use `subscription_id__isNull=true` to get them."},"required":false,"description":"Rows whose `subscription_id` is none of these values. Comma-separated, max 100 values. Rows where `subscription_id` is empty are not returned; use `subscription_id__isNull=true` to get them.","name":"subscription_id__notIn","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","description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values.","name":"invoicing_entity_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `invoicing_entity_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoicing_entity_id` is none of these values. Comma-separated, max 100 values.","name":"invoicing_entity_id__notIn","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","description":"Rows whose `invoice_number` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoice_number` is one of these values. Comma-separated, max 100 values.","name":"invoice_number__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `invoice_number` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoice_number` is none of these values. Comma-separated, max 100 values.","name":"invoice_number__notIn","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","description":"Rows whose `original_invoice_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `original_invoice_id` is one of these values. Comma-separated, max 100 values.","name":"original_invoice_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `original_invoice_id` is none of these values. Comma-separated, max 100 values. Rows where `original_invoice_id` is empty are not returned; use `original_invoice_id__isNull=true` to get them."},"required":false,"description":"Rows whose `original_invoice_id` is none of these values. Comma-separated, max 100 values. Rows where `original_invoice_id` is empty are not returned; use `original_invoice_id__isNull=true` to get them.","name":"original_invoice_id__notIn","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","description":"Rows whose `original_invoice_number` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `original_invoice_number` is one of these values. Comma-separated, max 100 values.","name":"original_invoice_number__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `original_invoice_number` is none of these values. Comma-separated, max 100 values. Rows where `original_invoice_number` is empty are not returned; use `original_invoice_number__isNull=true` to get them."},"required":false,"description":"Rows whose `original_invoice_number` is none of these values. Comma-separated, max 100 values. Rows where `original_invoice_number` is empty are not returned; use `original_invoice_number__isNull=true` to get them.","name":"original_invoice_number__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"line_item_id","in":"query"},{"schema":{"type":"string","description":"Rows whose `line_item_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `line_item_id` is one of these values. Comma-separated, max 100 values.","name":"line_item_id__in","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":{"post":{"operationId":"createInvoice","tags":["Invoicing"],"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"}}}}}}},"/v1/invoices/{id}/credit-notes":{"post":{"operationId":"createCreditNote","tags":["Invoicing > Credit notes"],"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":["Invoicing"],"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":"ID of the batch request. Generated if not provided.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"},"invoices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateInvoice"},{"type":"object","properties":{"batch_invoice_id":{"type":"string","description":"ID of the invoice within the batch, supplied by you.","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":"ID of the batch request.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"}},"required":["batch_id"]}}}}}}},"/v1/invoices/{id}/validate":{"post":{"operationId":"validateInvoice","tags":["Invoicing > Lifecycle"],"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. A past `issued_at` backdates the invoice when its invoicing entity enables past issue dates.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issued_at":{"type":"string","format":"date-time","description":"Issue date of the invoice. A day before today, in the invoice timezone, backdates the invoice: it requires past issue dates to be enabled on its invoicing entity. Today or a later day, or no value, issues it today.","example":"2026-10-13T00:00:00.000Z"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailsV1"}}}}}}},"/v1/invoices/{id}/charge":{"post":{"operationId":"chargeInvoice","tags":["Invoicing > Lifecycle"],"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":"ID of the 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":["Invoicing > Lifecycle"],"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":["Invoicing > Documents"],"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":"ID of the batch, supplied by you. 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":"ID 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":["Invoicing > Lifecycle"],"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"}}}}}}},"/v2/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoicing"],"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":["Invoicing > Credit notes"],"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}":{"patch":{"operationId":"updateInvoice","tags":["Invoicing"],"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":["Invoicing"],"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":""}}}},"/v1/invoices/{id}/upload":{"post":{"operationId":"uploadPdfToInvoice","tags":["Invoicing > Documents"],"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":["Invoicing > Documents"],"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}/electronic-invoices/{system}/download":{"get":{"operationId":"downloadInvoiceElectronicInvoiceFile","tags":["Invoicing > E-invoices"],"security":[{"bearer":[]}],"summary":"Download electronic invoice file","description":"Download a file of the electronic invoice of an invoice for one e-invoicing system, as issued: the PDF with embedded XML (Factur-X, ZUGFeRD) or the XML. An invoice can have one electronic invoice per system, listed in its `electronic_invoices`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"system","in":"path"},{"schema":{"type":"string","enum":["pdf","xml"],"description":"File to download, as issued. `pdf` is the PDF with its embedded XML, produced by Factur-X and ZUGFeRD only. `xml` is the electronic invoice XML, produced by every system.","example":"xml"},"required":true,"description":"File to download, as issued. `pdf` is the PDF with its embedded XML, produced by Factur-X and ZUGFeRD only. `xml` is the electronic invoice XML, produced by every system.","name":"file","in":"query"}],"responses":{"200":{"description":"Electronic invoice file","content":{"application/pdf":{"schema":{"format":"binary"}},"application/xml":{"schema":{"format":"binary"}}}},"404":{"description":"Invoice not found, no electronic invoice for this system, or the system produces no such file","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"Electronic invoice not generated yet, failed, or its file was not returned by the provider","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/electronic-invoices/{system}/send":{"post":{"operationId":"sendInvoiceElectronicInvoice","tags":["Invoicing > E-invoices"],"security":[{"bearer":[]}],"summary":"Send electronic invoice","description":"Send the electronic invoice of an issued invoice for one e-invoicing system, for example to retry a failed transmission. Nothing is sent when it is already sent or in progress; follow its status in the invoice `electronic_invoices`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"system","in":"path"}],"responses":{"204":{"description":"Electronic invoice sent"},"400":{"description":"Unknown e-invoicing system, or invoice status not eligible for electronic invoicing","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Invoice not found, or no electronic invoice for this system","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/events":{"get":{"operationId":"listInvoiceEvents","tags":["Invoicing > 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","description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values.","name":"product_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values.","name":"product_id__notIn","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","description":"Rows whose `event_type` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `event_type` is one of these values. Comma-separated, max 100 values.","name":"event_type__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `event_type` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `event_type` is none of these values. Comma-separated, max 100 values.","name":"event_type__notIn","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":["Invoicing > 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":"ID of the 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":"ID of the bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"},"reference":{"type":"string","description":"Optional reference identifying the offline payment.","example":"PAYMENT-2026-001"}},"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":"ID of the connected provider account that processed the transaction. 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"]},"reference":{"type":"string","description":"Optional reference identifying the offline payment.","example":"PAYMENT-2026-001"}},"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":["Invoicing > 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":"ID of the ledger to filter entries by."},"required":false,"description":"ID of the ledger to filter entries by.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoicing entity to filter entries by."},"required":false,"description":"ID of the invoicing entity to filter entries by.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoice to filter entries by."},"required":false,"description":"ID of the invoice to filter entries by.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"ID of the customer to filter entries by."},"required":false,"description":"ID of the customer to filter entries by.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"ID of the subscription to filter entries by."},"required":false,"description":"ID of the subscription to filter entries by.","name":"subscription_id","in":"query"},{"schema":{"type":"string","description":"ID of the transaction to filter entries by."},"required":false,"description":"ID of the transaction to filter entries by.","name":"transaction_id","in":"query"},{"schema":{"type":"string","description":"ID of a ledger account the entries must contain."},"required":false,"description":"ID of a ledger account the entries must contain.","name":"ledger_account_id","in":"query"},{"schema":{"type":"string","description":"ID of an accounting rule the entries must contain."},"required":false,"description":"ID of an accounting rule the entries must contain.","name":"rule_id","in":"query"},{"schema":{"type":"string","minLength":1,"description":"ID of the contract assessment to filter entries by. Returns the recognition, billing and credit entries of the contract's revenue recognition schedules, and their reversals."},"required":false,"description":"ID of the contract assessment to filter entries by. Returns the recognition, billing and credit entries of the contract's revenue recognition schedules, and their reversals.","name":"contract_assessment_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":"ID of the ledger the entry is posted to."},"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":"ID of the ledger account the line is posted to."},"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":"ID of the 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 ID.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"ID of the invoicing entity the entry must belong to."},"required":false,"description":"ID of the invoicing entity the entry must belong to.","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":"ID of the ledger to preview the recognition in."},"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":"ID of the journal entry to filter lines by."},"required":false,"description":"ID of the journal entry to filter lines by.","name":"entry_id","in":"query"},{"schema":{"type":"string","description":"ID of the ledger account to filter lines by."},"required":false,"description":"ID of the ledger account to filter lines by.","name":"ledger_account_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoice line item to filter lines by."},"required":false,"description":"ID of the invoice line item to filter lines by.","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":"ID of the invoicing entity to filter lines by."},"required":false,"description":"ID of the invoicing entity to filter lines by.","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":"ID of the customer to filter lines by."},"required":false,"description":"ID of the customer to filter lines by.","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":"ID of the invoicing entity to filter ledgers by."},"required":false,"description":"ID of the invoicing entity to filter ledgers by.","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":"ID 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 ID.","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":"ID of the ledger account to return."},"required":false,"description":"ID of the ledger account to return.","name":"id","in":"query"},{"schema":{"type":"string","description":"ID of the ledger to filter accounts by."},"required":false,"description":"ID of the ledger to filter accounts by.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoicing entity to filter accounts by."},"required":false,"description":"ID of the invoicing entity to filter accounts by.","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":"ID of the connected provider to filter accounts by."},"required":false,"description":"ID of the connected provider to filter accounts by.","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":"ID of the ledger the account belongs to."},"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":"ID of the account in the connected provider. Optional."}},"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":"ID of the invoicing entity whose primary ledger accounts are listed. Defaults to the client's default."},"required":false,"description":"ID of the invoicing entity whose primary ledger accounts are listed. 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 ID.","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":"ID of the ledger to report on."},"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":"ID of the invoicing entity to restrict the report to. Optional."},"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":"ID of the ledger to report on."},"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":"ID of the invoicing entity to restrict the report to. Optional."},"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":"IDs of the ledger accounts to include in the export. Optional."},"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/revenue-policies":{"get":{"operationId":"listRevenuePolicies","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"List revenue policies","description":"List the revenue policies of a ledger, archived ones last, each with its published version, its draft and the number of contracts assessed under it.","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","minLength":1,"description":"ID of the ledger the record belongs to."},"required":true,"description":"ID of the ledger the record belongs to.","name":"ledger_id","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","description":"Comma-separated IDs: only the records with one of them."},"required":false,"description":"Comma-separated IDs: only the records with one of them.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyPaginated"}}}}}},"post":{"operationId":"createRevenuePolicy","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Create revenue policy","description":"Create a revenue policy on a ledger with its draft version 1, to publish before it governs any contract; its priority must be unique among the ledger's live policies.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"name":{"type":"string","minLength":1,"description":"Name of the revenue policy.","example":"Enterprise contracts"},"description":{"type":["string","null"],"description":"Free-text description of the revenue policy."},"priority":{"type":"integer","description":"Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies.","example":10},"match_conditions":{"$ref":"#/components/schemas/RevenuePolicyMatchConditionsCommand"},"effective_from":{"type":"string","format":"date-time","description":"The version governs the contract terms starting on or after this date.","example":"2026-01-01T00:00:00Z"},"config":{"$ref":"#/components/schemas/RevenuePolicyConfigInput"}},"required":["ledger_id","name","priority","match_conditions","effective_from","config"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyDetail"}}}},"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/accounting/revenue-policies/{id}":{"get":{"operationId":"getRevenuePolicy","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Get revenue policy","description":"Get a revenue policy with all its versions, newest first.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyDetail"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateRevenuePolicy","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Update revenue policy","description":"Update the name, description, priority or match conditions of a live revenue policy, leaving its versions unchanged.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the revenue policy."},"description":{"type":["string","null"],"description":"Free-text description of the revenue policy."},"priority":{"type":"integer","description":"Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies."},"match_conditions":{"$ref":"#/components/schemas/RevenuePolicyMatchConditionsCommand"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyDetail"}}}},"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/accounting/revenue-policies/{id}/archive":{"post":{"operationId":"archiveRevenuePolicy","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Archive revenue policy","description":"Archive a revenue policy so it matches no new contract; contracts already assessed under it keep their assessment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyDetail"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/revenue-policies/{id}/versions":{"post":{"operationId":"createRevenuePolicyVersion","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Create revenue policy version","description":"Create the draft of the next version of a revenue policy, copying the latest published configuration when none is given; refused while a draft exists.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effective_from":{"type":"string","format":"date-time","description":"The version governs the contract terms starting on or after this date.","example":"2026-01-01T00:00:00Z"},"config":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyConfigInput"},{"description":"How the policy assesses and recognizes the contracts it governs. Defaults to the latest published version's configuration."}]}},"required":["effective_from"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"type":"object"}]}}}},"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/accounting/revenue-policies/{id}/versions/{version_id}":{"put":{"operationId":"updateRevenuePolicyVersion","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Update revenue policy version","description":"Update the effective date and configuration of a draft version; a published version is immutable.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"version_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effective_from":{"type":"string","format":"date-time","description":"The version governs the contract terms starting on or after this date.","example":"2024-12-20T16:04:11Z"},"config":{"$ref":"#/components/schemas/RevenuePolicyConfigInput"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"type":"object"}]}}}},"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/accounting/revenue-policies/{id}/versions/{version_id}/publish":{"post":{"operationId":"publishRevenuePolicyVersion","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Publish revenue policy version","description":"Publish a draft version, which then never changes and governs the contract terms starting on or after its effective date, and with `include_running_contracts` also the running contracts no policy assesses yet, each reviewed as a transition; contracts already assessed stay on their version.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"version_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"include_running_contracts":{"type":"boolean","default":false,"description":"Also govern the contracts already running: those whose current term started before the version's effective date and that no policy assesses yet on the ledger. Each one is synced right after the publish and waits for a reviewer's approval as a transition; nothing changes in the books until then, and the revenue it already recognized stays. Defaults to false: only the contract terms starting on or after the effective date.","example":false}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyVersion"},{"type":"object"}]}}}},"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/accounting/revenue-policies/{id}/running-contracts-preview":{"get":{"operationId":"previewRevenuePolicyRunningContracts","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Preview running contracts of revenue policy","description":"Estimate how many running contracts a revenue policy would govern, and how many of them already recognized revenue, if its draft (else its latest published version) were published with `include_running_contracts`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyRunningContractsPreview"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/revenue-policies/accounts-preview":{"post":{"operationId":"previewRevenuePolicyObligationAccounts","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Preview obligation accounts","description":"Preview, for each product of an obligation, the revenue, deferred and unbilled revenue accounts its contract schedules would post to under a revenue policy's scope and the accounting rule each comes from, without writing anything.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to.","example":"led_8Hq2nZ0kLm4x1P"},"product_ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100,"description":"Products of the obligation to preview, at most 100.","example":["itm_4Ha7Gk2Lm9xQ1z"]},"customer_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Customers the policy is scoped to (its `match_conditions.customer_ids`); omitted or empty: any customer."},"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":"Currencies the policy is scoped to (its `match_conditions.currencies`); omitted or empty: any currency."},"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":"Customer countries the policy is scoped to (its `match_conditions.countries`); omitted or empty: any country."},"default_accounts":{"allOf":[{"$ref":"#/components/schemas/RevenuePolicyDefaultAccounts"},{"description":"The policy's default accounts (its `config.recognition.default_accounts`), as for an allocated obligation: they fill a Deferred or Unbilled account no rule gives the product. Omitted or null: the rules alone."}]}},"required":["ledger_id","product_ids"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePolicyAccountsPreview"}}}},"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/accounting/standalone-selling-prices":{"get":{"operationId":"listStandaloneSellingPrices","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"List standalone selling prices","description":"List the standalone selling prices of a ledger by product and currency, newest 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"},{"schema":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to."},"required":true,"description":"ID of the ledger the record belongs to.","name":"ledger_id","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","description":"Comma-separated IDs: only the records with one of them."},"required":false,"description":"Comma-separated IDs: only the records with one of them.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","in":"query"},{"schema":{"type":"string","minLength":1,"description":"ID of the product the record relates to."},"required":false,"description":"ID of the product the record relates to.","name":"product_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneSellingPricePaginated"}}}}}},"post":{"operationId":"createStandaloneSellingPrice","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Create standalone selling price","description":"Set the standalone selling price of a product on a ledger in one currency, closing its open price at the effective date and re-assessing the contracts waiting for it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStandaloneSellingPriceCommand"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneSellingPrice"}}}},"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/accounting/contract-assessments":{"get":{"operationId":"listContractAssessments","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"List contract assessments","description":"List the contract terms assessed under a revenue policy on a ledger, most recently changed first, with the statuses and amounts of their latest version and the contract's billed, recognized, deferred and unbilled totals.","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","minLength":1,"description":"ID of the ledger the record belongs to."},"required":true,"description":"ID of the ledger the record belongs to.","name":"ledger_id","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","description":"Comma-separated IDs: only the records with one of them."},"required":false,"description":"Comma-separated IDs: only the records with one of them.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","in":"query"},{"schema":{"type":"string","minLength":1,"description":"ID of the subscription holding the contract."},"required":false,"description":"ID of the subscription holding the contract.","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":{"type":"string","description":"Rows whose `subscription_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `subscription_id` is one of these values. Comma-separated, max 100 values.","name":"subscription_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `subscription_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `subscription_id` is none of these values. Comma-separated, max 100 values.","name":"subscription_id__notIn","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only contracts of this customer."},"required":false,"description":"Only contracts of this customer.","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values.","name":"customer_id__notIn","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only contracts pinned to this revenue policy."},"required":false,"description":"Only contracts pinned to this revenue policy.","name":"policy_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"policy_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"policy_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"policy_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"policy_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"policy_id__endWith","in":"query"},{"schema":{"type":"string","description":"Rows whose `policy_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `policy_id` is one of these values. Comma-separated, max 100 values.","name":"policy_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `policy_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `policy_id` is none of these values. Comma-separated, max 100 values.","name":"policy_id__notIn","in":"query"},{"schema":{"type":"string","enum":["eligible","held"],"description":"Only contracts whose latest version has this status."},"required":false,"description":"Only contracts whose latest version has this status.","name":"recognition_status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["eligible","held"]},{"type":"string","description":"eligible,held"}]},"required":false,"name":"recognition_status__in","in":"query"},{"schema":{"type":"string","description":"Rows that match one of the other `recognition_status` values. Values: eligible, held."},"required":false,"description":"Rows that match one of the other `recognition_status` values. Values: eligible, held.","name":"recognition_status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `recognition_status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: eligible, held."},"required":false,"description":"Rows that match none of these `recognition_status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: eligible, held.","name":"recognition_status__notIn","in":"query"},{"schema":{"type":"string","enum":["not_required","pending","approved","rejected"],"description":"Only contracts whose latest version has this review status."},"required":false,"description":"Only contracts whose latest version has this review status.","name":"review_status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["not_required","pending","approved","rejected"]},{"type":"string","description":"not_required,pending"}]},"required":false,"name":"review_status__in","in":"query"},{"schema":{"type":"string","description":"Rows that match one of the other `review_status` values. Values: not_required, pending, approved, rejected."},"required":false,"description":"Rows that match one of the other `review_status` values. Values: not_required, pending, approved, rejected.","name":"review_status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `review_status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: not_required, pending, approved, rejected."},"required":false,"description":"Rows that match none of these `review_status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: not_required, pending, approved, rejected.","name":"review_status__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentPaginated"}}}}}}},"/v1/accounting/contract-assessments/{id}":{"get":{"operationId":"getContractAssessment","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Get contract assessment","description":"Get a contract assessment: one version (the latest by default) with its five steps and obligations, the open exceptions, the review decisions and the list of versions.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Assessment version to show; defaults to the latest one."},"required":false,"description":"Assessment version to show; defaults to the latest one.","name":"version","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteContractAssessment","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Delete contract assessment","description":"Delete a contract with its versions, exceptions and review decisions, remove every journal entry its revenue policy posted, then post the subscription's term again by the ledger's accounting rules, as if no policy had matched it; no policy matches that term again.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Contract assessment deleted."},"400":{"description":"An entry to remove or post again is in a closed month, or the contract has too many documents.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Contract assessment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/contract-assessments/{id}/versions/{version}/approve":{"post":{"operationId":"approveContractAssessmentVersion","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Approve contract assessment version","description":"Approve the latest version of a contract assessment awaiting review, with a reason, so it drives recognition once nothing else holds it; the contract is then re-planned.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"version","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/contract-assessments/{id}/versions/{version}/reject":{"post":{"operationId":"rejectContractAssessmentVersion","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Reject contract assessment version","description":"Reject the latest version of a contract assessment awaiting review, with a reason, so it never drives recognition; the contract stays on hold or on the version already applied.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"version","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/contract-assessments/{id}/overrides":{"post":{"operationId":"createContractAssessmentOverride","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Override contract assessment input","description":"Record a reviewer's override on a contract (a standalone selling price, an obligation treatment, allocated amounts or consumption units), with a reason, replacing a live override of the same subject until revoked; the contract is re-assessed.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"override":{"$ref":"#/components/schemas/AccountingOverride"},"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["override","reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/contract-assessments/{id}/deliveries":{"post":{"operationId":"recordContractObligationDelivery","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Mark contract obligation delivered","description":"Record, with a reason, the day an allocated `milestone` obligation of a contract was delivered, so its whole allocated amount is recognized that day.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"obligation_key":{"type":"string","minLength":1,"description":"Key of the `milestone` obligation delivered, in the contract's latest assessment version.","example":"platform"},"delivered_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Local day (customer timezone, YYYY-MM-DD) the obligation was delivered: not in the future, not before the contract term starts. Its whole allocated amount is recognized that day (in the first open month when that month is closed), once a version of the contract is applied. An obligation is delivered once until the delivery is revoked; a delivery does not send the contract back to review.","example":"2026-03-31"},"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["obligation_key","delivered_on","reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/contract-assessments/{id}/deliveries/{decision_id}/revoke":{"post":{"operationId":"revokeContractObligationDelivery","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Revoke contract obligation delivery","description":"Revoke, with a reason, a recorded delivery of a milestone obligation, reversing what it recognized.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"decision_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/contract-assessments/{id}/overrides/{decision_id}/revoke":{"post":{"operationId":"revokeContractAssessmentOverride","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Revoke contract assessment override","description":"Revoke a live override of a contract, with a reason; the contract is re-assessed without it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"decision_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAssessmentDetail"}}}},"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/accounting/exceptions":{"get":{"operationId":"listAccountingExceptions","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"List accounting exceptions","description":"List the accounting exceptions of a ledger raised by contract assessments, open ones by default, newest 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"},{"schema":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to."},"required":true,"description":"ID of the ledger the record belongs to.","name":"ledger_id","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","description":"Comma-separated IDs: only the records with one of them."},"required":false,"description":"Comma-separated IDs: only the records with one of them.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","in":"query"},{"schema":{"type":"string","enum":["open","resolved","dismissed"],"description":"Exception status; defaults to `open`."},"required":false,"description":"Exception status; defaults to `open`.","name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["open","resolved","dismissed"]},{"type":"string","description":"open,resolved"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string","description":"Rows that match one of the other `status` values. Values: open, resolved, dismissed."},"required":false,"description":"Rows that match one of the other `status` values. Values: open, resolved, dismissed.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: open, resolved, dismissed."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: open, resolved, dismissed.","name":"status__notIn","in":"query"},{"schema":{"type":"string","enum":["missing_standalone_selling_price","standalone_selling_price_not_normalizable","unmapped_product","zero_allocation_basis","discount_exceeds_allocation","obligation_not_schedulable","recognition_rule_incompatible","periods_owned_by_invoice_schedules","review_required","override_review_required","override_out_of_date","modification_review_required","allocation_below_recognized","transition_review_required","billing_variance","consumption_breakage_review","milestone_not_delivered"],"description":"What the exception is about."},"required":false,"description":"What the exception is about.","name":"code","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["missing_standalone_selling_price","standalone_selling_price_not_normalizable","unmapped_product","zero_allocation_basis","discount_exceeds_allocation","obligation_not_schedulable","recognition_rule_incompatible","periods_owned_by_invoice_schedules","review_required","override_review_required","override_out_of_date","modification_review_required","allocation_below_recognized","transition_review_required","billing_variance","consumption_breakage_review","milestone_not_delivered"]},{"type":"string","description":"missing_standalone_selling_price,standalone_selling_price_not_normalizable"}]},"required":false,"name":"code__in","in":"query"},{"schema":{"type":"string","description":"Rows that match one of the other `code` values. Values: missing_standalone_selling_price, standalone_selling_price_not_normalizable, unmapped_product, zero_allocation_basis, discount_exceeds_allocation, obligation_not_schedulable, recognition_rule_incompatible, periods_owned_by_invoice_schedules, review_required, override_review_required, override_out_of_date, modification_review_required, allocation_below_recognized, transition_review_required, billing_variance, consumption_breakage_review, milestone_not_delivered."},"required":false,"description":"Rows that match one of the other `code` values. Values: missing_standalone_selling_price, standalone_selling_price_not_normalizable, unmapped_product, zero_allocation_basis, discount_exceeds_allocation, obligation_not_schedulable, recognition_rule_incompatible, periods_owned_by_invoice_schedules, review_required, override_review_required, override_out_of_date, modification_review_required, allocation_below_recognized, transition_review_required, billing_variance, consumption_breakage_review, milestone_not_delivered.","name":"code__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `code` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: missing_standalone_selling_price, standalone_selling_price_not_normalizable, unmapped_product, zero_allocation_basis, discount_exceeds_allocation, obligation_not_schedulable, recognition_rule_incompatible, periods_owned_by_invoice_schedules, review_required, override_review_required, override_out_of_date, modification_review_required, allocation_below_recognized, transition_review_required, billing_variance, consumption_breakage_review, milestone_not_delivered."},"required":false,"description":"Rows that match none of these `code` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: missing_standalone_selling_price, standalone_selling_price_not_normalizable, unmapped_product, zero_allocation_basis, discount_exceeds_allocation, obligation_not_schedulable, recognition_rule_incompatible, periods_owned_by_invoice_schedules, review_required, override_review_required, override_out_of_date, modification_review_required, allocation_below_recognized, transition_review_required, billing_variance, consumption_breakage_review, milestone_not_delivered.","name":"code__notIn","in":"query"},{"schema":{"type":"string","enum":["blocking","informational"],"description":"`blocking` holds the contract's recognition until resolved, `informational` does not."},"required":false,"description":"`blocking` holds the contract's recognition until resolved, `informational` does not.","name":"severity","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["blocking","informational"]},{"type":"string","description":"blocking,informational"}]},"required":false,"name":"severity__in","in":"query"},{"schema":{"type":"string","description":"Rows that match one of the other `severity` values. Values: blocking, informational."},"required":false,"description":"Rows that match one of the other `severity` values. Values: blocking, informational.","name":"severity__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `severity` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: blocking, informational."},"required":false,"description":"Rows that match none of these `severity` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: blocking, informational.","name":"severity__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExceptionPaginated"}}}}}}},"/v1/accounting/exceptions/count":{"get":{"operationId":"countAccountingExceptions","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Count contracts with accounting exceptions","description":"Count the contracts of a ledger with at least one open exception, and those with at least one open blocking exception whose recognition is on hold.","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of the ledger the record belongs to."},"required":true,"description":"ID of the ledger the record belongs to.","name":"ledger_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExceptionCount"}}}}}}},"/v1/accounting/exceptions/bulk-decision":{"post":{"operationId":"decideAccountingExceptionsInBulk","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Decide accounting exceptions in bulk","description":"Take one decision, with a reason, over open exceptions of several contracts sharing a compatibility key: approve each contract's latest version or record the same override on each, all or nothing; each contract is then re-assessed.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"exception_ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200,"description":"Open exceptions to decide, of contracts sharing a compatibility key."},"decision":{"$ref":"#/components/schemas/AccountingBulkDecision"},"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["exception_ids","decision","reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExceptionBulkDecisionResult"}}}},"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/accounting/exceptions/{id}/approve":{"post":{"operationId":"approveAccountingException","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Approve accounting exception","description":"Approve an open exception decided on its own with a reason: a `consumption_breakage_review`, whose lapsed unconsumed units are then recognized as breakage on the day they lapsed; other exceptions are approved with their contract assessment version.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingException"}}}},"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/accounting/exceptions/{id}/dismiss":{"post":{"operationId":"dismissAccountingException","tags":["Accounting > Revenue policies"],"security":[{"bearer":[]}],"summary":"Dismiss accounting exception","description":"Dismiss an open informational exception with a reason; a blocking one is resolved by a new input, an override or an approval.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"description":"Why the decision was taken. Required, not empty.","example":"Price confirmed by the pricing committee."}},"required":["reason"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingException"}}}},"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/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":"ID of the ledger to aggregate."},"required":true,"description":"ID of the ledger to aggregate.","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 IDs of the customers to filter by."},"required":false,"description":"Comma-separated IDs of the customers to filter by.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Comma-separated IDs of the products to filter by."},"required":false,"description":"Comma-separated IDs of the products to filter by.","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":"ID of the ledger the cell belongs to."},"required":true,"description":"ID of the ledger the cell belongs to.","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 IDs of the customers to filter by."},"required":false,"description":"Comma-separated IDs of the customers to filter by.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Comma-separated IDs of the products to filter by."},"required":false,"description":"Comma-separated IDs of the products to filter by.","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":"ID of the ledger to export."},"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":"ID of the ledger to export."},"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":"ID of the subscription to read unbilled revenue for."},"required":true,"description":"ID of the subscription to read unbilled revenue for.","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":"ID of the invoicing entity to filter schedules by."},"required":false,"description":"ID of the invoicing entity to filter schedules by.","name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoice to filter schedules by."},"required":false,"description":"ID of the invoice to filter schedules by.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"ID of the ledger to filter schedules by."},"required":false,"description":"ID of the ledger to filter schedules by.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"ID of the subscription to filter schedules by."},"required":false,"description":"ID of the subscription to filter schedules by.","name":"subscription_id","in":"query"},{"schema":{"type":"string","enum":["invoice","contract"],"description":"Filter by what the schedule recognizes: `invoice` lines or `contract` committed amounts."},"required":false,"description":"Filter by what the schedule recognizes: `invoice` lines or `contract` committed amounts.","name":"source","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/invoices/{invoice_id}/contract-billing":{"get":{"operationId":"getRevRecInvoiceContractBilling","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get invoice contract billing","description":"Tell whether an invoice or credit note billed contract revenue recognition schedules on a ledger, which explains lines with no schedule of their own.","parameters":[{"schema":{"type":"string"},"required":true,"name":"invoice_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"ID of the ledger whose contract schedules are checked."},"required":true,"description":"ID of the ledger whose contract schedules are checked.","name":"ledger_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRevRecInvoiceContractBilling"}}}}}}},"/v1/accounting/overview":{"get":{"operationId":"getAccountingOverview","tags":["Accounting > Revenue recognition"],"security":[{"bearer":[]}],"summary":"Get accounting overview","description":"Get the revenue recognition overview of a ledger for a year: recognized, scheduled and net billed amounts by month, deferred and unbilled revenue rollforwards, remaining revenue by product and timing, contracts by status and what needs attention.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Ledger identifier."},"required":true,"description":"Ledger identifier.","name":"ledger_id","in":"query"},{"schema":{"type":"integer","minimum":2000,"maximum":2100,"description":"Calendar year, from 2000 to 2100.","example":2026},"required":true,"description":"Calendar year, from 2000 to 2100.","name":"year","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Restrict every figure but `attention.first_open_month` to the customers of this segment."},"required":false,"description":"Restrict every figure but `attention.first_open_month` to the customers of this segment.","name":"customer_segment_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingOverview"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/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","description":"Rows whose `ledger_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `ledger_id` is one of these values. Comma-separated, max 100 values.","name":"ledger_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `ledger_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `ledger_id` is none of these values. Comma-separated, max 100 values.","name":"ledger_id__notIn","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"},{"schema":{"type":"string","description":"Rows whose `category` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `category` is one of these values. Comma-separated, max 100 values.","name":"category__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `category` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `category` is none of these values. Comma-separated, max 100 values.","name":"category__notIn","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":"ID of the ledger to build the rule tree from."},"required":true,"description":"ID of the ledger to build the rule tree from.","name":"ledger_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoicing entity to filter rules by."},"required":false,"description":"ID of the invoicing entity to filter rules by.","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":"ID 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":"IDs of the products 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":"IDs of the customers matched by the rule."},"coupon_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the coupons matched by the rule."},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the provider connections 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":"IDs of the bank accounts 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":"ID of the rule the default comes from."},"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":"ID of the rule the resolved value comes from."},"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 ID.","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":["Usage > 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":["Usage > 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":["Usage > 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":["Usage > 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":["Usage > 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":["Usage > 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":["Usage > 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":"ID of the aggregator filter restricting the result to events matching its config. Must belong to the aggregator in the path."},"required":false,"description":"ID of the aggregator filter restricting the result to events matching its 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":["Usage > 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":"ID of the aggregator filter restricting the result to events matching its config. Must belong to the aggregator in the path."},"required":false,"description":"ID of the aggregator filter restricting the result to events matching its 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":["Usage > 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":"ID of the aggregator filter restricting the result to events matching its config. Must belong to the aggregator in the path."},"required":false,"description":"ID of the aggregator filter restricting the result to events matching its 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":["Agents > Billing > Plans"],"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":["Agents > Billing > Plans"],"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"},"credit_product_id":{"type":["string","null"],"minLength":1,"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"overage_mode":{"type":["string","null"],"enum":["refuse","metered","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"Resource ID.","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"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"IDs of the products charged on this plan's invoices, 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":"IDs of the price configurations matching `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","credit_product_id","rate_card_id","agents","all_agents_enabled","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","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":["Agents > Billing > Plans"],"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":"ID of the attached billing plan. 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":["Agents > Billing > Plans"],"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":"ID of the attached billing plan. 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":"ID of the attached billing plan. 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":["Agents > Billing > Plans"],"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":["Agents > Billing > Plans"],"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":"Resource ID.","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"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"IDs of the products charged on this plan's invoices, 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":"IDs of the price configurations matching `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","credit_product_id","rate_card_id","agents","all_agents_enabled","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","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":["Agents > Billing > Plans"],"security":[{"bearer":[]}],"summary":"Replace billing plan","description":"Replace all mutable plan settings for future usage; omitted settings reset, except credit_product_id, agents and all_agents_enabled which are kept, 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"},"credit_product_id":{"type":["string","null"],"minLength":1,"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"overage_mode":{"type":["string","null"],"enum":["refuse","metered","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product every customer on the plan draws from. Credits plans only; null leaves each customer's policy to name its own. On replacement, omission preserves the current product and null clears it. Rejected while a customer on the plan draws from another product.","example":"prd_credits"},"rate_card_id":{"type":["string","null"],"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":["string","null"],"description":"ID of the rate card that prices this agent on the plan, or null for the plan's own card. Its denomination must match the plan's mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"Agents the plan lists, each with its own rate card or null for the plan's. Listing an agent does two things: it prices that agent's records with its card first (falling through to the plan's card row by row), and it routes that agent to this plan for every customer on it, ahead of an all-agents plan. So an agent listed only to give it a price on a plan with `all_agents_enabled` still counts as listed: attaching a customer who has another plan listing the same agent is rejected (`plan_agent_conflict`), and so is listing it here while such a customer is attached (`agent_routing_conflict`). At most one entry per agent. On replacement, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"all_agents_enabled":{"type":"boolean","description":"Whether the plan bills every agent of its customers, besides the agents it lists. When false, only the listed agents are billed through it, and an agent no plan of the customer covers is recorded and not billed. Defaults to true on creation; on replacement, omission keeps the current value. Turning it on, or listing an agent, is rejected while a customer on the plan already gets that agent through another plan.","example":true},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"IDs of the products charged on this plan's invoices, 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":"IDs of the price configurations matching `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","credit_product_id","rate_card_id","agents","all_agents_enabled","windows","markup_percent","overage_mode","overage_markup_percent","overage_rate_card_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","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":["Agents > Billing > Plans"],"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":["Agents > Billing > Rate cards"],"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":["Agents > Billing > Rate cards"],"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, except a vendor's unlisted items that a vendor default makes free.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","minLength":1,"maxLength":64,"description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"maxItems":100,"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]},"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":"Resource ID.","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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]},"attached_product_id":{"type":["string","null"],"description":"ID of the credit product using this card as its default. Null when none.","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","vendor_defaults","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":["Agents > Billing > Rate cards"],"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":"Resource ID.","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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]},"attached_product_id":{"type":["string","null"],"description":"ID of the credit product using this card as its default. Null when none.","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","vendor_defaults","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":["Agents > Billing > Rate cards"],"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, except a vendor's unlisted items that a vendor default makes free.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","minLength":1,"maxLength":64,"description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"maxItems":100,"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]}},"required":["name","rows"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","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":[]},"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's items that no row on the card lists.\n\n- free: Recorded at zero with `price_status: \"unlisted\"`, without an unpriced warning.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items no row lists; an exact item row always wins. At most one entry per vendor. On replacement, omission keeps the current list and an empty list clears it.","example":[{"vendor":"hyperline","unlisted_items":"free"}]},"attached_product_id":{"type":["string","null"],"description":"ID of the credit product using this card as its default. Null when none.","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","vendor_defaults","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":["Agents > Billing > Rate cards"],"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/rate-cards/{id}/unlisted-usage":{"get":{"operationId":"listAgentRateCardUnlistedUsage","tags":["Agents > Billing"],"security":[{"bearer":[]}],"summary":"List unlisted usage","description":"List recent usage of the customers a rate card prices that no row on the card prices, with what the card does with it today.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"Window in days, counted back from now, from 1 through 90. Defaults to 30.","example":30},"required":false,"description":"Window in days, counted back from now, from 1 through 90. Defaults to 30.","name":"days","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Maximum number of entries returned, from 1 through 200. Defaults to 50.","example":50},"required":false,"description":"Maximum number of entries returned, from 1 through 200. Defaults to 50.","name":"limit","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"rate_card_id":{"type":"string","description":"ID of the rate card the usage is checked against.","example":"airc_example"},"days":{"type":"integer","description":"Window in days, counted back from now, from 1 through 90. Defaults to 30.","example":30},"since":{"type":"string","description":"Start of the window, as a UTC ISO 8601 timestamp.","example":"2026-10-21T09:30:00Z"},"data":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["llm_call","item"],"description":"Kind of usage.\n\n- llm_call: Token usage of a model.\n- item: Non-LLM usage of a vendor item, such as a workflow node.","example":"item"},"vendor":{"type":"string","description":"Provider of an LLM call, or vendor of a cost item, trimmed and lowercased.","example":"hyperline"},"item":{"type":"string","description":"Model of an LLM call, or item of a cost item, trimmed and lowercased.","example":"send_email"},"unit":{"type":"string","description":"Unit counted by the receipt quantity.","example":"node"},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?(e[+-]?\\d+)?$/i","description":"Total quantity recorded in the window, in `unit`, as an exact decimal string.","example":"1240"},"call_count":{"type":"integer","description":"Number of recorded LLM calls or item reports for this key in the window.","example":1240},"last_seen_at":{"type":"string","description":"Last time this usage was recorded, as a UTC ISO 8601 timestamp.","example":"2026-11-20T09:30:00Z"},"status":{"type":"string","enum":["unpriced","unlisted","converted"],"description":"What the card does today with this usage.\n\n- unlisted: Free, because the card's vendor default covers the vendor's unlisted items.\n- converted: Priced through the card's `fallback_per_usd` from the provider cost.\n- unpriced: Recorded at zero as unpriced.","example":"unlisted"}},"required":["kind","vendor","item","unit","quantity","call_count","last_seen_at","status"]},"description":"Usage with no row on the card, ordered by call count, most used first.","example":[{"kind":"item","vendor":"hyperline","item":"send_email","unit":"node","quantity":"1240","call_count":1240,"last_seen_at":"2026-11-20T09:30:00Z","status":"unlisted"}]},"has_more":{"type":"boolean","description":"Whether more usage matched than `limit` returned.","example":false},"scan_capped":{"type":"boolean","description":"Whether the read stopped at its scan bound, so older or rarer usage may be missing.","example":false}},"required":["rate_card_id","days","since","data","has_more","scan_capped"]}}}},"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"]}}}}}}},"/v1/ai/billing/costs":{"get":{"operationId":"listAgentCostCatalog","tags":["Agents > Billing > 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":["Agents > Billing > 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":"ID of the active custom cost-item version, used to update or delete the item. Null for registry models. An update returns a new ID and preserves historical prices.","example":null},"unlisted_items":{"type":["string","null"],"enum":["free"],"description":"Set on an unlisted cost item whose vendor has a cost vendor default: free means it costs zero on purpose and is not missing a cost. Null otherwise.","example":"free"},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Resource ID.","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","unlisted_items","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":"ID of the active custom cost-item version, used to update or delete the item. Null for registry models. An update returns a new ID and preserves historical prices.","example":null},"unlisted_items":{"type":["string","null"],"enum":["free"],"description":"Set on an unlisted cost item whose vendor has a cost vendor default: free means it costs zero on purpose and is not missing a cost. Null otherwise.","example":"free"},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Resource ID.","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","unlisted_items","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":["Agents > Billing > 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":["Agents > Billing > 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":"ID of the active custom cost-item version, used to update or delete the item. Null for registry models. An update returns a new ID and preserves historical prices.","example":null},"unlisted_items":{"type":["string","null"],"enum":["free"],"description":"Set on an unlisted cost item whose vendor has a cost vendor default: free means it costs zero on purpose and is not missing a cost. Null otherwise.","example":"free"},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Resource ID.","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","unlisted_items","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":["Agents > Billing > 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":"ID of the active custom cost-item version, used to update or delete the item. Null for registry models. An update returns a new ID and preserves historical prices.","example":null},"unlisted_items":{"type":["string","null"],"enum":["free"],"description":"Set on an unlisted cost item whose vendor has a cost vendor default: free means it costs zero on purpose and is not missing a cost. Null otherwise.","example":"free"},"override":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Resource ID.","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","unlisted_items","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":["Agents > Billing > 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/costs/vendor-defaults":{"get":{"operationId":"getAgentCostVendorDefaults","tags":["Agents > Billing > Costs"],"security":[{"bearer":[]}],"summary":"Get cost vendor defaults","description":"Get what the cost catalog does with each vendor's cost items that have no catalog entry.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's cost items that have no catalog entry.\n\n- free: Costed at zero with `price_status: \"unlisted\"` instead of unpriced; not missing a cost.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items with no catalog entry; a catalog entry always wins. At most one entry per vendor, sorted by vendor. Never applies to LLM calls.","example":[{"vendor":"hyperline","unlisted_items":"free"}]}},"required":["vendor_defaults"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"replaceAgentCostVendorDefaults","tags":["Agents > Billing > Costs"],"security":[{"bearer":[]}],"summary":"Replace cost vendor defaults","description":"Replace the cost vendor defaults as a set; they apply to cost records ingested from now on, and recorded calls keep their cost.","requestBody":{"description":"Cost vendor defaults payload","content":{"application/json":{"schema":{"type":"object","properties":{"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","minLength":1,"maxLength":64,"description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's cost items that have no catalog entry.\n\n- free: Costed at zero with `price_status: \"unlisted\"` instead of unpriced; not missing a cost.","example":"free"}},"required":["vendor","unlisted_items"]},"maxItems":100,"description":"Per-vendor behaviour for cost items with no catalog entry; a catalog entry always wins. At most one entry per vendor, sorted by vendor. Never applies to LLM calls.","example":[{"vendor":"hyperline","unlisted_items":"free"}]}},"required":["vendor_defaults"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"vendor_defaults":{"type":"array","items":{"type":"object","properties":{"vendor":{"type":"string","description":"Vendor of the cost items the default applies to, matched case-insensitively.","example":"hyperline"},"unlisted_items":{"type":"string","enum":["free"],"description":"What happens to this vendor's cost items that have no catalog entry.\n\n- free: Costed at zero with `price_status: \"unlisted\"` instead of unpriced; not missing a cost.","example":"free"}},"required":["vendor","unlisted_items"]},"description":"Per-vendor behaviour for cost items with no catalog entry; a catalog entry always wins. At most one entry per vendor, sorted by vendor. Never applies to LLM calls.","example":[{"vendor":"hyperline","unlisted_items":"free"}]}},"required":["vendor_defaults"]}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/ai/billing/customers/{id}/policies":{"get":{"operationId":"listAgentCustomerPolicies","tags":["Agents > Billing > Policies"],"security":[{"bearer":[]}],"summary":"List billing policies","description":"List configured customer billing scopes with take/skip: the default policy, additional plan attachments and legacy agent policies, told apart by scope.","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":["Agents > Billing > Policies"],"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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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":["Agents > Billing > Policies"],"security":[{"bearer":[]}],"summary":"Configure default billing policy","description":"Replace customer billing settings while preserving omitted plan_id, rate_card_id and agent_rate_cards; null detaches the references, [] clears agent_rate_cards, 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":"ID of the customer wallet the policy charges. 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":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the 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":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached billing plan. 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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"patch":{"operationId":"patchDefaultCustomerBillingPolicy","tags":["Agents > Billing > Policies"],"security":[{"bearer":[]}],"summary":"Update default billing policy","description":"Change some billing settings of this scope without resending the rest: blocked, parent_balance_enabled, rate_card_id (null detaches) and agent_rate_cards (replaces the list, [] clears it); every other setting is kept.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Partial billing policy update payload","content":{"application/json":{"schema":{"type":"object","properties":{"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"delete":{"operationId":"deleteDefaultCustomerBillingPolicy","tags":["Agents > Billing > Policies"],"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":["Agents > Billing > Policies"],"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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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":["Agents > Billing > Policies"],"security":[{"bearer":[]}],"summary":"Configure billing policy","description":"Replace customer billing settings while preserving omitted plan_id, rate_card_id and agent_rate_cards; null detaches the references, [] clears agent_rate_cards, 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":"ID of the customer wallet the policy charges. 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":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the 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":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached billing plan. 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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"patch":{"operationId":"patchAgentCustomerBillingPolicy","tags":["Agents > Billing > Policies"],"security":[{"bearer":[]}],"summary":"Update billing policy","description":"Change some billing settings of this scope without resending the rest: blocked, parent_balance_enabled, rate_card_id (null detaches) and agent_rate_cards (replaces the list, [] clears it); every other setting is kept.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"agent_slug","in":"path"}],"requestBody":{"description":"Partial billing policy update payload","content":{"application/json":{"schema":{"type":"object","properties":{"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"delete":{"operationId":"deleteAgentCustomerBillingPolicy","tags":["Agents > Billing > Policies"],"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}/policies/plans/{planId}":{"get":{"operationId":"getPlanCustomerBillingPolicy","tags":["Agents > Billing"],"security":[{"bearer":[]}],"summary":"Get plan attachment","description":"Get the customer's additional attachment to planId, returning 404 when it has none (a plan on the default policy is read there).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"planId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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":"upsertPlanCustomerBillingPolicy","tags":["Agents > Billing"],"security":[{"bearer":[]}],"summary":"Attach customer to plan","description":"Attach the customer to planId as an additional scope, or replace that attachment, with the same settings as a policy.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"planId","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":"ID of the customer wallet the policy charges. 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":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the 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":"ID of the 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached billing plan. 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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"patch":{"operationId":"patchPlanCustomerBillingPolicy","tags":["Agents > Billing"],"security":[{"bearer":[]}],"summary":"Update plan attachment","description":"Change some billing settings of this scope without resending the rest: blocked, parent_balance_enabled, rate_card_id (null detaches) and agent_rate_cards (replaces the list, [] clears it); every other setting is kept.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"planId","in":"path"}],"requestBody":{"description":"Partial billing policy update payload","content":{"application/json":{"schema":{"type":"object","properties":{"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"rate_card_id":{"type":["string","null"],"minLength":1,"description":"ID of the attached rate card. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.","example":"airc_example"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_slug":{"type":"string","minLength":1,"maxLength":128,"description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","minLength":1,"description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_slug","rate_card_id"]},"maxItems":200,"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"blocked":{"type":"boolean","description":"Whether spending is disabled for this billing scope.","example":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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"]}}}}}},"delete":{"operationId":"deletePlanCustomerBillingPolicy","tags":["Agents > Billing"],"security":[{"bearer":[]}],"summary":"Detach customer from plan","description":"Remove the customer's additional attachment to planId while preserving its ledger, refusing unsettled consumption with 409.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"planId","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":["Agents > Billing > Plans"],"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":"Resource ID.","example":"d18603dd-7285-4bf5-a45e-88d7de8f37c9"},"customer_id":{"type":"string","description":"ID of the customer the policy applies to.","example":"cus_example"},"agent_slug":{"type":["string","null"],"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","example":"support"},"is_default":{"type":"boolean","description":"Whether this is the default plan or shared customer scope.","example":false},"scope":{"type":"string","enum":["default","plan","agent"],"description":"What this policy is: `default` (the customer's first attachment, a plan or custom terms), `plan` (an additional plan attachment, addressed by plan) or `agent` (a legacy per-agent policy, which bills that agent first).","example":"default"},"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":"ID of the customer wallet the policy charges. Omit on wallet policy writes to provision or reuse the customer's wallet.","example":"wal_example"},"credit_product_id":{"type":["string","null"],"description":"ID of the credit product whose balance this policy consumes. The plan's credit product when the plan names one. On policy writes, may be omitted when the plan names one, and a different product is rejected.","example":"prd_credits"},"parent_balance_enabled":{"type":"boolean","description":"Whether this plan attachment draws from its parent organisation's balance: the parent's attachment to the same plan, or further up while that one has the option on too. Usage, prices and the ledger stay on this customer. Plan attachments only. On policy writes, omission keeps the current value (false on creation), and enabling it is rejected while the parent chain has no balance to draw from.","example":false},"balance_customer_id":{"type":["string","null"],"description":"ID of the customer whose balance this policy draws from: the policy's own customer, or the parent organisation holding it when `parent_balance_enabled` is true. Null when the parent chain has no balance to draw from, in which case consumption is rejected as for a policy with no balance.","example":"cus_example"},"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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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. Null when overage_mode is usage_events.","example":"10"},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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":"ID of the 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":"ID of the attached rate card. 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"},"agent_rate_cards":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent this entry prices.","example":"aiap_example"},"agent_slug":{"type":"string","description":"Slug of the agent this entry prices, as its records report it (trimmed, lowercase). Must name an agent of the workspace.","example":"support"},"rate_card_id":{"type":"string","description":"ID of the rate card that prices this agent for this customer. Its denomination must match the policy's mode, and its currency the wallet's in wallet mode.","example":"airc_support"}},"required":["agent_id","agent_slug","rate_card_id"]},"description":"The customer's rate card for one agent at a time. It prices that agent's records first and falls through row by row to the policy's card, the plan's card for the agent, then the plan's card. At most one entry per agent. On writes, omission keeps the current list and an empty list clears it.","example":[{"agent_id":"aiap_example","agent_slug":"support","rate_card_id":"airc_support"}]},"plan_id":{"type":["string","null"],"description":"ID of the attached billing plan. 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 and settlement_threshold_amount.","example":60},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":"calendar_month"},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","example":null},"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, except a vendor's unlisted items that a vendor default makes free.","example":"1"},"layer_count":{"type":"number","description":"Number of rate cards stacked for an agent with no card of its own: the policy's, the plan's, then the credit product's default.","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":"ID of the attached rate card. 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. Null when overage_mode is usage_events.","example":null},"overage_rate_card_id":{"type":["string","null"],"description":"ID of the 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 and settlement_threshold_amount.","example":null},"settlement_schedule":{"type":["string","null"],"enum":["calendar_month"],"description":"Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes and settlement_threshold_amount.\n\n- calendar_month: Settles at the end of each UTC calendar month.","example":null},"settlement_threshold_amount":{"type":["number","null"],"description":"Unsettled balance, in whole minor units, at which usage settles. Null means no amount override. Mutually exclusive with settlement_interval_minutes and settlement_schedule, and refused with overage_mode usage_events, whose overage is sent whatever its amount.","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","settlement_threshold_amount","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,"settlement_threshold_amount":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},"effective_settlement_threshold_amount":{"type":["number","null"],"description":"Settlement threshold amount 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","scope","mode","wallet_id","credit_product_id","parent_balance_enabled","balance_customer_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","agent_rate_cards","plan_id","settlement_interval_minutes","settlement_schedule","settlement_threshold_amount","resolved_rate_card","overrides","effective_settlement_interval_minutes","effective_settlement_schedule","effective_settlement_threshold_amount","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":["Agents > Billing > Usage"],"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 or a plan attachment.","example":"support"},"required":false,"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","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 or a plan attachment.","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 and settlement_threshold_amount.","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":"ID of the credit product the balance or rate card belongs to.","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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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 or a plan attachment.","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","usage_events"],"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.\n- usage_events: Accepts the call as overage and bills it as usage events (`event_type: ai_overage_usage`, one per item with its `units`) priced by your catalog. overage_markup_percent and overage_rate_card_id must be null. Not available in wallet mode.","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":["Agents > Billing > Usage"],"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 or a plan attachment.","example":"support"},"required":false,"description":"Agent scope identifier. Null is the customer's shared pool or a plan attachment.","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 or a plan attachment.","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":["Agents > Billing > Usage"],"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":["Agents > Billing > Rate cards"],"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":"ID of the credit product the balance or rate card belongs to.","example":"prd_credits"},"rate_card_id":{"type":"string","description":"ID of the attached rate card. 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":["Agents > Billing > Rate cards"],"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":"ID of the attached rate card. 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":"ID of the credit product the balance or rate card belongs to.","example":"prd_credits"},"rate_card_id":{"type":"string","description":"ID of the attached rate card. 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":["Agents > Billing > Rate cards"],"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":["Reports > 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/delegations":{"get":{"operationId":"listApprovalDelegations","tags":["Approvals > Delegations"],"security":[{"bearer":[]}],"summary":"List approval delegations","description":"Retrieve approval delegations, scheduled and active ones by default.","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":"Comma-separated IDs of the delegations to return."},"required":false,"description":"Comma-separated IDs of the delegations to return.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"ID of the delegator whose delegations to return."},"required":false,"description":"ID of the delegator whose delegations to return.","name":"delegator_id","in":"query"},{"schema":{"type":"string","description":"ID of the delegate whose delegations to return."},"required":false,"description":"ID of the delegate whose delegations to return.","name":"delegate_id","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Also return revoked and expired delegations. By default, only scheduled and active ones are returned.","example":false},"required":false,"description":"Also return revoked and expired delegations. By default, only scheduled and active ones are returned.","name":"include_inactive","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedApprovalDelegation"}}}}}},"post":{"operationId":"createApprovalDelegation","tags":["Approvals > Delegations"],"security":[{"bearer":[]}],"summary":"Create approval delegation","description":"Delegate a user's approvals to another user for a period, such as an out-of-office synced from an HR system.","requestBody":{"description":"Approval delegation creation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApprovalDelegationCommand"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegation"}}}},"403":{"description":"Access denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegationError"}}}},"404":{"description":"Delegation or user not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegationError"}}}}}}},"/v1/approvals/delegations/{id}":{"get":{"operationId":"getApprovalDelegation","tags":["Approvals > Delegations"],"security":[{"bearer":[]}],"summary":"Get approval delegation","description":"Retrieve a single approval delegation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegation"}}}},"404":{"description":"Delegation or user not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegationError"}}}}}}},"/v1/approvals/delegations/{id}/revoke":{"post":{"operationId":"revokeApprovalDelegation","tags":["Approvals > Delegations"],"security":[{"bearer":[]}],"summary":"Revoke approval delegation","description":"Revoke an approval delegation so the delegate stops approving on behalf of the delegator; revoking a revoked delegation returns it unchanged.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Approval delegation revocation payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApprovalDelegationCommand"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegation"}}}},"403":{"description":"Access denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegationError"}}}},"404":{"description":"Delegation or user not found in this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDelegationError"}}}}}}},"/v1/approvals/requests/{id}":{"get":{"operationId":"getApprovalRequest","tags":["Approvals > 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":["Approvals > 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":["Approvals > 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":["Approvals > 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":["Approvals > 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":["Approvals > 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":["Approvals > 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":["Approvals > 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":"ID of the customer the returned entries are attached to.","example":"cus_Typ0px2W0aiEtl"},"required":false,"description":"ID of the customer the returned entries are attached to.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"ID of the subscription the returned entries are attached to.","example":"sub_amiaWZ3lzDIWaoT"},"required":false,"description":"ID of the subscription the returned entries are attached to.","name":"subscription_id","in":"query"},{"schema":{"type":"string","description":"ID of the invoice the returned entries are attached to.","example":"inv_1eTaiytfA0i2Va"},"required":false,"description":"ID of the invoice the returned entries are attached to.","name":"invoice_id","in":"query"},{"schema":{"type":"string","description":"ID of the quote the returned entries are attached to.","example":"quo_1eTaiytfA0i2Va"},"required":false,"description":"ID of the quote the returned entries are attached to.","name":"quote_id","in":"query"},{"schema":{"type":"string","description":"ID of the transaction the returned entries are attached to.","example":"tra_1eTaiytfA0i2Va"},"required":false,"description":"ID of the transaction the returned entries are attached to.","name":"transaction_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedAuditLog"}}}}}}},"/v1/bank-accounts":{"get":{"operationId":"listBankAccounts","tags":["Transactions > 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":["Transactions > 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":["Transactions > 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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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 > Versioning"],"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/collections/settings":{"get":{"operationId":"getCollectionSettings","tags":["Collections > Settings"],"security":[{"bearer":[]}],"summary":"Get collection settings","description":"Retrieve the collection settings of the account, with defaults until they are first saved.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSettings"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateCollectionSettings","tags":["Collections > Settings"],"security":[{"bearer":[]}],"summary":"Update collection settings","description":"Update the collection settings of the account; omitted fields keep their value.","requestBody":{"description":"Settings to change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionSettings"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSettings"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/setup":{"get":{"operationId":"getCollectionsSetup","tags":["Collections > Setup"],"security":[{"bearer":[]}],"summary":"Get collections setup","description":"Preview what Collections would do now, without writing anything: per playbook, the cases the currently late invoices would open.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionsSetupStatus"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"setUpCollections","tags":["Collections > Setup"],"security":[{"bearer":[]}],"summary":"Set up collections","description":"Create the default playbooks, one per invoice reminder sequence, with their triggers off; does nothing when the account already has playbooks.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionsSetupResult"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/playbooks":{"get":{"operationId":"listCollectionPlaybooks","tags":["Collections > Playbooks"],"security":[{"bearer":[]}],"summary":"List collection playbooks","description":"Retrieve every collection playbook of the account, default first then by priority.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPlaybookList"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"createCollectionPlaybook","tags":["Collections > Playbooks"],"security":[{"bearer":[]}],"summary":"Create collection playbook","description":"Create a collection playbook; the account's first playbook is the default one.","requestBody":{"description":"Playbook to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionPlaybook"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPlaybook"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/playbooks/{id}":{"get":{"operationId":"getCollectionPlaybook","tags":["Collections > Playbooks"],"security":[{"bearer":[]}],"summary":"Get collection playbook","description":"Retrieve a collection playbook.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPlaybook"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Playbook not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateCollectionPlaybook","tags":["Collections > Playbooks"],"security":[{"bearer":[]}],"summary":"Update collection playbook","description":"Update a collection playbook; `steps` and `senders`, when sent, replace the current lists.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Playbook fields to change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionPlaybook"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPlaybook"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Playbook not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCollectionPlaybook","tags":["Collections > Playbooks"],"security":[{"bearer":[]}],"summary":"Delete collection playbook","description":"Delete a collection playbook; the default playbook and a playbook running open cases cannot be deleted.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Playbook deleted"},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Playbook not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases":{"get":{"operationId":"listCollectionCases","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"List collection cases","description":"Retrieve collection cases with their customer, outstanding amount, days late and next step.","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":["opened_at","next_action_at","amount_at_open","updated_at"],"default":"opened_at","description":"Field to sort the cases by."},"required":false,"description":"Field to sort the cases by.","name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order."},"required":false,"description":"Sort order.","name":"order","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","description":"Rows whose `id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is one of these values. Comma-separated, max 100 values.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["agent_working","promised","disputed","paused","closed","open"]},{"type":"string","description":"agent_working,promised"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["agent_working","promised","disputed","paused","closed","open"]},{"type":"string","description":"agent_working,promised"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string","description":"Rows that do not match this `status` value. Values: agent_working, promised, disputed, paused, closed, open."},"required":false,"description":"Rows that do not match this `status` value. Values: agent_working, promised, disputed, paused, closed, open.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values. Comma-separated, max 100 values. Values: agent_working, promised, disputed, paused, closed, open."},"required":false,"description":"Rows that match none of these `status` values. Comma-separated, max 100 values. Values: agent_working, promised, disputed, paused, closed, open.","name":"status__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"owner_user_id__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"owner_user_id__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"owner_user_id__isNotNull","in":"query"},{"schema":{"type":"string","description":"Rows whose `owner_user_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `owner_user_id` is one of these values. Comma-separated, max 100 values.","name":"owner_user_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `owner_user_id` is none of these values. Comma-separated, max 100 values. Rows where `owner_user_id` is empty are not returned; use `owner_user_id__isNull=true` to get them."},"required":false,"description":"Rows whose `owner_user_id` is none of these values. Comma-separated, max 100 values. Rows where `owner_user_id` is empty are not returned; use `owner_user_id__isNull=true` to get them.","name":"owner_user_id__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"playbook_id__endWith","in":"query"},{"schema":{"type":"string","description":"Rows whose `playbook_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `playbook_id` is one of these values. Comma-separated, max 100 values.","name":"playbook_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `playbook_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `playbook_id` is none of these values. Comma-separated, max 100 values.","name":"playbook_id__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values.","name":"customer_id__notIn","in":"query"},{"schema":{"type":"string","description":"Rows whose `needs_review` is this value: true or false."},"required":false,"description":"Rows whose `needs_review` is this value: true or false.","name":"needs_review","in":"query"},{"schema":{"type":"string","description":"Rows whose `needs_review` is not this value."},"required":false,"description":"Rows whose `needs_review` is not this value.","name":"needs_review__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"opened_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"next_action_at__gte","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"next_action_at__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"next_action_at__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCollectionCase"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}":{"get":{"operationId":"getCollectionCase","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"Get collection case","description":"Retrieve a collection case with its invoices, recovery plan, activity log and next event.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/pause":{"post":{"operationId":"pauseCollectionCase","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"Pause collection case","description":"Stop the recovery steps of a case until it is resumed.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Pause reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseCollectionCase"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/resume":{"post":{"operationId":"resumeCollectionCase","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"Resume collection case","description":"Resume a paused case; a step that came due during the pause runs on the next steps run.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/close":{"post":{"operationId":"closeCollectionCase","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"Close collection case","description":"Close a case by hand; invoices are not changed, a write-off or credit note goes through the invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Close reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseCollectionCase"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/notes":{"post":{"operationId":"addCollectionCaseNote","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"Add collection case note","description":"Append a note to the activity log of a case.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Note to add","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCollectionCaseNote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/messages":{"get":{"operationId":"listCollectionCaseMessages","tags":["Collections > Cases"],"security":[{"bearer":[]}],"summary":"List collection case messages","description":"Retrieve the emails sent and received on a collection case, oldest first.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseMessageList"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/cases/{id}/promises":{"get":{"operationId":"listCollectionPaymentPromises","tags":["Collections > Payment promises"],"security":[{"bearer":[]}],"summary":"List collection payment promises","description":"Retrieve the payment promises recorded on a collection case.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPaymentPromiseList"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"operationId":"createCollectionPaymentPromise","tags":["Collections > Payment promises"],"security":[{"bearer":[]}],"summary":"Create collection payment promise","description":"Record the date and amount a customer committed to pay on a collection case.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Promise to record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionPaymentPromise"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPaymentPromise"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Case not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/customers/{customerId}/payment-plans":{"get":{"operationId":"listCollectionPaymentPlans","tags":["Collections > Payment plans"],"security":[{"bearer":[]}],"summary":"List collection payment plans","description":"Retrieve the payment plans of a customer with their installments.","parameters":[{"schema":{"type":"string"},"required":true,"name":"customerId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPaymentPlanList"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/collections/payment-plans/{id}":{"get":{"operationId":"getCollectionPaymentPlan","tags":["Collections > Payment plans"],"security":[{"bearer":[]}],"summary":"Get collection payment plan","description":"Retrieve a payment plan with its installments and their allocations.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPaymentPlan"}}}},"403":{"description":"Collections is not enabled on the account","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Payment plan not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/companies":{"get":{"operationId":"listCompanies","tags":["Workspaces"],"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":["Workspaces"],"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":["Quoting > Library > 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":["Quoting > Library > 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":["Quoting > Library > 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":["Quoting > Library > 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":["Quoting > Library > 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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Quoting > Library > Contracts"],"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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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"},{"schema":{"type":"string","description":"Rows whose `coupon_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `coupon_id` is one of these values. Comma-separated, max 100 values.","name":"coupon_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `coupon_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `coupon_id` is none of these values. Comma-separated, max 100 values.","name":"coupon_id__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromotionCode"}}}}}},"post":{"operationId":"createPromotionCode","tags":["Catalog > 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":"ID of the coupon the promotion code applies.","example":"cou_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":"ID of the coupon the promotion code applies.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"ID of the Hyperline company the promotion code belongs to.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":["Catalog > 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":"ID of the coupon the promotion code applies.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"ID of the Hyperline company the promotion code belongs to.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":["Catalog > 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":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":"ID of the coupon the promotion code applies.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"ID of the Hyperline company the promotion code belongs to.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"ID of the customer the promotion code is restricted to. If set, only this customer can use it.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"ID of the plan the promotion code is restricted to. If set, only subscriptions with this plan can use it.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"ID of the product the promotion code is restricted to. If set, only subscriptions with this product can use it.","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":["Catalog > 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","description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values.","name":"product_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values.","name":"product_id__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values.","name":"customer_id__notIn","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"}}}},"409":{"description":"The payment provider connection expired or was revoked and must be reconnected.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/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":{"type":"string","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values.","name":"name__notIn","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":{"type":"string","description":"Rows that match one of the other `type` values. Values: corporate, person."},"required":false,"description":"Rows that match one of the other `type` values. Values: corporate, person.","name":"type__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `type` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: corporate, person."},"required":false,"description":"Rows that match none of these `type` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: corporate, person.","name":"type__notIn","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","description":"Rows that match one of the other `status` values. Values: all, active, inactive, imported, archived."},"required":false,"description":"Rows that match one of the other `status` values. Values: all, active, inactive, imported, archived.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, inactive, imported, archived."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, inactive, imported, archived.","name":"status__notIn","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","description":"Rows whose `currency` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `currency` is one of these values. Comma-separated, max 100 values.","name":"currency__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `currency` is none of these values. Comma-separated, max 100 values. Rows where `currency` is empty are not returned; use `currency__isNull=true` to get them."},"required":false,"description":"Rows whose `currency` is none of these values. Comma-separated, max 100 values. Rows where `currency` is empty are not returned; use `currency__isNull=true` to get them.","name":"currency__notIn","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","description":"Rows whose `country` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `country` is one of these values. Comma-separated, max 100 values.","name":"country__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `country` is none of these values. Comma-separated, max 100 values. Rows where `country` is empty are not returned; use `country__isNull=true` to get them."},"required":false,"description":"Rows whose `country` is none of these values. Comma-separated, max 100 values. Rows where `country` is empty are not returned; use `country__isNull=true` to get them.","name":"country__notIn","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","description":"Rows whose `external_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `external_id` is one of these values. Comma-separated, max 100 values.","name":"external_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `external_id` is none of these values. Comma-separated, max 100 values. Rows where `external_id` is empty are not returned; use `external_id__isNull=true` to get them."},"required":false,"description":"Rows whose `external_id` is none of these values. Comma-separated, max 100 values. Rows where `external_id` is empty are not returned; use `external_id__isNull=true` to get them.","name":"external_id__notIn","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","description":"Rows whose `billing_email` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `billing_email` is one of these values. Comma-separated, max 100 values.","name":"billing_email__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `billing_email` is none of these values. Comma-separated, max 100 values. Rows where `billing_email` is empty are not returned; use `billing_email__isNull=true` to get them."},"required":false,"description":"Rows whose `billing_email` is none of these values. Comma-separated, max 100 values. Rows where `billing_email` is empty are not returned; use `billing_email__isNull=true` to get them.","name":"billing_email__notIn","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":{"type":"string"},"required":false,"name":"local_tax_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"local_tax_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"local_tax_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"local_tax_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"local_tax_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"local_tax_number__endWith","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"local_tax_number__isNull","in":"query"},{"schema":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","enum":[""]}]},"required":false,"name":"local_tax_number__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":"ID of the customer within the batch, supplied by you.","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":"ID of the parent organisation the customer is attached to.","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":"ID of the customer within the batch, supplied by you.","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 > Lifecycle"],"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 > Lifecycle"],"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 > Lifecycle"],"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":"ID of the customer whose provider account is updated.","example":"cus_Typ0px2W0aiEtl"},"provider_name":{"type":"string","enum":["mollie","stripe","gocardless","airwallex","adyen","hubspot","attio","salesforce","datev","xero","exact-online","pennylane","quickbooks","netsuite","rillet","zoho-books","anrok"],"description":"Provider name."},"provider_id":{"type":"string","description":"ID of the connected provider. 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":"IDs of the customers 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":"ID of the aggregator filter to apply. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"ID of the aggregator filter to apply. 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":"ID of the aggregator filter to apply. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path."},"required":false,"description":"ID of the aggregator filter to apply. 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":["Customers > 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":["Customers > 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":["Customers > 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":["Reports > 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":["Reports > 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":["Reports > 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":["Reports > 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":["Catalog > 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","description":"Rows whose `code` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `code` is one of these values. Comma-separated, max 100 values.","name":"code__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `code` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `code` is none of these values. Comma-separated, max 100 values.","name":"code__notIn","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","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values.","name":"name__notIn","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","description":"Rows that match one of the other `status` values. Values: all, active, archived."},"required":false,"description":"Rows that match one of the other `status` values. Values: all, active, archived.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, archived."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, archived.","name":"status__notIn","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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values.","name":"name__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values. Rows where `customer_id` is empty are not returned; use `customer_id__isNull=true` to get them."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values. Rows where `customer_id` is empty are not returned; use `customer_id__isNull=true` to get them.","name":"customer_id__notIn","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 > 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 > 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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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":"Invoicing entity ID.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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 > 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":"Invoicing entity ID.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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 > 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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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":"Invoicing entity ID.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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}. Use {number:0W} instead of {number} to pad the number with zeros to W digits, W from 1 to 20 (e.g. INV-{number:06} gives INV-000042). A longer number is not truncated.","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 > 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":["Agents > 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":"ID of the customer whose analyses to return. Accepts the Hyperline ID or your own external ID.","example":"cus_Typ0px2W0aiEtl"},"required":false,"description":"ID of the customer whose analyses to return. Accepts the Hyperline ID or your own external ID.","name":"customer_id","in":"query"},{"schema":{"type":"string","description":"IDs of the customers whose analyses to return, comma-separated, up to 100. Cannot be combined with `customer_id`.","example":"cus_Typ0px2W0aiEtl,cus_3Fm8vNq1ZsKdYb"},"required":false,"description":"IDs of the customers whose analyses to return, comma-separated, up to 100. 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":["Agents > 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":{"sub":{"type":["string","null"],"description":"ID of the authenticated user.","example":"usr_DKL4Xcb5VSa8CQ"},"client_id":{"type":["string","null"],"description":"ID of the Hyperline company (workspace) the request acts on. Not the ID of your OAuth application.","example":"cli_KMcxRWc1ZQwvJG"},"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":["sub","client_id","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":"ID of 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":"Client ID.","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":["Transactions"],"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 the payment is collected from.","example":"cus_Typ0px2W0aiEtl"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID of the catalog product billed on the invoice.","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":"ID of the catalog product billed on the invoice.","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":"ID of the catalog coupon to apply to the invoice.","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":"ID of the invoice created for the payment."},"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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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":{"type":"string","description":"Rows whose `id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is one of these values. Comma-separated, max 100 values.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","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","description":"Rows that match one of the other `status` values. Values: all, active, archived."},"required":false,"description":"Rows that match one of the other `status` values. Values: all, active, archived.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, archived."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, active, archived.","name":"status__notIn","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","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values.","name":"name__notIn","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","description":"Rows whose `description` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `description` is one of these values. Comma-separated, max 100 values.","name":"description__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `description` is none of these values. Comma-separated, max 100 values. Rows where `description` is empty are not returned; use `description__isNull=true` to get them."},"required":false,"description":"Rows whose `description` is none of these values. Comma-separated, max 100 values. Rows where `description` is empty are not returned; use `description__isNull=true` to get them.","name":"description__notIn","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","description":"Rows whose `type` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `type` is one of these values. Comma-separated, max 100 values.","name":"type__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `type` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `type` is none of these values. Comma-separated, max 100 values.","name":"type__notIn","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":["Catalog > 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":["Catalog > 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":["Catalog > 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"},"bundle_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateBundleProductItem"},"minItems":1,"description":"Products included in this bundle, replacing the current ones; only accepted on a bundle product. Percentages must sum to 100. Subscriptions using the bundle pick up the new items on their next invoices."}},"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":["Catalog > 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":["Catalog > 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":["Catalog > 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":["Catalog > 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","description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is one of these values. Comma-separated, max 100 values.","name":"product_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `product_id` is none of these values. Comma-separated, max 100 values.","name":"product_id__notIn","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"},{"schema":{"type":"string","description":"Rows whose `price_book_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `price_book_id` is one of these values. Comma-separated, max 100 values.","name":"price_book_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `price_book_id` is none of these values. Comma-separated, max 100 values. Rows where `price_book_id` is empty are not returned; use `price_book_id__isNull=true` to get them."},"required":false,"description":"Rows whose `price_book_id` is none of these values. Comma-separated, max 100 values. Rows where `price_book_id` is empty are not returned; use `price_book_id__isNull=true` to get them.","name":"price_book_id__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPriceConfiguration"}}}}}},"post":{"operationId":"createPriceConfiguration","tags":["Catalog > 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 the 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 the 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 the 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 the 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 the 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 the 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":["Catalog > 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 the 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 the 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 the 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 the 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 the 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 the 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":["Catalog > 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":["Catalog > 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 the 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 the 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 the 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 the 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 the 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 the 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":["Quoting"],"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 the quote is addressed to.","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},"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":"Custom property values set on the quote itself, keyed by slug. Custom property values of a quote's subscription are returned on the subscription."},"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.","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","unit_price"]},{"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- `unit_price`: Show only the unit price, without 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 the quote is built from. 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription"},{"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_update":{"$ref":"#/components/schemas/CreateQuoteSubscriptionUpdate"}},"required":["expires_at","subscription_update"],"title":"Subscription update"},{"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 invoice"}]},{"type":"object"}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedQuote"}}}}}},"get":{"operationId":"listQuotes","tags":["Quoting"],"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","description":"Rows whose `id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is one of these values. Comma-separated, max 100 values.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","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":{"type":"string","description":"Rows whose `number` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `number` is one of these values. Comma-separated, max 100 values.","name":"number__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `number` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `number` is none of these values. Comma-separated, max 100 values.","name":"number__notIn","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","description":"Rows that match one of the other `status` values. Values: all, draft, pending_approval, changes_requested, approved, pending_signature, expired, signed, voided."},"required":false,"description":"Rows that match one of the other `status` values. Values: all, draft, pending_approval, changes_requested, approved, pending_signature, expired, signed, voided.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, draft, pending_approval, changes_requested, approved, pending_signature, expired, signed, voided."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: all, draft, pending_approval, changes_requested, approved, pending_signature, expired, signed, voided.","name":"status__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values.","name":"customer_id__notIn","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","description":"Rows whose `template_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `template_id` is one of these values. Comma-separated, max 100 values.","name":"template_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `template_id` is none of these values. Comma-separated, max 100 values. Rows where `template_id` is empty are not returned; use `template_id__isNull=true` to get them."},"required":false,"description":"Rows whose `template_id` is none of these values. Comma-separated, max 100 values. Rows where `template_id` is empty are not returned; use `template_id__isNull=true` to get them.","name":"template_id__notIn","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","description":"Rows whose `crm_opportunity_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `crm_opportunity_id` is one of these values. Comma-separated, max 100 values.","name":"crm_opportunity_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `crm_opportunity_id` is none of these values. Comma-separated, max 100 values. Rows where `crm_opportunity_id` is empty are not returned; use `crm_opportunity_id__isNull=true` to get them."},"required":false,"description":"Rows whose `crm_opportunity_id` is none of these values. Comma-separated, max 100 values. Rows where `crm_opportunity_id` is empty are not returned; use `crm_opportunity_id__isNull=true` to get them.","name":"crm_opportunity_id__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"catalog_version_id","in":"query"},{"schema":{"type":"string","description":"Rows whose `catalog_version_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `catalog_version_id` is one of these values. Comma-separated, max 100 values.","name":"catalog_version_id__in","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":["Quoting > 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","description":"Rows whose `id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is one of these values. Comma-separated, max 100 values.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","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","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values.","name":"name__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_template_id","in":"query"},{"schema":{"type":"string","description":"Rows whose `subscription_template_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `subscription_template_id` is one of these values. Comma-separated, max 100 values.","name":"subscription_template_id__in","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":["Quoting > 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":["Quoting"],"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":["Quoting"],"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. On a draft subscription update quote, pass `subscription_update.target_subscription` to replace the configuration the quote proposes; the updated subscription and the application schedule cannot be changed.\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":["Quoting"],"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":["Quoting > Documents"],"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":["Quoting > 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":["Quoting > Approvals"],"security":[{"bearer":[]}],"summary":"Get quote approvals","description":"Retrieve quote approvals: one per approval category that applies to the quote. Draft and changes-requested quotes return previews; other statuses return the executions of the latest submission.","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":["Quoting > Lifecycle"],"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":["Quoting > Lifecycle"],"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":["Quoting > Lifecycle"],"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":["Quoting > Recipients"],"security":[{"bearer":[]}],"summary":"List quote signers","description":"Retrieve the signature workflow of a quote, step by step, with the signature status of each signer and how each customer signer receives their codes.","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":["Quoting > Recipients"],"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}/viewers":{"get":{"operationId":"listQuoteViewers","tags":["Quoting > Recipients"],"security":[{"bearer":[]}],"summary":"List quote viewers","description":"Retrieve the viewers of a quote, who can open it without signing, with the status of each viewer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuoteViewer"}}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"setQuoteViewers","tags":["Quoting > Recipients"],"security":[{"bearer":[]}],"summary":"Set quote viewers","description":"Replace the viewers of a quote, who can open it without signing. The signers are left untouched.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetQuoteViewers"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuoteViewer"}}}}},"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":["Quoting > Signatures"],"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":["Quoting > Lifecycle"],"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":["Quoting > Documents"],"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 > Billing"],"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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}/engine":{"put":{"operationId":"updateSubscriptionEngine","tags":["Subscriptions > Billing"],"security":[{"bearer":[]}],"summary":"Update subscription engine","description":"Switch an externally billed subscription to Hyperline billing.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"engine":{"type":"string","enum":["hyperline"],"description":"Target billing engine. Only switching to Hyperline is supported.","example":"hyperline"},"cancel_external_subscription":{"type":"boolean","description":"Cancel the external provider subscription when switching to Hyperline. Defaults to false. Only applies during the switch; repeating the request does not cancel an external subscription left running by an earlier switch.","example":false}},"required":["engine"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"400":{"description":"Invalid engine switch.","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}/update":{"post":{"operationId":"createSubscriptionUpdate","tags":["Subscriptions > Changes"],"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 > Changes"],"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 > Lifecycle"],"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 > Lifecycle"],"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 > Lifecycle"],"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 > Lifecycle"],"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 > Lifecycle"],"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 > Lifecycle"],"security":[{"bearer":[]}],"summary":"Renew subscription","description":"\nThis action will move an active 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, as on a renewal: issued to pay (or as drafts when the subscription generates draft invoices), and a customer paying by card or direct debit is charged when the invoice is issued, not at its due date.\n\nThe subscription must be active and billed by Hyperline: a pending, paused or cancelled subscription, or one billed by an external provider, is refused. Each renewal is saved on its own: a call that fails part way keeps the periods it already renewed and invoiced, and calling again with the same date renews only what is left. A call renews 37 periods at most.","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 > Changes"],"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/preview-timeline":{"post":{"operationId":"previewNewSubscriptionTimeline","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Preview new subscription timeline","description":"Preview the billing timeline of a subscription before creating it: from the payload `POST /v2/subscriptions` takes, its future lifecycle events — activation, renewals and phase changes — in chronological order, each with the invoice document(s) it would issue, plus why the projection stopped. Nothing is created and the customer is not updated. Pass `customer` to preview it for another customer profile (country, type, tax ID). Amounts are best-effort estimates (metered usage is assumed to be 0), taxed at one rate resolved for the customer. A `cancel_at` with a charge or refund `cancellation_strategy` ends the timeline without its closing charge or credit note.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewNewSubscriptionTimeline"}}}},"responses":{"200":{"description":"Projected timeline of the subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPreviewTimeline"}}}},"400":{"description":"Invalid subscription payload or customer.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/preview-timeline":{"get":{"operationId":"previewSubscriptionTimeline","tags":["Subscriptions > Lifecycle"],"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 > Billing"],"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":{"type":"string","description":"Rows that match one of the other `activation_strategy` values. Values: checkout, contract_start_date, quote, start_date, manually."},"required":false,"description":"Rows that match one of the other `activation_strategy` values. Values: checkout, contract_start_date, quote, start_date, manually.","name":"activation_strategy__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `activation_strategy` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: checkout, contract_start_date, quote, start_date, manually."},"required":false,"description":"Rows that match none of these `activation_strategy` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: checkout, contract_start_date, quote, start_date, manually.","name":"activation_strategy__notIn","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, and `status__not` / `status__notIn` to exclude statuses. Unless `status`, `status__in` or `status__notIn` is set, `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, and `status__not` / `status__notIn` to exclude statuses. Unless `status`, `status__in` or `status__notIn` is set, `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","description":"Rows that do not match this `status` value. Values: all, any, inactive, active, errored, cancelled, paused, pending, draft, voided, archived."},"required":false,"description":"Rows that do not match this `status` value. Values: all, any, inactive, active, errored, cancelled, paused, pending, draft, voided, archived.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values. Comma-separated, max 100 values. Values: all, any, inactive, active, errored, cancelled, paused, pending, draft, voided, archived."},"required":false,"description":"Rows that match none of these `status` values. Comma-separated, max 100 values. Values: all, any, inactive, active, errored, cancelled, paused, pending, draft, voided, archived.","name":"status__notIn","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","description":"Rows whose `currency` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `currency` is one of these values. Comma-separated, max 100 values.","name":"currency__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `currency` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `currency` is none of these values. Comma-separated, max 100 values.","name":"currency__notIn","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","description":"Rows whose `plan_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `plan_id` is one of these values. Comma-separated, max 100 values.","name":"plan_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `plan_id` is none of these values. Comma-separated, max 100 values. Rows where `plan_id` is empty are not returned; use `plan_id__isNull=true` to get them."},"required":false,"description":"Rows whose `plan_id` is none of these values. Comma-separated, max 100 values. Rows where `plan_id` is empty are not returned; use `plan_id__isNull=true` to get them.","name":"plan_id__notIn","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","description":"Rows whose `original_quote_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `original_quote_id` is one of these values. Comma-separated, max 100 values.","name":"original_quote_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `original_quote_id` is none of these values. Comma-separated, max 100 values. Rows where `original_quote_id` is empty are not returned; use `original_quote_id__isNull=true` to get them."},"required":false,"description":"Rows whose `original_quote_id` is none of these values. Comma-separated, max 100 values. Rows where `original_quote_id` is empty are not returned; use `original_quote_id__isNull=true` to get them.","name":"original_quote_id__notIn","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","description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `customer_id` is one of these values. Comma-separated, max 100 values.","name":"customer_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values. Rows where `customer_id` is empty are not returned; use `customer_id__isNull=true` to get them."},"required":false,"description":"Rows whose `customer_id` is none of these values. Comma-separated, max 100 values. Rows where `customer_id` is empty are not returned; use `customer_id__isNull=true` to get them.","name":"customer_id__notIn","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string","description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values.","name":"invoicing_entity_id__in","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":"Rows whose `purchase_order` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `purchase_order` is one of these values. Comma-separated, max 100 values.","name":"purchase_order__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `purchase_order` is none of these values. Comma-separated, max 100 values. Rows where `purchase_order` is empty are not returned; use `purchase_order__isNull=true` to get them."},"required":false,"description":"Rows whose `purchase_order` is none of these values. Comma-separated, max 100 values. Rows where `purchase_order` is empty are not returned; use `purchase_order__isNull=true` to get them.","name":"purchase_order__notIn","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","description":"Rows whose `integration_entity_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `integration_entity_id` is one of these values. Comma-separated, max 100 values.","name":"integration_entity_id__in","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","description":"Rows that match one of the other `status` values. Values: scheduled, draft, pending_approval, changes_requested, completed, cancelled, failed, pending_quote_signature."},"required":false,"description":"Rows that match one of the other `status` values. Values: scheduled, draft, pending_approval, changes_requested, completed, cancelled, failed, pending_quote_signature.","name":"status__not","in":"query"},{"schema":{"type":"string","description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: scheduled, draft, pending_approval, changes_requested, completed, cancelled, failed, pending_quote_signature."},"required":false,"description":"Rows that match none of these `status` values; a single value returns the rows that match one of the other values. Comma-separated, max 100 values. Values: scheduled, draft, pending_approval, changes_requested, completed, cancelled, failed, pending_quote_signature.","name":"status__notIn","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","description":"Rows whose `source_subscription_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `source_subscription_id` is one of these values. Comma-separated, max 100 values.","name":"source_subscription_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `source_subscription_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `source_subscription_id` is none of these values. Comma-separated, max 100 values.","name":"source_subscription_id__notIn","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","description":"Rows whose `base_subscription_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `base_subscription_id` is one of these values. Comma-separated, max 100 values.","name":"base_subscription_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `base_subscription_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `base_subscription_id` is none of these values. Comma-separated, max 100 values.","name":"base_subscription_id__notIn","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","description":"Rows whose `target_subscription_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `target_subscription_id` is one of these values. Comma-separated, max 100 values.","name":"target_subscription_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `target_subscription_id` is none of these values. Comma-separated, max 100 values. Rows where `target_subscription_id` is empty are not returned; use `target_subscription_id__isNull=true` to get them."},"required":false,"description":"Rows whose `target_subscription_id` is none of these values. Comma-separated, max 100 values. Rows where `target_subscription_id` is empty are not returned; use `target_subscription_id__isNull=true` to get them.","name":"target_subscription_id__notIn","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":"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":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription transition ID."},"customer_id":{"type":"string","description":"ID of the customer whose subscription transitions."},"base_subscription_id":{"type":"string","description":"ID of the original subscription the transition is derived from. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"ID of the subscription to transition from."},"target_subscription_id":{"type":["string","null"],"description":"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","last_renewal_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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"}},"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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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"}},"price_adjustment":{"oneOf":[{"$ref":"#/components/schemas/ContractTermsRenewalPriceAdjustment"},{"$ref":"#/components/schemas/ContractTermsDurationPriceAdjustment"},{"type":"null"}],"description":"Price adjustment applied to the subscription prices over the contract. `null` if the contract has no price adjustment.","example":{"frequency":"renewal","percent":7}},"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","price_adjustment","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":"ID of the promotion code the coupon was created from, if any.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"ID of the coupon as applied to 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 > Billing"],"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":"ID of the subscription the update applies to.","example":"sub_7aWtG7Gb_fwGno"},"product_id":{"type":"string","description":"ID of the product whose count is updated.","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":"ID of the 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":"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":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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"},"payment_method_id":{"type":"string","description":"ID of the customer's payment method used to pay the subscription's invoices, instead of the customer's default one. Cannot be combined with `bank_account_id`. Omit to use the customer's payment method.","example":"pm_abc123"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the subscription's invoices, which are then paid by bank transfer, instead of the customer's default payment method. Cannot be combined with `payment_method_id`. Omit to use the customer's payment method.","example":"bac_abc123"},"shipping_address_id":{"type":"string","description":"ID of the customer's active shipping address the subscription ships to. 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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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"},"price_configuration_id":{"type":["string","null"],"description":"ID of the product's price configuration to price this product from, instead of the one the catalog rules select. It must be a live base configuration of the product (not archived or replaced by a later catalog publish, and not specific to a customer, price book, customer segment or plan), in the subscription's currency. Requires `payment_interval`, which it must match. The configuration's country and commitment restrictions are not checked. With a pinned catalog version, the product is priced from that version's copy of the configuration, and a configuration the version doesn't price returns a 400. Cannot be combined with `price`, `prices` or `plan_id`.","example":"prc_8f3kXODIM1sBwB"},"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","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices. Defaults to the product's `description_display_interval_dates` in the products catalog."},"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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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  - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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","flat_per_tier"],"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- `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.\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":"ID of the catalog coupon to apply to the subscription."}},"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":"Subscription transition ID."},"customer_id":{"type":"string","description":"ID of the customer whose subscription transitions."},"base_subscription_id":{"type":"string","description":"ID of the original subscription the transition is derived from. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"ID of the subscription to transition from."},"target_subscription_id":{"type":["string","null"],"description":"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","last_renewal_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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"}},"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":"Subscription transition ID."},"customer_id":{"type":"string","description":"ID of the customer whose subscription transitions."},"base_subscription_id":{"type":"string","description":"ID of the original subscription the transition is derived from. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"ID of the subscription to transition from."},"target_subscription_id":{"type":["string","null"],"description":"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","last_renewal_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 (with 'pro_rata' or 'pro_rata_separate_documents', the lines already invoiced for that period are credited and the period is invoiced again with the new prices). 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":"\nHow the billing cycle is handled at the transition date. Defaults to `keep_current_billing_cycle`.\n\n- `keep_current_billing_cycle`: the current billing period continues with the new configuration, and the next renewal date is unchanged. Rejected when the two configurations share no product billing periodicity, as the cycle cannot then be preserved: use `align_to_new_billing_cycle` instead.\n- `align_to_new_billing_cycle`: a new billing period starts on the transition date, and the billing cycle is aligned to it.\n\nSee `calculation_method` for what each option bills.\n"},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata","pro_rata_separate_documents"],"description":"\nHow the billing period in progress is settled at the transition date. Defaults to `do_not_charge`.\n\n- `do_not_charge`: no transition document is issued, and units added to already invoiced one-off products are not billed. With `keep_current_billing_cycle`, usage and end-of-period products are billed for the whole period at period end, with the new prices. With `align_to_new_billing_cycle`, usage and end-of-period products elapsed before the transition date are never billed, and start-of-period products are neither credited nor charged until the following renewal.\n- `pro_rata`: issues one document that nets both configurations. Previous configuration: start-of-period products are credited for the rest of the period, end-of-period products are charged prorated up to the transition date, and usage is charged up to the transition date. New configuration: start-of-period products are charged until the period end with `keep_current_billing_cycle`, or for a full new period with `align_to_new_billing_cycle`. Equal and opposite lines are removed. The document is a credit note when its total is negative, otherwise an invoice. Not available when the invoicing entity issues credit notes and invoices as separate documents.\n- `pro_rata_separate_documents`: the same lines as `pro_rata`, split into one document for the previous configuration and one for the new configuration. Each document is a credit note when its own total is negative, otherwise an invoice.\n\nWith `application_schedule` `last_renewal` and `pro_rata` or `pro_rata_separate_documents`, the lines already invoiced for the current period are credited, and the period is invoiced again with the new prices.\n"}},"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":["Invoicing > 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","description":"Rows whose `id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is one of these values. Comma-separated, max 100 values.","name":"id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `id` is none of these values. Comma-separated, max 100 values.","name":"id__notIn","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","description":"Rows whose `name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `name` is one of these values. Comma-separated, max 100 values.","name":"name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `name` is none of these values. Comma-separated, max 100 values. Rows where `name` is empty are not returned; use `name__isNull=true` to get them."},"required":false,"description":"Rows whose `name` is none of these values. Comma-separated, max 100 values. Rows where `name` is empty are not returned; use `name__isNull=true` to get them.","name":"name__notIn","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","description":"Rows whose `description` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `description` is one of these values. Comma-separated, max 100 values.","name":"description__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `description` is none of these values. Comma-separated, max 100 values. Rows where `description` is empty are not returned; use `description__isNull=true` to get them."},"required":false,"description":"Rows whose `description` is none of these values. Comma-separated, max 100 values. Rows where `description` is empty are not returned; use `description__isNull=true` to get them.","name":"description__notIn","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","description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoicing_entity_id` is one of these values. Comma-separated, max 100 values.","name":"invoicing_entity_id__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `invoicing_entity_id` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `invoicing_entity_id` is none of these values. Comma-separated, max 100 values.","name":"invoicing_entity_id__notIn","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTaxRate"}}}}}},"post":{"operationId":"createTaxRate","tags":["Invoicing > 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":["Invoicing > 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":["Invoicing > 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":["Invoicing > 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":"ID of the bank account used for the 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":"ID of the bank account used for the 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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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/transactions/{id}/allocate":{"post":{"operationId":"allocateTransaction","tags":["Transactions > Allocations"],"security":[{"bearer":[]}],"summary":"Allocate transaction","description":"Allocate the unallocated amount of a settled transaction to an invoice of the same customer, updating the invoice's amount due and payment status.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice to allocate the transaction to. It must belong to the transaction's customer, use its currency, and be awaiting payment. Refund transactions can only be allocated to credit notes.","example":"inv_2QdJDDUej969ev"},"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Amount to allocate, in the currency's smallest unit. Defaults to the lower of the transaction's unallocated amount and the invoice's remaining amount due. Rejected when it exceeds that amount.","example":31500}},"required":["invoice_id"]}}}},"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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"Transaction or invoice cannot receive this allocation, or the amount exceeds what is available.","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"]}}}}}}},"/v1/transactions/{id}/unallocate":{"post":{"operationId":"unallocateTransaction","tags":["Transactions > Allocations"],"security":[{"bearer":[]}],"summary":"Unallocate transaction","description":"Remove a transaction's allocation to an invoice. The transaction is kept and the amount becomes unallocated; the invoice switches back to to pay or partially paid.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","description":"ID of the invoice whose allocation is removed from the transaction.","example":"inv_2QdJDDUej969ev"}},"required":["invoice_id"]}}}},"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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"ID of the payment transaction refunded or charged back.","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":"Transaction is not allocated to the invoice, or its allocations cannot be changed.","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"]}}}}}}},"/v1/users/roles":{"get":{"operationId":"listUserRoles","tags":["Users"],"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"],"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","description":"Rows whose `first_name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `first_name` is one of these values. Comma-separated, max 100 values.","name":"first_name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `first_name` is none of these values. Comma-separated, max 100 values. Rows where `first_name` is empty are not returned; use `first_name__isNull=true` to get them."},"required":false,"description":"Rows whose `first_name` is none of these values. Comma-separated, max 100 values. Rows where `first_name` is empty are not returned; use `first_name__isNull=true` to get them.","name":"first_name__notIn","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","description":"Rows whose `last_name` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `last_name` is one of these values. Comma-separated, max 100 values.","name":"last_name__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `last_name` is none of these values. Comma-separated, max 100 values. Rows where `last_name` is empty are not returned; use `last_name__isNull=true` to get them."},"required":false,"description":"Rows whose `last_name` is none of these values. Comma-separated, max 100 values. Rows where `last_name` is empty are not returned; use `last_name__isNull=true` to get them.","name":"last_name__notIn","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"},{"schema":{"type":"string","description":"Rows whose `email` is one of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `email` is one of these values. Comma-separated, max 100 values.","name":"email__in","in":"query"},{"schema":{"type":"string","description":"Rows whose `email` is none of these values. Comma-separated, max 100 values."},"required":false,"description":"Rows whose `email` is none of these values. Comma-separated, max 100 values.","name":"email__notIn","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":["Quoting"],"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.tax_id_checked","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.electronic_invoice.generated","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.marked_as_spam","email.delivery_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.scheduled","subscription_transition.completed","subscription_transition.cancelled","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.tax_id_checked","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.electronic_invoice.generated","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.marked_as_spam","email.delivery_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.scheduled","subscription_transition.completed","subscription_transition.cancelled","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.tax_id_checked","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.electronic_invoice.generated","invoice.electronic_invoice.sent","invoice.electronic_invoice.failed","invoice.batch.creation_succeeded","invoice.batch.creation_failed","invoice.batch.email_succeeded","invoice.batch.email_skipped","invoice.batch.email_failed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.marked_as_spam","email.delivery_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.scheduled","subscription_transition.completed","subscription_transition.cancelled","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":{}}