On this page
No Headings
The conditional rules associated with an invoice. Conditional rules define automated actions or adjustments that apply to an invoice based on specific conditions, such as early payment discounts, or auto cancellation.
objectrulesarrayThe list of conditional rules created by the merchant.
itemsobjectThe conditional rule fields that define automated actions or adjustments applied by the merchant to an invoice, such as early payment discounts or auto cancellation.
Individual conditional rule definition.
conditional_rule_idobject^CR-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$A unique identifier for the conditional rule, This ID is generated as a time-based UUID (version 1) to ensure uniqueness and traceability of the rule creation time.
The unique identifier for the conditional rule.
conditional_rule_typerequiredobject"EARLY_PAYMENT_DISCOUNT", "AUTO_CANCEL"This enum defines what type of rule is applying for the particular invoice.
The type of conditional rule applied to the invoice.
conditional_rule_valuestring^(([0-9]+)|(([0-9]+)?[.][0-9]+))$Represents the value of the conditional rule it can be a percentage or absolute value. In case of absolute value, which might be:
JPY that are not typically fractional.TND that are subdivided into thousandths.conditional_rule_value_typeobject"PERCENT", "AMOUNT"Type of the stored discount. Used to determine whether its percentage or absolute currency value.
The value type that indicates how the conditional rule value is applied. Use PERCENT for a percentage-based discount or AMOUNT for an absolute currency value.
discount_idstring^DISC-[A-Z0-9]+$The unique identifier for the stored discount that is created when an early payment discount rule is applied to an invoice.
discount_namestring^[a-zA-Z0-9\s]+$Represents the name of the stored discount.
rule_expiry_termsrequiredobjectThe expiry terms that define when a conditional rule on an invoice expires, including the expiry condition and the end date.
rule_expiry_conditionrequiredstring"THREE_DAYS_AFTER_ISSUE_DATE", "SEVEN_DAYS_AFTER_ISSUE_DATE", "FIFTEEN_DAYS_AFTER_ISSUE_DATE", "THIRTY_DAYS_AFTER_ISSUE_DATE", "ONE_DAY_AFTER_DUE_DATE", "SEVEN_DAYS_AFTER_DUE_DATE", "FIFTEEN_DAYS_AFTER_DUE_DATE", "THIRTY_DAYS_AFTER_DUE_DATE", "SPECIFIC_DATE"Defines the time-based condition that triggers the application of this conditional rule. This is expressed as a period relative to either the invoice issue date (for early payment discounts) or the invoice due date (for late payment surcharges and auto-cancellation). If the value is 'SPECIFIC_DATE', the 'effective_date' field must be provided to specify the exact date.
condition_rule_end_daterequiredobject^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$The stand-alone date, in Internet date and time format. To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard date_time type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
The calculated end date for the conditional rule based on the rule_expiry_condition. This date indicates when the rule will expire or take effect. Specified in Internet date and time format. Only UTC is supported in response. For example, 2025-03-12T00:00:00Z.
create_timeobject^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
Indicates time of rule creation.
update_timeobject^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
Indicates time of rule update.
linksarrayHATEOAS links.
itemsobjectThe request-related HATEOAS link information.
hrefrequiredstring^.*$The complete target URL. To make the related call, combine the method with this URI Template-formatted link. For pre-processing, include the $, (, and ) characters. The href is the key HATEOAS component that links a completed call with a subsequent call.
relrequiredstring^.*$The link relation type, which serves as an ID for a link that unambiguously describes the semantics of the link. See Link Relations.
methodstring"CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"The HTTP method required to make the related call.
linksarrayHATEOAS link of the created resource.
itemsobjectThe request-related HATEOAS link information.
hrefrequiredstring^.*$The complete target URL. To make the related call, combine the method with this URI Template-formatted link. For pre-processing, include the $, (, and ) characters. The href is the key HATEOAS component that links a completed call with a subsequent call.
relrequiredstring^.*$The link relation type, which serves as an ID for a link that unambiguously describes the semantics of the link. See Link Relations.
methodstring"CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"The HTTP method required to make the related call.