C# Class PayPal.Api.Payment

Lets you create, process and manage payments.

See PayPal Developer documentation for more information.

Inheritance: PayPalRelationalObject
Show file Open project: paypal/PayPal-NET-SDK Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Create ( APIContext apiContext ) : Payment

Creates and processes a payment. In the JSON request body, include a `payment` object with the intent, payer, and transactions. For PayPal payments, include redirect URLs in the `payment` object.

Create ( APIContext apiContext, Payment payment ) : Payment

Creates (and processes) a new Payment Resource.

Execute ( APIContext apiContext, PaymentExecution paymentExecution ) : Payment

Executes, or completes, a PayPal payment that the payer has approved. You can optionally update selective payment information when you execute a payment.

Execute ( APIContext apiContext, string paymentId, PaymentExecution paymentExecution ) : Payment

Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.

Get ( APIContext apiContext, string paymentId ) : Payment

Shows details for a payment, by ID.

List ( APIContext apiContext, int count = null, string startId = "", int startIndex = null, string startTime = "", string endTime = "", string startDate = "", string endDate = "", string payeeEmail = "", string payeeId = "", string sortBy = "", string sortOrder = "" ) : PaymentHistory

List payments that were made to the merchant who issues the request. Payments can be in any state.

Update ( APIContext apiContext, PatchRequest patchRequest ) : void

Partially updates a payment, by ID. You can update the amount, shipping address, invoice ID, and custom data. You cannot use patch after execute has been called.

Update ( APIContext apiContext, string paymentId, PatchRequest patchRequest ) : void

Partially update the Payment resource for the given identifier

Method Details

Create() public method

Creates and processes a payment. In the JSON request body, include a `payment` object with the intent, payer, and transactions. For PayPal payments, include redirect URLs in the `payment` object.
public Create ( APIContext apiContext ) : Payment
apiContext APIContext APIContext used for the API call.
return Payment

Create() public static method

Creates (and processes) a new Payment Resource.
public static Create ( APIContext apiContext, Payment payment ) : Payment
apiContext APIContext APIContext used for the API call.
payment Payment Payment object to be used in creating the PayPal resource.
return Payment

Execute() public method

Executes, or completes, a PayPal payment that the payer has approved. You can optionally update selective payment information when you execute a payment.
public Execute ( APIContext apiContext, PaymentExecution paymentExecution ) : Payment
apiContext APIContext APIContext used for the API call.
paymentExecution PaymentExecution PaymentExecution
return Payment

Execute() public static method

Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.
public static Execute ( APIContext apiContext, string paymentId, PaymentExecution paymentExecution ) : Payment
apiContext APIContext APIContext used for the API call.
paymentId string ID of the payment to execute.
paymentExecution PaymentExecution PaymentExecution
return Payment

Get() public static method

Shows details for a payment, by ID.
public static Get ( APIContext apiContext, string paymentId ) : Payment
apiContext APIContext APIContext used for the API call.
paymentId string The ID of the payment for which to show details.
return Payment

List() public static method

List payments that were made to the merchant who issues the request. Payments can be in any state.
public static List ( APIContext apiContext, int count = null, string startId = "", int startIndex = null, string startTime = "", string endTime = "", string startDate = "", string endDate = "", string payeeEmail = "", string payeeId = "", string sortBy = "", string sortOrder = "" ) : PaymentHistory
apiContext APIContext APIContext used for the API call.
count int The number of items to list in the response.
startId string The ID of the starting resource in the response. When results are paged, you can use the `next_id` value as the `start_id` to continue with the next set of results.
startIndex int The start index of the resources to return. Typically used to jump to a specific position in the resource history based on its cart. Example for starting at the second item in a list of results: `?start_index=2`
startTime string The date and time when the resource was created. Indicates the start of a range of results. Example: `start_time=2013-03-06T11:00:00Z`
endTime string The date and time when the resource was created. Indicates the end of a range of results.
startDate string Resource creation date that indicates the start of results.
endDate string Resource creation date that indicates the end of a range of results.
payeeEmail string Payee identifier (email) to filter the search results in list operations.
payeeId string Payee identifier (merchant id) assigned by PayPal to filter the search results in list operations.
sortBy string Field name that determines sort order of results.
sortOrder string Specifies if order of results is ascending or descending.
return PaymentHistory

Update() public method

Partially updates a payment, by ID. You can update the amount, shipping address, invoice ID, and custom data. You cannot use patch after execute has been called.
public Update ( APIContext apiContext, PatchRequest patchRequest ) : void
apiContext APIContext APIContext used for the API call.
patchRequest PatchRequest PatchRequest
return void

Update() public static method

Partially update the Payment resource for the given identifier
public static Update ( APIContext apiContext, string paymentId, PatchRequest patchRequest ) : void
apiContext APIContext APIContext used for the API call.
paymentId string ID of the payment to update.
patchRequest PatchRequest PatchRequest
return void