On this page
No Headings
Last updated: June 26, 2026
POST /v2/customer/partner-referrals API:
INVOICE_READ_WRITE and ACCESS_MERCHANT_INFORMATION permissions in the features object.EXPRESS_CHECKOUTprimary_email field of the GET /v2/customer/partners/{partner_id}/merchant-integrations/{merchant_id} API response. You'll use this in the Invoicing APIs.Invoicer API object.To draft an invoice, copy the following code and modify it as needed.
API endpoint used: Create draft invoice
curl -v -X POST https://api-m.sandbox.paypal.com/v2/invoicing/invoices \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
-d '{
"detail": {
"invoice_number": "123",
"reference": "deal-ref",
"invoice_date": "2028-11-22",
"currency_code": "USD",
"note": "Thank you for your business.",
"term": "No refunds after 30 days.",
"memo": "This is a long contract",
"payment_term": {
"term_type": "DUE_ON_DATE_SPECIFIED",
"due_date": "2028-11-22"
}
},
"invoicer": {
"name": {
"given_name": "David",
"surname": "Larusso"
},
"address": {
"address_line_1": "1234 First Street",
"address_line_2": "337673 Hillside Court",
"admin_area_2": "Anytown",
"admin_area_1": "CA",
"postal_code": "98765",
"country_code": "US"
},
"email_address": "merchant@example.com",
"phones": [
{
"country_code": "001",
"national_number": "4085551234",
"phone_type": "MOBILE"
}
],
"website": "https://example.com",
"tax_id": "XX-XXXXXXX",
"logo_url": "https://example.com/logo.PNG",
"additional_notes": "example note"
},
"primary_recipients": [
{
"billing_info": {
"name": {
"given_name": "Stephanie",
"surname": "Meyers"
},
"address": {
"address_line_1": "1234 Main Street",
"admin_area_2": "Anytown",
"admin_area_1": "CA",
"postal_code": "98765",
"country_code": "US"
},
"email_address": "payer@example.com",
"phones": [
{
"country_code": "001",
"national_number": "4884551234",
"phone_type": "HOME"
}
],
"additional_info_value": "add-info"
},
"shipping_info": {
"name": {
"given_name": "Stephanie",
"surname": "Meyers"
},
"address": {
"address_line_1": "1234 Main Street",
"admin_area_2": "Anytown",
"admin_area_1": "CA",
"postal_code": "98765",
"country_code": "US"
}
}
}
],
"items": [
{
"name": "Yoga mat",
"description": "Elastic mat to practice yoga.",
"quantity": "1",
"unit_amount": {
"currency_code": "USD",
"value": "50.00"
},
"tax": {
"name": "Sales Tax",
"percent": "7.25"
},
"discount": {
"percent": "5"
},
"unit_of_measure": "QUANTITY"
},
{
"name": "Yoga t-shirt",
"quantity": "1",
"unit_amount": {
"currency_code": "USD",
"value": "10.00"
},
"tax": {
"name": "Sales Tax",
"percent": "7.25"
},
"discount": {
"amount": {
"currency_code": "USD",
"value": "5.00"
}
},
"unit_of_measure": "QUANTITY"
}
],
"configuration": {
"partial_payment": {
"allow_partial_payment": true,
"minimum_amount_due": {
"currency_code": "USD",
"value": "20.00"
}
},
"allow_tip": true,
"tax_calculated_after_discount": true,
"tax_inclusive": false,
"template_id": ""
},
"amount": {
"breakdown": {
"custom": {
"label": "Packing Charges",
"amount": {
"currency_code": "USD",
"value": "10.00"
}
},
"shipping": {
"amount": {
"currency_code": "USD",
"value": "10.00"
},
"tax": {
"name": "Sales Tax",
"percent": "7.25"
}
},
"discount": {
"invoice_discount": {
"percent": "5"
}
}
}
}
}'This sample request demonstrates how to create an invoice:
After you copy the code in the sample request, modify the following:
ACCESS-TOKEN with your access token.BN-CODE with your PayPal Attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.AUTH-ASSERTION-JWT with your PayPal-Auth-Assertion token.merchant@example.com in invoicer: email_address to the primary_email of the merchant retrieved from GET /v1/customer/partners/{partner_id}/merchant-integrations/{merchant_id} API.invoice_date and due_date to reflect the current or a future date in the format YYYY-MM-DD. If you set a term_type, ensure the due_date falls within the specified term.A successful request returns the following:
Draft. You can view this status by logging into your sandbox business account.201 Created.INV2-W44B-KRGF-JM6R-26VU.You can use this ID to perform other REST API actions, such as editing or deleting the invoice or sending payment reminders.
To send the invoice, copy the following code and modify it as needed.
API endpoint used: Send invoice
curl -v -X POST https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{INVOICE-ID}/send \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
-d '{
"send_to_invoicer": true
}'After you copy the code in the sample request, modify the following:
ACCESS-TOKEN with your access token.BN-CODE with your PayPal Attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.AUTH-ASSERTION-JWT with your PayPal-Auth-Assertion token.INVOICE-ID to the invoice ID returned when you created the invoice.A successful request returns the following:
200 OK.Unpaid (Sent).Tip: PayPal automatically records payments made through the invoice's Pay Now button. If you accept payments offline, such as by check or wire transfer, you will need to manually record the payment.