# Set up a payment gateway This topic describes how to add and configure a payment gateway in Rebilly. This topic also describes how to configure payment methods, such as payment cards and digital wallets. To view all payment gateways that are supported by Rebilly, see [Payment gateways](/gateways). If the gateway that you require is not listed, Rebilly will integrate it free of charge. For more information, see [Gateway integration requests](/docs/settings/integration-requests). If you are experimenting with the product in the sandbox environment, a test payment gateway called `TestProcessor` is configured for all Rebilly accounts. To complete this process, you must have payment gateway account credentials. 1. [Log in or sign up to Rebilly](https://app-sandbox.rebilly.com/). 2. Select an environment: In the top right corner of the page, press your initials and then select **Sandbox** or **Live** environment. 3. In the left navigation bar, press . 4. In the **Configuration** section, press **Gateway accounts**. 5. Press **Add gateway account**, or in the list of gateways, select a gateway account. Use the **Search by name** field to search for gateways. If the gateway that you require is not listed, Rebilly will integrate it free of charge. For more information, see [Gateway integration requests](/docs/settings/integration-requests). 6. Optionally, if you are adding a new payment gateway: In the **Gateway account ID** field, enter a unique alphanumeric value. Use a value that is recognizable in your reports. Gateway account IDs are used in other configuration screens, and are also how accounts are referenced within the Rebilly API. 7. In the **Payment methods** section, in the **Payment method** dropdown, select from the following: Accept multiple payment card brands and digital walletsUse this option to allow your customer to use credit and debit card brands and digital wallets, such as Apple Pay, Google Pay™, and Samsung Pay in this payment gateway. The following gateway accounts support digital wallets: Worldpay, CheckoutCom, Stripe, Safecharge, BlueSnap, NMI, and Adyen. 1. In the **Payment method** dropdown, select **Payment-card**. 2. In the **Payment card brands** section, select the card types you want to accept. 3. Optionally, to accept digital wallets, in the **Digital wallets** section, select the wallets you want to accept and enter the required information. Accept ACH, PayPal, or any other payment methodUse this option to allow your customer to use ACH, PayPal, or any other payment methods that are supported by this payment gateway. - If you want to accept multiple payment methods, you must create a separate gateway account configuration in Rebilly for each payment method. - Ensure that the payment gateway you are configuring supports the payment method you want to accept. For more information, see [Payment methods](/payment-methods). 1. In the **Payment method** dropdown, select select the payment method you want to accept. 8. In the **Accepted currencies** section, press in the **Select currencies** field and add one or more currencies. 9. Optionally, to define the setup instruction for new payment instrumentsIn the **Setup instruction** section, press the **Instruction** dropdown, and select from the following: - **Do nothing**: Do not use any setup instruction for new payment instruments. - **Authorize**: Verify that the payment instrument is valid by placing a hold on the cardholder's account for the authorized amount. An authorization response code is later used to capture the authorized funds. - **Authorize and void**: Verify that the payment instrument is valid by charging a small amount to the payment instrument. The amount immediately voided. - **Strong Customer Authentication (SCA)**: Redirect the customer to the website of the issuing bank to authenticate the customer. SCA requires the cardholder's interaction. For more information, see [Configure 3D Secure (3DS)](#configure-3d-secure-(3ds)) in the steps below. 10. Optionally, to configure how the gateway manages payout requests 1. In the **Ready to payout instructions** section, turn on the **Activate this gateway account for payouts** toggle. 2. Select one of the following options: - **Covered payout**: Use this gateway if it previously processed a payment for the same, or a greater, amount. - **Approved payments**: Use this gateway if it previously processed a payment for the same amount. The customer must have a previously approved transaction, in the same currency, on this gateway. - **All payments**: Use this gateway for any amount. For more information, see [Manage payout requests](/docs/data-tables/manage-payout-requests#manage-payout-requests). 11. Optionally, to configure advanced gateway settings, select from the following: Configure card statement descriptionsUse this process to assign a name to display on the cardholder's monthly statement, or to use a dynamic descriptor. A descriptor is the text that is displayed on the cardholder's billing statement. It identifies the source of a credit or debit card transaction. A dynamic descriptor can be modified on a per-transaction basis. 1. In the **Advanced configuration** section, turn on the **Advanced configuration** toggle. 2. In **Card statement description**, select one of the following: - To assign a name to display on the cardholder's monthly statement: In the **Card statement description** section, in the **Descriptor** field, enter the name to display on the monthly statement. In the **City** field, enter a city. - To assign a descriptor dynamically: Select the **Dynamic descriptor** checkbox. Configure custom fieldsUse this process to add custom fields to a payment gateway account. Custom fields extend a resource schema to include custom data that is not provided as a common field. For more information, see [Custom fields](/docs/settings/custom-fields). If you have not created any custom fields this section will be empty. For more information, see [Create custom fields](/docs/settings/custom-fields#create-custom-fields). 1. In the **Advanced configuration** section, turn on the **Advanced configuration** toggle. 2. In the **Custom fields** section, complete the required fields. Configure Dynamic Currency Conversion (DCC) - DCC is a premium Rebilly feature and comes at an additional cost. Before you use this feature, [contact Rebilly](/support/). DCC detects when a customer attempts to pay in a currency that is not native to their region. If the gateway account is configured to accept payment cards as a payment method, you can choose to offer the customer the option to pay in their native currency with a small markup, or to automatically convert the transaction to a specified currency without customer interaction. If the gateway account not is configured to accept payment cards as a payment method, you can automatically convert transactions to the specified currency without customer interaction. To set up DCC, see [Set up DCC](/docs/settings/dynamic-currency-conversion#set-up-dcc). Configure sticky gateway accountsUse this process to specify that all future payments from new payment instruments must be processed by the same gateway that processed their first transaction. For more information, see [Sticky gateway accounts](/docs/settings/gateway-routing#sticky-gateway-accounts). 1. In the **Advanced configuration** section, turn on the **Advanced configuration** toggle. 2. In the **Sticky gateway account** section, select the **Activate sticky gateway** checkbox. Configure gateway account timeoutUse this process to specify the amount of time that Rebilly will wait for a response from the gateway before timing out. 1. In the **Advanced configuration** section, turn on the **Show advanced configuration** toggle. 2. In the **Gateway account timeout** section, enter a value between 10 and 59 seconds. Configure approval window Time To Live (TTL)Use this process to specify the amount of time in which an offsite transaction must be approved before it is automatically abandoned. 1. In the **Advanced configuration** section, turn on the **Show advanced configuration** toggle. 2. In the **Approval window Time To Live (TTL)** section, enter a value, in seconds. Unapproved transactions are abandoned after this period. Configure reconciliation windowUse this process to specify the amount of time in which an approved transaction must be reconciled before it is automatically abandoned. 1. In the **Advanced configuration** section, turn on the **Show advanced configuration** toggle. 2. In the **Reconciliation window** section, select the **Activate reconciliation window** checkbox. 3. In the **Time window** field, enter the reconciliation period, in seconds. Configure 3D Secure (3DS)3DS is a security layer for online credit and debit card transactions that merchants use to validate cardholders. The cardholder authenticates their card against the website of the issuing bank, either automatically or through a second factor of authentication such as a website, SMS, or mobile app. To configure 3DS on a payment gateway, see [Configure 3DS](/docs/settings/3ds#configure-3ds). Configure additional filtersUse this process to define additional criteria on when to use a specific payment gateway. For example, to only use this gateway account when the customer's billing address is in the US. 1. In the **Advanced configuration** section, turn on the **Advanced configuration** toggle. 2. In the **Additional filters** section, in the **Select filter** dropdown, select a filter. 3. In the next field, select a condition. 4. In the next field, enter or select values. To add more filters, press **Add filter**. To delete a filter, on the right of the filter, press **Delete**. Configure additional reportingUse this process to add additional reporting and benchmark information to a payment gateway. 1. In the **Advanced configuration** section, turn on the **Advanced configuration** toggle. 2. In the **Additional information** section, in the **Acquirer** dropdown, select an acquirer company. 3. In the **Merchant category code** dropdown, select a code. 12. Press **Save gateway account**. 13. Complete [test transactions](/docs/tutorials/test-transactions#test-transactions). For applicable gateways, to test that your credentials are correct, at the top of the screen, press the **Check credentials**. ## Instant payment notifications (IPNs) IPN is a message service that automatically notifies merchants on transaction events. It is used to automate office administrative functions, including automatically fulfilling orders, and providing customers with order status. Payment gateways use static or dynamic IPNs. Static IPNs must be configured within the user interface of the gateway, or in some cases, they may need to be set by your account manager. Dynamic IPNs are pre-configured and do not require any further action. If you are unsure whether your payment gateway uses static or dynamic IPNs, contact your gateway account manager. All static IPNs have the following structure: `https://hook.rebilly.com/ipns/{gatewayName}/{merchantId}` ## Further reading - [Manage payment gateways](/docs/settings/manage-payment-gateways) - [Gateway routing](/docs/settings/gateway-routing) - [Payment gateways](/docs/settings/payment-gateway)