No momento, esta página não está disponível em português
Payment-method icon

Pay by Bank (US) for API only

Add Pay by Bank (US) to an existing API-only integration.

Accept Pay by Bank (US) payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.

Requirements

Requirement Description
Integration type Make sure that you have built your API-only integration.
Setup steps Before you begin, contact our Support Team to add Pay by Bank (US) in your Customer Area.

Build your payment form

  1. In your POST /paymentMethods request, use:

    • currency: USD
    • countryCode: US
  2. When you receive the /paymentMethods response, note the object for Pay by Bank (US):

    • name: Pay by Bank. Use this to show the payment method in your payment form.
    • type: paybybank_AIS_DD. Use this in your payment request as the paymentMethod.type.

    There is no list of issuing banks that you can show in your payment form.

  3. Make sure that when shoppers select Pay by Bank, you obtain their authorization to debit their bank account. ACH rules require that. We recommend showing the following text:

    By connecting your bank account you are authorizing debits to your account for any amount owed for the use of our services and/or purchase of our products, until you revoke this authorization.

Make a payment

  1. Make a /payments request, specifying:

    Parameter Required Description
    paymentMethod.type -white_check_mark- paybybank_AIS_DD
    returnUrl -white_check_mark- URL to where the shopper should be redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.
    countryCode The shopper's country/region.
    Format: the two-letter ISO-3166-1 alpha-2 country code. Exception: QZ (Kosovo). This determines the banks that our partner shows to the shopper. Currently, only US is supported. This is also the default if you do not include this parameter.
    The countryCode is not required, but we recommend implementing it because of future enhancements that will allow Pay by Bank (US) payments through non-US banks.
  2. In the /payments response, note the action object. This contains the information needed to redirect the shopper.

Handle the redirect

  1. To complete the payment, redirect the shopper to the action.url returned in the /payments response, taking into account the following recommendations:

    • When using the HTTP GET method:
      For security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.

    • Redirection for mobile integrations:
      For mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.

  2. After the shopper is redirected back to your website, check the payment result by making a POST /payments/details request, specifying:

    • details: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.
  3. In the response note the following:

    • resultCode: use this to present the result to your shopper.
    • pspReference: our unique identifier for the transaction.

Present the payment result

Use the  resultCode that you received in the /payments/details response to present the payment result to your shopper.

The resultCode values you can receive for Pay by Bank (US) are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
You will receive the funds in 2-3 days.
Cancelled The shopper cancelled the payment while on their bank's website. Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.
Error There was an error while the payment was processed. Inform the shopper that there was an error processing their payment. The response contains a refusalReason, indicating the cause of the error.
Pending or
Received
The shopper has completed the payment but the final result is not yet known. It may take minutes or hours to confirm this. Inform the shopper that you received their order, and are waiting for the payment to be completed.
You will receive the final result of the payment in an AUTHORISATION webhook. If the transaction is not authorised within 30 minutes, the offer will close. Optionally, you can be informed of this through an OFFER_CLOSED webhook.
Refused The payment was refused by the shopper's bank. Ask the shopper to try the payment again using a different payment method.

If the shopper closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment:

eventCode success field Description Action to take
AUTHORISATION false The payment failed. Cancel the order and inform the shopper that the payment failed.
AUTHORISATION true The shopper successfully completed the payment. Inform the shopper that the payment has been successful and proceed with the order.

Capture

We strongly recommend capturing Pay by Bank (US) payments immediately, to reduce the risk of insufficient funds at the time of capture.

Adyen completes the checks on the shopper's bank account, including a balance check and risk checks, at the time of authorization. However, the issuing bank does not hold the authorized funds and thus it is possible that the account balance is no longer sufficient by the time you capture the payment. For that reason, you should capture Pay by Bank (US) payments as soon as possible.

However, even with immediate capture there is still a risk of insufficient funds at the time of capture, because capturing is an asynchronous process on the ACH Direct Debit network.

Recurring payments

Pay by Bank (US) supports tokenization for recurring transactions.

We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.

To make recurring payments:

  1. Create a token through the initial Pay by Bank (US) transaction for the shopper, specifying:

  2. Get the shopper's token from the payment response or the RECURRING_CONTRACT webhook.
    For example: additionalData.recurring.recurringDetailReference: M5N7TQ4TG5PFWR50.

  3. Use the token in later Pay by Bank (US) payments for the shopper, specifying:

Test and go live

We recommend that you test various scenarios, such as approved payments, authentication errors, and payments cancelled by the shopper. You can check the status of test payments in your Customer Area > Transactions > Payments.

To go live, you need to add Pay by Bank (US) in your live Customer Area. Our partner Plaid then registers your merchant account with participating banks, including some of the largest banks in the US. The registration takes up to one business week from the moment Plaid has started the process. During this time, your shoppers cannot connect their bank account to Plaid. For this reason, you cannot accept live Pay by Bank (US) payments until the registration process is completed.

We send you a paymentMethod.created webhook when you can start accepting live Pay by Bank (US) payments.

See also