Braintree (Paypal)

A step-by-step guide for setting up your Braintree payments integration in the Payrails portal.

📘

Who should use this guide

This guide is intended for merchants who:

  • Use Payrails as a payment orchestrator
  • Use Braintree for payments
  • Are approved to process raw card data

We use a server-to-server integration with Braintree, so your account must be enabled to process raw card data. If this isn’t enabled, payments won’t work in production. Please contact your Braintree account manager or support team to activate it.


Create and configure a Braintree integration in Payrails

  1. Log in to the Payrails portal.
  2. Go to SettingsIntegrations.
  3. Select Add instance to create a new integration configuration.
  4. Select the Workspaces where this integration should be available.

About workspaces
Workspaces determine where this integration can be used. They allow you to isolate provider setups by region or business line, or share a single configuration across multiple environments.


Step 1: Choose the integration type

  • Select Payment and continue to the next step.
A screenshot showing the integration type selection form.

Step 2: Choose the provider

  • Select Braintree and continue to the next step.
A screenshot showing the Braintree integration selected.

Step 3: Configure your Braintree integration

📋

What you’ll need from Braintree

Before you begin, make sure you have access to:

  • Merchant account ID
  • Acquirer Merchant IDs / BINs (if applicable)
  • API credentials (Public Key and Private Key)

Log in to your Braintree Control Panel to complete this step.


Integration instance name

An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for each provider based on region, currency, or business needs. Choose a clear, consistent name, as it is used in routing.

In Payrails

  • Enter a clear and descriptive Instance name.
A screenshot showing the Payrails integration instance name field.

Account details

In Braintree

  1. Log in to the Braintree Control Panel.
  2. Navigate to Merchant ConfigurationIntegrations.
  3. Select the Braintree integration you want to manage and choose Manage Account.
  4. Define the Payrails account name associated with the Provider ID.
A screenshot showing the Braintree account fields.
ℹ️

Acquirer Merchant IDs and BINs

Acquirer Merchant IDs (sometimes referred to as BINs or SE numbers) are not always available directly in the Braintree dashboard.

For example:

  • American Express: The Acquirer Merchant ID is provided directly by American Express or your acquiring bank during onboarding.

Use the values provided by your acquirer when configuring Braintree in Payrails.


API credentials

🔒

API credentials are environment-specific. Use separate credentials for test and production.

In Braintree

  1. Go to SettingsAPI.
  2. Generate or copy the Public Key and Private Key.

In Payrails

  • Enter the Public Key and Private Key in the corresponding fields.
  • Select the payment methods that should be enabled for this account.

Webhooks

🔔

Webhooks allow Payrails to receive asynchronous payment status updates from Braintree.

Configure webhooks in Braintree

  1. In the Braintree Control Panel, navigate to Webhooks.

  2. Add a new webhook endpoint using the Payrails notification URL.

    • Staging
      https://<your-environment>-api-pub.staging.payrails.io/public/notification/provider/Braintree/accountName/<provider-account-name>
    • Production
      https://api-pub.<your-environment>.payrails.io/public/notification/provider/Braintree/accountName/<provider-account-name>
  3. Select all required event types.

  4. Save and activate the webhook.

Configure notifications in Payrails

  1. Navigate to Notifications.
A screenshot showing the Payrails settings menu.
  1. Select New URL.
A screenshot showing the Payrails notifications.
  1. Select the relevant workspace.
  2. Paste the webhook URL.
  3. Generate an HMAC key.
  4. Select Create.
A screenshot showing the new notification URL creation form.

Test webhooks

  • Use Braintree’s webhook testing tools to send test events.
  • Confirm events are received and processed successfully in Payrails.

Payment methods

In Payrails

  • Select the Braintree payment methods you want to enable for this integration.
A screenshot showing the Braintree payment methods.

Enable the integration

In Payrails

  • Select Save account to enable the integration.

The Enabled status confirms that the Braintree integration is active and available for routing.

A screenshot showing the enabled Braintree integration.

Your Braintree integration is now ready to process payments in the selected environment.


Next steps

  1. Run a test payment using a Braintree test card.
  2. Verify that:
    • The payment appears in Braintree.
    • The payment status updates correctly in Payrails.
  3. Once verified in test mode, repeat the setup in live mode.

→ Continue to: Test a payment