On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URL/api/oauth-proxyInheaderScopes
https://uri.paypal.com/services/invoicing/invoices/readwriteThe ID of the draft invoice to delete.
^.*$0 <= length <= 2147483647application/json
The details of the refund to record against the invoice.
TypeScript Definitions
Use the request body type in TypeScript.
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v2/invoicing/invoices/string/refunds" \ -H "Content-Type: application/json" \ -d '{ "method": "BANK_TRANSFER" }'{
"refund_id": "string"
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "MISSING_REQUIRED_PARAMETER",
"description": "Payment method is missing. Please provide a valid payment method."
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "The requested invoice is not associated with the requested user."
}
]
}{
"name": "RESOURCE_NOT_FOUND",
"message": "The specified resource does not exist.",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"debug_id": "string",
"links": []
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "INVALID_REFUND_AMOUNT",
"description": "Recorded refunds cannot exceed recorded payments."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"debug_id": "90957fca61718",
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR",
"rel": "information_link"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"debug_id": "string",
"links": []
}The date when the invoice was refunded, in Internet date format. For example, 2014-02-27.
^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$ppaas_date_notime_v210 <= length <= 10The amount to record as refunded. If you omit the amount, the total invoice paid amount is recorded as refunded.
The payment mode or method through which the invoicer can accept the payments.
^[\S\s]*$0 <= length <= 255"BANK_TRANSFER" | "CASH" | "CHECK" | "CREDIT_CARD" | "DEBIT_CARD" | "PAYPAL" | "WIRE_TRANSFER" | "OTHER"