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.
A resource representing a Payer that funds a payment
Payment Method
as paypal
Lets you specify a payment amount.
A transaction defines the contract of a payment - what is the payment for and who is fulfilling it.
The Payment creation API requires a list of
Transaction; add the created Transaction
to a List
Create a payment with the intent set to 'order'
Create the payment resource.
Use the approval_url
link provided by the returned object to approve the order payment.
Execute the order
Execute the order payment.
Get the information about the executed order from the returned payment object.
Once the order has been executed, an order ID is returned that can be used to do one of the following: this.AuthorizeOrder(); this.CaptureOrder(); this.VoidOrder(); this.RefundOrder();
For more information, please visit PayPal Developer REST API Reference.
Order Sample This sample code demonstrates how to create a new payment order. API used: POST /v1/payments/payment