Payments

PayPal

Overview

PayPal is one of the most widely-used payment processors worldwide, supporting credit cards, debit cards, and PayPal account payments. Integrating PayPal into your Emergent app enables you to accept payments from customers in over 200 markets and 25+ currencies.

This guide walks you through setting up PayPal for your Emergent project, from creating a developer account to processing your first transaction.

Note

PayPal offers both Standard (redirect-based) and Advanced (in-context checkout) integrations. Emergent supports both patterns - describe your preferred checkout flow in chat and the platform will set up the appropriate implementation.

Before you begin

You'll need:

  • A PayPal Business account (or a PayPal Developer sandbox account for testing)
  • Your app published or running on your cloud preview ({slug}.preview.emergentagent.com) or published app in Emergent
  • Basic understanding of your app's payment flow

Tip

If you don't have a PayPal Business account yet, you can start with a free Developer account at developer.paypal.com - it includes sandbox credentials for testing without processing real money.

Get your PayPal API credentials

Part 1: PayPal Sandbox Setup (Testing)

1

Describe your payment flow

Tell Emergent what you want to build with PayPal and where you want payments to happen in your app.

For example:

"Add PayPal checkout to the pricing page and allow users to complete payments."

The agent will use this information to set up the appropriate PayPal checkout flow.

2

Log in to PayPal Developer

Go to PayPal Developer and log in with your PayPal account.

3

Open Apps & Credentials

In the PayPal Developer Dashboard, go to Apps & Credentials and select the Sandbox toggle. Sandbox credentials are used to test payments without processing real transactions.

4

Open or create an app

Open the Default App, or click Create App and enter an app name, such as

MiniStore
.

PayPal will create an app that you can use to connect your application to the PayPal Sandbox.

5

Copy your credentials

Open the app and copy the Client ID and Secret.

These credentials allow your application to authenticate with PayPal's API in the Sandbox environment.

6

Connect to Emergent

When Emergent asks for your PayPal credentials, provide the Client ID and Secret.

The agent will securely configure the credentials and wire the PayPal integration into your app.

7

Test the payment flow

Once the integration is implemented, test the checkout flow using the PayPal Sandbox.

Confirm that users can start checkout, complete the payment, and that your application correctly handles the payment result.

Part 2: Go Live (Real Payments)

1

Create or verify a PayPal Business account

Go to PayPal Business and create or use your Business account.

Complete any required verification before accepting real payments.

2

Open Apps & Credentials

Go to PayPal Developer → Apps & Credentials and switch from Sandbox to Live.

The Live environment uses separate credentials from your Sandbox application.

3

Open or create your Live app

Open your existing Live app, or click Create App if you need to create one.

4

Copy Live credentials

Open the Live app and copy the Live Client ID and Live Secret.

These credentials will be used for processing real PayPal payments.

5

Update Emergent

After the first publish, replace the Sandbox configuration with the Live configuration in the Emergent Secret Panel:

  • Client ID → Live Client ID
  • Secret → Live Secret

Then re-publish the app.

6

Verify the live payment flow

After publish, complete a real payment to confirm that the Live PayPal integration is working correctly.

Was this page helpful?

Related pages