On this page
No Headings
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
readwriteapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/commerce/billing/credit-notes" \ -H "Content-Type: application/json" \ -d '{ "invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "items": [ { "fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "amount": { "value": 0.1 } }, { "fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a91", "amount": { "value": 0.05 } } ] }'{
"billing_entity_code": "acme_inc",
"sequential_id": 2,
"number": "PP-1234-US",
"invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"invoice_number": "PP-1234",
"issuing_date": "2022-12-06",
"credit_status": "AVAILABLE",
"refund_status": "PENDING",
"reason": "OTHER",
"description": "Free text",
"total_amount": {
"value": 1.2,
"currency_code": "USD"
},
"taxes_amount": {
"value": 0.2,
"currency_code": "USD"
},
"taxes_rate": 0.2,
"sub_total_excluding_taxes_amount": {
"value": 1,
"currency_code": "USD"
},
"balance_amount": {
"value": 1,
"currency_code": "USD"
},
"credit_amount": {
"value": 1,
"currency_code": "USD"
},
"refund_amount": {
"value": 0,
"currency_code": "USD"
},
"created_at": "2022-09-14T16:35:31Z",
"updated_at": "2022-09-14T16:35:31Z",
"items": [
{
"id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount": {
"value": 1,
"currency_code": "USD"
},
"fee": {
"id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"total_amount": {
"value": 1.2,
"currency_code": "USD"
},
"name": "Basic Plan"
}
}
],
"applied_taxes": [
{
"credit_note_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"base_amount": {
"value": 1,
"currency_code": "USD"
},
"id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"tax_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"tax_name": "TVA",
"tax_code": "french_standard_vat",
"tax_rate": 20,
"tax_description": "French standard VAT",
"amount": {
"value": 20,
"currency_code": "USD"
},
"created_at": "2022-09-14T16:35:31Z"
}
],
"id": "string"
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "dc99e3955cdd8",
"details": [
{
"field": "/email",
"value": "abc",
"location": "body",
"issue": "INVALID_PARAMETER_VALUE",
"description": "The value of a field does not conform to the expected format."
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "565f78f101498",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
]
}{
"name": "string",
"debug_id": "string",
"message": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "string",
"issue": "string",
"description": "string"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "sdfwdj@sdfs.com",
"location": "body",
"issue": "UNSUPPORTED_EMAIL",
"description": "The email provided is not supported."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}The invoice unique identifier.
uuidThe reason for credit note creation
"DUPLICATED_CHARGE" | "PRODUCT_UNSATISFACTORY" | "ORDER_CHANGE" | "ORDER_CANCELLATION" | "FRAUDULENT_CHARGE" | "OTHER"The description of the credit note.
The total amount to be credited on the customer balance.
The total amount to be credited on the customer balance.
The list of credit note's items.
1 <= items