Pass in a APIContext
object to authenticate
the call and to send a unique request id
(that ensures idempotency). The SDK generates
a request id if you do not pass one explicitly.
See Configuration.cs to know more about APIContext.
For demonstration purposes, we will create a new invoice for this sample.
Information about the merchant who is sending the invoice.
Email address of invoice recipient and optional billing information.
Note: PayPal currently only allows one recipient.
(Required) Email address of the invoice recipient.
List of items to be included in the invoice.
Note: 100 max per invoice.
Note to the payer. Maximum length is 4000 characters.
(Optional) Specifies the payment deadline for the invoice.
Note: Either
term_type
ordue_date
can be sent, but not both.
Shipping information for entities to whom items are being shipped.
Temporary work around for Invoicing API - the API is populating information in the invoice that it should not be since we didn't specify it originally.
Apply some changes to the invoice. For this sample, we will
change the term_type
to NET_45
indicating we want to change
when the payment is due from the original 30 days to 45 days.
For more information, please visit PayPal Developer REST API Reference.
Update an invoice
Updates an invoice by making the changes specified in the
Invoice
object.