Search Overlay

About PayPal

PayPal as an APM redirect payment method allows your customers to complete their payment using their PayPal wallet/account, which will redirect them to the PayPal site. This offers a convenient and streamlined payment experience for customers, leading to increased customer satisfaction and loyalty. The integration will also allow you to manage and reconcile the PayPal transactions from within your Paysafe account reducing the need for multiple payment platforms, leading to cost savings and improved operational efficiency.

The Paysafe Payments API supports PayPal as a Payment Instrument. You can process PayPal payments using the Payments API.

Setup Requirements

To access this account service, you must be first onboarded with PayPalPlease visit https://developer.paypal.com 

For Paysafe to create an account in the sandbox and production environment, we need the following details: 

  • Your Client Id 
  • Your Secret key
  • PayPal webhook Id 
  • PayPal Account Id
  • Force Intent Sale : If "true" makes an immediate payment.

Transaction Types

We support the following transaction types:

  • Payments
  • Withdrawals

Supported Currency

Typical Scenarios

PayPal Payment

When you want to process a PayPal payment request, you would do the following:

1. Create a payment handle with the following parameter settings:

  • transactionType: PAYMENT
  • paymentType: PAYPAL

2. Pass the following parameters in the PAYPAL object:

Parameter Description Mandatory/Optional
consumerId The unique PayPal account ID of the consumer or payer. Optional
recipientDescription The note to the recipient of the funds in this transaction. Optional
language This is for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. Eg: US Optional
shippingPreference

Default: "GET_FROM_FILE". The shipping preference.

Enum: Description
NO_SHIPPING Redacts the shipping address from the PayPal pages. Recommended for digital goods.
GET_FROM_FILE Uses the customer-selected shipping address on PayPal pages.
SET_PROVIDED_ADDRESS If available, uses the merchant-provided shipping address, which the customer cannot change on the PayPal pages. If the merchant does not provide an address, the customer can enter the address on PayPal pages.
Optional
consumerMessage You can send a note to payer for payment Optional
orderDescription The purchase description. Optional
recipientType Type of payout recipient. The only supported value is 'PAYPAL_ID'. The encrypted PayPal account number. Optional
userAction

The user action presents the customer with either the Continue or Complete purchase checkout flow. You can Opt for one of the flow by passing necessary detail in userAction in PayPal object in the request. :-

1. Pay Now :- If you pass "userAction":"COMPLETE_PURCHASE" in the request, the flow redirects the customer to the PayPal payment page and displays a Complete purchase button. When the customer clicks Complete purchase, it calls Express Checkout Payment to complete the payment without additional interaction from the customer. Choose this flow when you know the final payment amount and do not want to display review screen.

2. Continue to review screen :- If you pass "userAction":"CONTINUE” in the request, this is the default flow which redirects the customer to the PayPal payment page and displays the Continue button, thereafter you need to display the next screen as the review screen. Post this customer payment is completed.

Note : If you do not pass useraction in PayPal object in request parameters, then by default, the flow configured is “Continue to review”

Optional

3. Since the customer has to complete payment authentication by providing PayPal details, Paysafe returns a response with the following:

  • The action parameter is set to REDIRECT
  • A payment redirect link points to the PayPal redirect URL

4. Redirect the customer to the PayPal redirect URL so they can provide the email address and password details to complete the money transfer.

5. Upon successful customer authentication, you get notified at the URL specified in the on_completed parameter included with their request.

6. At this point, the status of the Payment Handle becomes PAYABLE.

7. Use the paymentHandleToken returned in the response to process the Payment request.

Once the Payment request is successfully completed, the funds are immediately transferred to your account

Auto settlement functionality

If you did not make a Payments API call and opted for auto-settlement, then you can process payments and settlements:  

  • Auto-settlement: After 15 minutes, the system will automatically trigger the Payments API call and finish the payments and settlements. The payment handle also gets expired. 

To opt for this functionality, email Integrations Support Team at integrations@paysafe.com.

PayPal Payments Flow

Paypal Withdrawal

When you want to process a Paypal withdrawal request, you would do the following:

1. Create a Payment Handle with the following parameter settings:

  • transactionType: STANDALONE_CREDIT
  • paymentType: PAYPAL

2. Pass the following parameters in the PAYPAL object:

Parameter Description Mandatory/Optional
consumerId The unique PayPal account ID of the consumer or payer. This is mandatory if you need to initiate withdrawals Mandatory
recipientDescription The note to the recipient of the funds in this transaction. Optional
language This is for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. Eg: US Optional 
shippingPreference Default: "GET_FROM_FILE". The shipping preference.
Enum: Description
NO_SHIPPING Redacts the shipping address from the PayPal pages. Recommended for digital goods.
GET_FROM_FILE Uses the customer-selected shipping address on PayPal pages.
SET_PROVIDED_ADDRESS If available, uses the merchant-provided shipping address, which the customer cannot change on the PayPal pages. If the merchant does not provide an address, the customer can enter the address on PayPal pages.
Optional
consumerMessage You can send a note to payer for payouts Optional
orderDescription The payouts description. Optional
recipientType Type of payout recipient. The only supported value is 'PAYPAL_ID'. The encrypted PayPal account number. Mandatory

3. This Payment Handle should immediately have the status of PAYABLE

4. Use the paymentHandleToken returned in the response to process the Withdrawal request.

 

The withdrawal request will be processed in batch jobs and initial status will be "Processing".

Once the withdrawal request is successfully completed, the funds are immediately transferred to the customer's account.

PayPal Withdrawal Flow