PayPal integration guide

PayPalPayPal PayPal is a payment provider allowing customers to pay using payment methods saved to their PayPal account. This section is intended to help you implement PayPal based on your preferred integration workflow.

Services and compatibility

Payment method gateway namePayPal
Supported transaction types
Supported integration methods
Supported processing currencies
  • AUD
  • BRL
  • CAD
  • CHF
  • CZK
  • DKK
  • EUR
  • GBP
  • HKD
  • HUF
  • ILS
  • INR
  • JPY
  • MXN
  • MYR
  • NOK
  • NZD
  • PHP
  • PLN
  • RUB
  • SEK
  • SGD
  • THB
  • TWD
  • USD
Webhook event types
  • TRANSACTION_AUTHORIZED
  • TRANSACTION_CAPTURED
  • TRANSACTION_REFUNDED
  • TRANSACTION_SETTLED
  • TRANSACTION_VOIDED

Configuration

Apart from working with Integrations to add PayPal as a payment method, you do not need to do any other configuration steps.

Required fields

The following table shows the required and conditional fields for PayPal transactions in the Create APM one-time-use token request.

FieldRequired?Description
data.amountYThe transaction amount.
data.currencyYThe three-character ISO currency code for the transaction.
data.customer.orderNumberYThe order number.
data.customer.firstNameYThe customer's first name, as it appears on the card.
data.customer.lastNameYThe customer's last name, as it appears on the card.
data.customer.emailYThe customer's email address.
customerRedirectUrlConditionalThe URL to which the customer will be redirected after completing their payment. The customer will be sent here upon successful or failed payment. This URL must use the HTTPS protocol. Required if you intend to use Nexio’s redirectUrls with your own buttons.
data.paymentMethodOptionalThe identifier for the alternative payment method. Use this parameter when you want to only return the PayPal iframe button URL or the PayPal redirect URL (rather than data for all payment methods associated with the account).

The value to use is payPal.

PayPal (with Braintree) only: If you want to save a recurring token for a future merchant-initiated transaction, include the parameter processingOptions.saveRecurringToken in the body of your one-time-use token request and set it equal to true. In addition, if the amount to process on the Confirm/Place Order page will be more than the current amount, you must include this parameter so that you can send the payment request (for example, if adding tax and shipping costs to the amount).

Also for PayPal (with Braintree), if you want to use a 'continue button' payment flow on the shopping cart page where the consumer can sign into PayPal before the checkout page, then include processingOptions.doNotProcessPayment in the body of your one-time-use token request and set it equal to true.

Transaction types and implementation methods

Regardless of the implementation workflow you implement, consumers will be redirected to PayPal to complete their transactions.

Nexio supports the following transaction types for PayPal:

PayPal Payment Flow

The following show the general flows for a customer accessing a merchant site through payment using PayPal from the checkout page.

Customer adds item to cart and clicks Checkout button

  1. The customer adds one or more items to a shopping cart.

  2. The customer goes to that cart, the order amount displays, along with a Checkout button.

  3. Customer clicks the Checkout button and is redirected to a Checkout page with all available payment options (potentially including PayPal). Customer address information is collected (or retrieved) and is used to generate tax and shipping costs.

  4. If the customer clicks the PayPal button, they are asked to log in to PayPal and to select their payment options.

    If the customer clicks a different APM button, the process for that specific APM continues through to confirming the payment options.

    If the customer submits payment for card or ACH, the process continues based on the entered payment options.

  5. The customer is redirected to a Receipt page.

Testing data

For testing data, see PayPal Test Accounts.

Response handling

In the one-time-use token request, PayPal gets returned in the paymentMethod parameter as payPal.

Nexio responds with transaction results in one of the following ways, depending on your integration workflow:

  • Event messages: This applies to integrations that do not pass a customerRedirectUrl in the request.
  • Response fields in the URL: This applies to integrations that do provide a customerRedirectUrl in the request.

In addition to one of the above, if your merchant account is configured to receive webhooks, Nexio provides responses to the webhook URLs that have been registered. For further explanation of the webhook event types, see the webhook Event types table.

  • Webhook notification: For PayPal, these are the possible webhook event types:
    • TRANSACTION_AUTHORIZED
    • TRANSACTION_CAPTURED
    • TRANSACTION_REFUNDED
    • TRANSACTION_SETTLED

For information about how to run each of the integration workflows, see Transaction types above.

Status workflows

The status of a successful transaction with PayPal varies, depending on the options you choose.

When isAuthOnly is false, successful sale transactions will have the following statuses:

  • pending (called "authorized" when querying transactions and in Nexio Dashboard)
  • settled

When isAuthOnly is true, successful sale transactions will have the following statuses:

  • authOnlyPending
  • authOnly

Capture

Successful capture transactions will have the following status:

  • settled

Refund

Successful refund transactions will have the following status:

  • settled

Next steps

Now, you are ready to get started with running transactions:

If you have any additional questions or feedback, see Contact us.


Did this page help you?