> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Implementing the PayPal Express Checkout Transaction Flow

The PayPal transaction flow below includes actions required by the customer and the merchant. This transaction flow applies to one-time transactions and recurring billings (subscriptions.)

1. On your merchant Purchase page, your customer selects a product to purchase, selects PayPal as the payment method (one-time or recurring), enters the PayPal account information (email address), and clicks **Buy Now**.

   1. Make a Vindicia Subscribe SOAP API call (`Transaction.auth`, `Transaction.authCapture` or `AutoBill.update`) to pass the collected purchase information to Vindicia Subscribe.

   2. Vindicia Subscribe creates a Transaction or Subscription with status `New`.

   3. Vindicia Subscribe uses the PayPal API to pass the Transaction data to PayPal with `SetExpressCheckout`.

   4. PayPal returns a Token, a redirect URL, and a referenceID (if reference transactions are enabled) for the session.

      **Note:**

      This Token expires a specified time after the customer’s first action on the PayPal site. For more information, see the [PayPal Developer documentation](https://developer.paypal.com/).

   5. Vindicia Subscribe sets the Transaction status to `AuthorizationPending` (or failed); or sets Subscription status to `PendingCustomerAction`.

      **Note:**

      `AuthorizationPending` and `PendingCustomerAction` indicate that a PayPal Transaction is in process and awaiting further customer action on the PayPal site. The Transaction or Subscription maintains this status until the customer completes the payment process.

   6. Vindicia Subscribe returns the PayPal Token and redirect URL back to you.

2. From your merchant Checkout page, your customer reviews their order and clicks **Checkout**.

   1. Use the PayPal redirect URL to redirect your customer to the PayPal site, with the PayPal Token.

   2. PayPal asks the customer to enter their username and password. When the customer enters the information and clicks **Submit**, PayPal authenticates the user.

   3. PayPal asks the user to select their (PayPal) payment method and click **Continue**.

   4. PayPal redirects your customer to your merchant success or fail page (the `returnUrl` or `cancelUrl` data member of the Vindicia Subscribe PayPal object), and passes the PayPal (transaction) Token back to you.

3. From your merchant order Confirmation page (success page), your customer reviews the order and clicks **OK**.

   **Note:**

   If the initial SOAP API call in step 1a was `Transaction.auth` (rather than `Transaction.authCapture`), call `Transaction.capture` after the customer clicks **OK** to queue the transaction for batch capture at PayPal.

   1. Make a Vindicia Subscribe SOAP API call to finalize the PayPal transaction (`Transaction.finalizePayPalAuth` or `AutoBill.finalizePayPalAuth`.)

      **Note:** If you do not call `finalizePayPalAuth`, Vindicia Subscribe times out after 3 hours and the Transaction or Subscription purchase is not completed.

   2. Vindicia Subscribe receives the Transaction details from the call.

   3. Vindicia Subscribe sets the Transaction or Subscription status to `Authorized` or `Failed`.

   4. Vindicia Subscribe uses the PayPal API to pass the authorization status and the PayPal Token back to PayPal, using `ExpressCheckout` with authorization.

**Parent topic:**[The Paypal Express Checkout Transaction Flow](../topics/r_paypalTransactionFlow)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.