> For the complete documentation index, see [llms.txt](https://docs.flycode.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flycode.com/docs/integrations/how-to-connect-flycode-to-your-braintree-paypal-account.md).

# Braintree and PayPal integration guide: connect FlyCode

Connect FlyCode to Braintree or PayPal to recover failed subscription payments: restricted role, API user, merchant account, go-live checklist, troubleshooting.

{% hint style="info" %}
**TL;DR:** In the Braintree Control Panel, create a FlyCode role with only the permissions FlyCode needs, add a user with API access assigned to that role for the merchant account you want covered, and share the credentials securely with FlyCode. FlyCode then recovers failed subscription payments on Braintree and PayPal with machine-learning retry timing and coordinated messaging. No code changes.
{% endhint %}

## Who this is for

B2C and B2B SaaS and subscription businesses processing recurring payments through Braintree (including PayPal via Braintree) who want to recover more failed payments and reduce involuntary churn without changing their billing integration.

## Prerequisites

* Braintree Control Panel access with permission to manage roles and users (Account Admin).
* The merchant account ID(s) you want FlyCode to cover.
* A FlyCode account. [Get started](https://www.flycode.com/get-started) if you do not have one; you will receive the FlyCode email address to use for the API user.

## Setup

{% stepper %}
{% step %}

### Create a FlyCode role

In the Braintree Control Panel go to Settings, Team, Roles, and create a new role named FlyCode. Grant only the permissions shown below (read access to customers, payment methods, subscriptions and transactions, and the ability to create transactions and update subscriptions). Do not grant settlement, refund or account settings permissions.

<figure><img src="https://857825088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedoXR9BFShbgporwvi7n%2Fuploads%2FYvPU28U7LeelMbRY0IPk%2FScreenshot%202024-06-18%20at%2012.46.49%20(1).png?alt=media&#x26;token=74d431a2-7269-4ff0-adac-442c1385a615" alt=""><figcaption><p>Permissions for the FlyCode role</p></figcaption></figure>
{% endstep %}

{% step %}

### Add a FlyCode API user

Go to Settings, Team, Users, Add new user. Enter the FlyCode email address you received during sign-up, then:

* Enable **API Access**.
* Under **Roles**, select the FlyCode role you created in Step 1.
* Under **Merchant account**, select the account(s) FlyCode should cover.

Click Create User. Braintree generates API credentials for the user.
{% endstep %}

{% step %}

### Share credentials and set a launch date

Share the API credentials with FlyCode through the secure channel provided during onboarding (never by plain email). FlyCode connects, loads existing failed transactions and subscriptions in a past-due state, and agrees a launch date with you. If Braintree or your billing system sends failed-payment emails, decide whether FlyCode or your system owns messaging.
{% endstep %}
{% endstepper %}

## How FlyCode behaves on Braintree and PayPal

* Retries failed subscription transactions with model-driven timing within card network limits.
* Does not retry hard declines; falls back to another stored payment method where available, otherwise triggers outreach.
* Records every retry as a Braintree transaction visible in the Control Panel and reflected in your existing reporting.
* Can be scoped to specific merchant accounts.

## Go-live checklist

* [ ] FlyCode role created with restricted permissions
* [ ] FlyCode API user created with API access, FlyCode role and correct merchant account
* [ ] Credentials shared securely
* [ ] Messaging owner decided
* [ ] Launch date agreed

## Troubleshooting

**FlyCode reports it cannot read subscriptions or transactions.** The role is missing a read permission, or the user is not assigned to the right merchant account. Compare against the screenshot in Step 1.

**Retries are not appearing.** API access is not enabled on the user, or the launch date has not been reached.

**Duplicate customer emails.** Both your billing system and FlyCode are messaging on failed payments. Choose one owner.

## FAQ

**Does FlyCode need full admin access?** No. The restricted role limits FlyCode to reading billing objects and creating retry transactions.

**Does this cover PayPal wallet payments?** Yes, for PayPal payment methods vaulted in Braintree. Retry behaviour follows PayPal's rules for reference transactions.

**Can I revoke access?** Yes, at any time by deleting or disabling the FlyCode user in Braintree.

## Related

* [Supported payment and subscription platforms](https://docs.flycode.com/docs/integrations/supported-payment-and-subscription-platforms)
* [What is FlyCode?](https://docs.flycode.com/docs/introduction/what-is-flycode)
* [Integration Considerations](https://help.flycode.com/understanding-involuntary-churn/integration-considerations) in the Help Center


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flycode.com/docs/integrations/how-to-connect-flycode-to-your-braintree-paypal-account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
