# 

## Prerequisites

* A valid API key — see [Obtain API credentials](/docs/how-tos/setup/obtain-credentials)
* The person's bank account details (routing number, account number, account type) and a `customer_id`


## Step 1: Build the request

| Field | Required | Description |
|  --- | --- | --- |
| `customer_id` | Yes | Your internal customer identifier |
| `nickname` | No | A friendly label (for example, "Business Checking") |
| `bank_account.routing_number` | Yes | 9-digit ABA routing number |
| `bank_account.account_number` | Yes | Bank account number (4–17 digits) |
| `bank_account.account_type` | Yes | `checking` or `savings` |
| `bank_account.name` | Yes | Account holder name |
| `bank_account.email` | Yes | Account holder email |


## Step 2: Send the request

curl
```shell
curl -X POST \
  https://api.dev.paradisegateway.net/v1/payment_tokens \
  -H "Content-Type: application/json" \
  -H "APIKEY: YOUR-API-KEY" \
  -d '{
    "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
    "nickname": "Business Checking",
    "bank_account": {
      "routing_number": "021000021",
      "account_number": "123456789012",
      "account_type": "checking",
      "name": "John Doe",
      "email": "john.doe@example.com"
    }
  }'
```

Python
```python
import requests

resp = requests.post(
    "https://api.dev.paradisegateway.net/v1/payment_tokens",
    headers={"Content-Type": "application/json", "APIKEY": "YOUR-API-KEY"},
    json={
        "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
        "nickname": "Business Checking",
        "bank_account": {
            "routing_number": "021000021",
            "account_number": "123456789012",
            "account_type": "checking",
            "name": "John Doe",
            "email": "john.doe@example.com",
        },
    },
)
print(resp.json())
```

JavaScript
```javascript
const resp = await fetch(
  "https://api.dev.paradisegateway.net/v1/payment_tokens",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "APIKEY": "YOUR-API-KEY",
    },
    body: JSON.stringify({
      customer_id: "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
      nickname: "Business Checking",
      bank_account: {
        routing_number: "021000021",
        account_number: "123456789012",
        account_type: "checking",
        name: "John Doe",
        email: "john.doe@example.com",
      },
    }),
  }
);
console.log(await resp.json());
```

C#
```csharp
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("APIKEY", "YOUR-API-KEY");

var payload = new
{
    customer_id = "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
    nickname = "Business Checking",
    bank_account = new
    {
        routing_number = "021000021",
        account_number = "123456789012",
        account_type = "checking",
        name = "John Doe",
        email = "john.doe@example.com"
    }
};
var resp = await client.PostAsJsonAsync(
    "https://api.dev.paradisegateway.net/v1/payment_tokens", payload);
Console.WriteLine(await resp.Content.ReadAsStringAsync());
```

Java
```java
HttpClient client = HttpClient.newHttpClient();
String body = """
    {
      "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
      "nickname": "Business Checking",
      "bank_account": {
        "routing_number": "021000021",
        "account_number": "123456789012",
        "account_type": "checking",
        "name": "John Doe",
        "email": "john.doe@example.com"
      }
    }
    """;
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.dev.paradisegateway.net/v1/payment_tokens"))
    .header("Content-Type", "application/json")
    .header("APIKEY", "YOUR-API-KEY")
    .POST(HttpRequest.BodyPublishers.ofString(body)).build();
HttpResponse<String> resp = client.send(request,
    HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
```

Go
```go
payload := strings.NewReader(`{
  "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
  "nickname": "Business Checking",
  "bank_account": {
    "routing_number": "021000021",
    "account_number": "123456789012",
    "account_type": "checking",
    "name": "John Doe",
    "email": "john.doe@example.com"
  }
}`)
req, _ := http.NewRequest("POST",
    "https://api.dev.paradisegateway.net/v1/payment_tokens", payload)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("APIKEY", "YOUR-API-KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
```

PHP
```php
$ch = curl_init("https://api.dev.paradisegateway.net/v1/payment_tokens");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ["Content-Type: application/json", "APIKEY: YOUR-API-KEY"],
    CURLOPT_POSTFIELDS => json_encode([
        "customer_id" => "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
        "nickname" => "Business Checking",
        "bank_account" => [
            "routing_number" => "021000021",
            "account_number" => "123456789012",
            "account_type" => "checking",
            "name" => "John Doe",
            "email" => "john.doe@example.com",
        ],
    ]),
]);
echo curl_exec($ch); curl_close($ch);
```

Ruby
```ruby
require "net/http"; require "json"
uri = URI("https://api.dev.paradisegateway.net/v1/payment_tokens")
req = Net::HTTP::Post.new(uri, {
  "Content-Type" => "application/json", "APIKEY" => "YOUR-API-KEY",
})
req.body = {
  customer_id: "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
  nickname: "Business Checking",
  bank_account: {
    routing_number: "021000021", account_number: "123456789012",
    account_type: "checking", name: "John Doe",
    email: "john.doe@example.com",
  },
}.to_json
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts resp.body
```

## Step 3: Handle the response

A `201 Created` response returns the token and masked bank details.

```json
{
  "payment_token": "PAYMENT_TOKEN-02LGEHBA0BZSPA6WRY1T3H4CD",
  "object": "payment_token",
  "type": "bank_account",
  "status": "active",
  "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
  "nickname": "Business Checking",
  "bank_account": {
    "last_four": "9012",
    "routing_number_last_four": "0021",
    "account_type": "checking"
  },
  "correlation_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
```

The response only contains masked details — the full account and routing numbers are never returned.

## Bank account verification

Some use cases require verifying that the person owns the bank account before processing payments. Common verification methods include:

| Method | How it works | Timeline |
|  --- | --- | --- |
| **Micro-deposits** | Two small deposits (for example, $0.05 and $0.12) are sent to the account. The person confirms the amounts. | 2–3 business days |
| **Instant verification** | A third-party service confirms ownership in real time via bank login | Seconds |


Token status during verification
If verification is required, the token status may be `verification_pending` until the person confirms ownership. Only `active` tokens can be used in transactions.

## Token statuses for bank accounts

| Status | Description | Can transact |
|  --- | --- | --- |
| `active` | Verified and ready | Yes |
| `verification_pending` | Awaiting verification | No |
| `verification_failed` | Verification did not pass | No |
| `inactive` | Soft-deleted | No |


## Next steps

* [Process an ACH payment](/docs/how-tos/process-payments/process-ach-payment) — use the token for a bank debit
* [Process an ACH payout](/docs/how-tos/process-payments/process-ach-payout) — use the token for a bank credit
* [Update stored payment method](/docs/how-tos/tokenization-vaulting/update-payment-method)
* [About ACH/bank account payments](/docs/concepts/transactions/ach-accounts)