---
title: Integrate Payment Gateways
url: https://docs.maxio.com/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways
applies_to: Advanced Billing
updated: 2026-10-29
---

# Integrate Payment Gateways

Connect one or more payment gateways to Advanced Billing so you can process real transactions. Work through the four steps below to add a gateway, authenticate it, decide which payment types route to it, and confirm it works before your Customers reach it.

---

## Before you start

Feature
:   <a href="https://docs.maxio.com/payments/additional-gateways/getting-started-with-gateways/gateway-overview" target="_blank" rel="noopener noreferrer">Understand Payment Gateways</a>

You Need
:   A payment gateway account from <a href="https://www.maxio.com/payment-gateways" target="_blank" rel="noopener noreferrer">the supported list</a>.

Code
:   No

Difficulty
:   ◉◎◎◎◎

---

## Connect a payment gateway

Go to **Config > Payment Gateways** to start. You can configure one gateway at a time or several at once, and the setup wizard walks through the same three stages either way: **Add Gateways**, **Connect Gateways**, then **Route Payments**.

### Add a payment gateway

The first stage of the wizard is choosing which gateways to set up. You can select several at once and configure them together.

**To add a payment gateway**

1. In the top right corner of the Payment Gateways page, click **Add Gateway**.

   ![a Payment Gateway Settings page with an arrow to Add Gateway](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181572528269_add-gateway.png)
2. Click each gateway you want to add. A blue checkmark appears on the ones you select. When you finish selecting, click **Continue** in the bottom right corner.

   ![the gateway picker showing the available providers and which payment methods each accepts](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181559050765_select-gateway2.png)

### Authenticate with your credentials

This stage is where you enter your real gateway credentials.

**To authenticate a gateway**

1. For each gateway you selected, click **Connect**. Each gateway has its own credential fields, and the wizard prompts you for the ones that gateway needs.

   ![the Connect Gateways step, with an arrow to the connect control beside the chosen provider](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181541335693_connect-gateway3.png)
2. Enter your gateway credentials. If your gateway uses a single sign-on connector, you don't need credentials, so follow that gateway's prompts instead. For help locating your credentials, see <a href="https://docs.maxio.com/payments/additional-gateways/getting-started-with-gateways/gateway-overview" target="_blank" rel="noopener noreferrer">Understand Payment Gateways</a>.
3. Set your gateway handle. Name it after the gateway itself, so the Braintree gateway gets the handle `braintree`, all lowercase. If you use more than one instance of the same gateway, number them: `braintree-1`, `braintree-2`.

   > **Important:** If you build your own payment forms with Maxio.js, the handle determines which gateway a tokenized payment method is created against, so choose it deliberately before you write against it.

### Route payment types

Routing sets the default gateway for each payment type, such as sending all credit card payments to one specific gateway.

**To route payment types**

1. For each gateway you selected, choose a routing option. Routing controls which Payment Profiles go to which gateway.

   ![the Route Payments step, mapping each payment type to a default gateway](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181558539405_map-gateway4.png)
2. Review the results and confirm each gateway shows the payment types you expect. To change anything, see [Edit a gateway connection](https://docs.maxio.com/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways#edit-a-gateway-connection).

   ![Payment Gateway Settings listing Braintree and Stripe as connected gateways, each row showing its accepted payment types and what it is the default gateway for](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181512054925_review-gateway5.png)

### Test the connection

Interact with every connected gateway before your Customers do. Connection errors are common, most often from incorrect credentials, and testing is how you catch them first.

*Test Mode*

If your Site is in Test Mode, use the test cards published by each gateway. See [Gateway test cards](https://docs.maxio.com/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways#gateway-test-cards) below.

*Live Mode*

Use a real payment method and create a real subscription. Create a small product for $1 to test with, since most gateways require a minimum between $0.50 and $1.00, and check whether the payment succeeds. If it fails, Advanced Billing displays the error message returned by the payment gateway. If that message isn't clear, search for it verbatim in quotes, or contact [Maxio Support](mailto:support@maxio.com).

---

## Optional configuration

None of the following is required to process payments. Add them where your risk or compliance requirements call for it.

### Edit a gateway connection

Change a gateway's payment types, credentials, or handle after setup, or disconnect it entirely.

**To edit a gateway connection**

1. Click the edit arrow beside the gateway, then click **Gateway Settings**.

   ![a connected gateway row with an arrow to its settings control](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181521238285_edit-gateway6.png)
2. Change what you need, then save. You can edit Payment Types, Gateway Credentials, and Gateway Handle, edit the Email Address for single sign-on connections only, or disconnect the gateway entirely.

   ![A gateway's settings, with per-payment-type toggles for Credit Card, Pay Pal and Apple Pay above the gateway credentials and gateway handle sections](https://docs.maxio.com/content-images/getting-started/quick-start-guides/integrations-workflows/integrate-payment-gateways/24181541656205_edit-gateway7.png)

### Require CVV for credit cards

Go to **Config > Settings > Fields** and select the **CVV Required** checkbox. See <a href="https://docs.maxio.com/configuration/advanced-billing/settings/fields#cvv-required" target="_blank" rel="noopener noreferrer">CVV Required</a>.

### Configure AVS

Configure Address Verification Service at the gateway level rather than in Advanced Billing. On each payment attempt, Advanced Billing passes the address information to the gateway, the gateway performs the AVS check, and it returns a response to Advanced Billing.

---

## Gateway test cards

Use these values only against a gateway's sandbox environment, never a live one. Each gateway publishes its own test cards, so use the linked reference for the full set.

*Test card values by gateway*

| Gateway | Resource | Common examples |
| :--- | :--- | :--- |
| Stripe | <a href="https://stripe.com/docs/testing" target="_blank" rel="noopener noreferrer">Stripe test cards</a> | <ul><li><strong>Success</strong> - <code>4242424242424242</code></li><li><strong>Decline</strong> - <code>4000000000000002</code></li></ul> |
| Braintree | <a href="https://developer.paypal.com/braintree/docs/guides/credit-cards/testing-go-live/ruby#valid-card-numbers" target="_blank" rel="noopener noreferrer">Braintree test cards</a> | <ul><li><strong>Success</strong> - <code>4111111111111111</code></li><li><strong>Decline</strong> - <code>4000111111111115</code></li></ul> |
| Auth.net | <a href="https://developer.authorize.net/hello_world/testing_guide.html" target="_blank" rel="noopener noreferrer">Auth.net test cards</a> | <ul><li><strong>Success</strong> - <code>4111111111111111</code></li><li><strong>Decline</strong> - set the zip code to <code>46282</code></li></ul> |
| Cybersource | <a href="https://developer.cybersource.com/hello-world/testing-guide-v1.html" target="_blank" rel="noopener noreferrer">Cybersource test cards</a> | <ul><li><strong>Success</strong> - <code>4111111111111111</code></li></ul> |
| First Data | Payeezy is discontinued, and no test-card documentation is published. | <ul><li><strong>Success</strong> - <code>4704550000000005</code>, exp <code>0000005</code>, cvv <code>123</code></li><li><strong>Decline</strong> - the same values, with the amount set to <code>1001.00</code></li></ul> |
| NMI | <a href="https://support.nmi.com/hc/en-gb/articles/115002375583-Test-Cards" target="_blank" rel="noopener noreferrer">NMI test cards</a> | <ul><li><strong>Success</strong> - <code>371111111111114</code></li></ul> |
| GoCardless | <a href="https://docs.gocardless.com/docs/developer-resources/test-bank-details" target="_blank" rel="noopener noreferrer">GoCardless test accounts</a> | <ul><li><strong>Direct Debit success</strong> - French IBAN <code>FR1420041010050500013M02606</code>, with the billing country set to <code>FR</code></li></ul> |
| BlueSnap | <a href="https://support.bluesnap.com/docs/test-credit-card-numbers" target="_blank" rel="noopener noreferrer">BlueSnap test cards</a> | <ul><li><strong>Success</strong> - <code>374245455400126</code>, exp <code>05/23</code></li></ul> |

---

To build your own payment forms against a connected gateway, see <a href="https://docs.maxio.com/configuration/advanced-billing/maxiojs/check-gateway-support" target="_blank" rel="noopener noreferrer">Check Gateway Support</a>.
