On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicing/invoices/readwritehttps://uri.paypal.com/services/invoicing/internalThe ID of the invoice for which to update the conditional rule associated with it.
^INV2-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$24 <= length <= 24The conditional rule ID to update.
^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}$39 <= length <= 39Holds authorization information for external API calls.
^.*$1 <= length <= 16000application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api-m.sandbox.paypal.com/v2/invoicing/invoices/INV2-S884-EJT6-73AU-QF4C/conditional-rules/CR-11FF-A725-27C6999C-A699-33CD614E75ED" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "Content-Type: application/json" \ -d '{ "conditional_rule_type": "EARLY_PAYMENT_DISCOUNT", "conditional_rule_value_type": "PERCENT", "conditional_rule_value": "10", "rule_expiry_terms": { "rule_expiry_condition": "SEVEN_DAYS_AFTER_ISSUE_DATE", "condition_rule_end_date": "2025-03-12" } }'{
"conditional_rule_id": "CR-11FF-A725-27C6999C-A699-33CD614E75EC",
"conditional_rule_type": "EARLY_PAYMENT_DISCOUNT",
"conditional_rule_value_type": "PERCENT",
"conditional_rule_value": "10",
"rule_expiry_terms": {
"rule_expiry_condition": "SEVEN_DAYS_AFTER_ISSUE_DATE",
"condition_rule_end_date": "2025-03-12"
},
"created_time": "2025-01-29T10:15:30Z",
"updated_time": "2025-01-29T10:15:30Z",
"links": [
{
"href": "v2/invoicing/invoices/INV2-S884-EJT6-73AU-QF4C/conditional-rules/CR-11FF-A725-27C6999C-A699-33CD614E75EC",
"rel": "self",
"method": "GET"
},
{
"href": "v2/invoicing/invoices/INV2-S884-EJT6-73AU-QF4C/conditional-rules/CR-11FF-A725-27C6999C-A699-33CD614E75EC",
"rel": "delete",
"method": "DELETE"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [],
"links": []
}{
"name": "AUTHENTICATION_FAILURE",
"debug_id": "b1d1f06c7246c",
"message": "Authentication failed due to missing Authorization header, or invalid authentication credentials."
}{
"name": "NOT_AUTHORIZED",
"debug_id": "b1d1f06c7246c",
"message": "Authorization failed due to insufficient permissions."
}{
"name": "RESOURCE_NOT_FOUND",
"message": "The specified resource does not exist.",
"debug_id": "13baa436f527b",
"links": [
{
"href": "https://developer.paypal.com/docs/limited-release/invoicing/#errors",
"rel": "information_link",
"method": "GET"
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}^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}$39 <= length <= 39"EARLY_PAYMENT_DISCOUNT" | "AUTO_CANCEL"Represents the value of the conditional rule it can be a percentage or absolute value. In case of absolute value, which might be:An integer for currencies like JPY that are not typically fractional.A decimal fraction for currencies like TND that are subdivided into thousandths.For the required number of decimal places for a currency code, see Currency Codes.
^(([0-9]+)|(([0-9]+)?[.][0-9]+))$1 <= length <= 32"PERCENT" | "AMOUNT"The expiry terms that define when a conditional rule on an invoice expires, including the expiry condition and the end date.
^[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})$20 <= length <= 64^[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})$20 <= length <= 64