Skip to main content
POST
/
v2
/
invoicing
/
invoices
/
{invoice_id}
/
payments
Record payment for invoice
curl --request POST \
  --url https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "method": "BANK_TRANSFER"
}'
{
  "payment_id": "<string>"
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Path Parameters

invoice_id
string
required

The ID of the draft invoice to delete.

Maximum length: 2147483647

Body

application/json

The details of the payment to record against the invoice.

The payment details of the invoice. Includes payment type, method, date, discount, and transaction type.

method
enum<string>
required

The payment mode or method through which the invoicer can accept the payment.

Available options:
BANK_TRANSFER,
CASH,
CHECK,
CREDIT_CARD,
DEBIT_CARD,
PAYPAL,
WIRE_TRANSFER,
OTHER
type
enum<string>

The payment type in an invoicing flow which can be PayPal or an external cash or check payment.

Available options:
PAYPAL,
EXTERNAL
payment_id
string

The ID for a PayPal payment transaction. Required for the PAYPAL payment type.

Maximum length: 22
payment_date
string<ppaas_date_notime_v2>

The date when the invoice was paid, in Internet date and time format. For example, yyyy-MM-dd z.

Required string length: 10
payment_date_time
string<ppaas_date_time_v3>

The date-time when the invoice was paid. For example, yyyy-MM-dd T HH: mm: ss z. The time zone will be UTC.

Required string length: 20 - 64
note
string

A note associated with an external cash or check payment.

Maximum length: 2000
amount
object

The payment amount to record against the invoice. If you omit this parameter, the total invoice amount is marked as paid. This amount cannot exceed the amount due.

shipping_info
object

The recipient's shipping information. Includes the user's contact information, which includes name and address. The business name of the party.

Response

A successful request returns the HTTP 200 Created status code and a reference to the recorded payment.

The reference to the payment detail.

payment_id
string

The ID for the invoice payment.

Required string length: 1 - 22
I