Direct Debit Customer Token

Tokenizing direct debit

Create an ACH direct debit customer token

Here is an example of a successful request for an ACH direct debit bank account tokenization to accept USD payment in US.

Create customer token using direct debit

POST https://staging.api.xpay.xcover.com/customer-tokens/direct-debit

Headers

Name
Type
Description

Authorization*

String

Bearer {{JWT}}

{
    "customer": {
      "email": "[email protected]"
    },
    "directDebit": {
        "type": "ACH Direct Debit",
        "bank": {
            "bankAccountNumber": "987654321",
            "bankLocationId": "011000138",
            "ownerName": "John Doe"
        },
        "billingAddress": {
            "city": "Sydney",
            "country": "US",
            "houseNumberOrName": "45",
            "postalCode": "2000",
            "stateOrProvince": "AL",
            "street": "Clarance St"
        }
    }
}

Failure Scenarios

There are many reasons why a tokenization of direct debit may fail. Here are some examples.

Missing bank account details

{
    "customer": {
      "email": "[email protected]"
    },
    "directDebit": {
        "type": "ACH Direct Debit",
        "bank": {}
    }
}

Invalid bank location ID

{
    "customer": {
      "email": "[email protected]"
    },
    "directDebit": {
        "type": "ACH Direct Debit",
        "bank": {
            "bankAccountNumber": "987654321",
            "bankLocationId": "{{ Invalid bank location id }}",
            "ownerName": "John Doe"
        },
        "billingAddress": {`
            "city": "Sydney",
            "country": "US",
            "houseNumberOrName": "45",
            "postalCode": "2000",
            "stateOrProvince": "AL",
            "street": "Clarance St"
        }
    }
}

Last updated