---
updatedAt: 2025-09-23T20:55:20.000Z
agentTools:
  projectIndex: https://developers.berkeleypayment.com/llms.txt
---

# Create Token: Payment Card

The tokenization endpoint allows you to create tokens representing a Payment Card or Bank Account. These tokens can then be used to associate a Bank Account or Payment Card to an Account Holder.

The Tokenization endpoint should only be used for testing purposes, and instead the Berkeley client JavaScript library can be used to create tokens in order to reduce your PCI scope.

Note: When using the Tokenization endpoint you should use the `Token` API Key. As this key can be exposed in client side applications.



## Create a Payment Card Token
This endpoint allows you to create a token that is specific for a `Financial Account` or a payment card (i.e., credit, debit). 

### Request
Note that all fields must be present in the request.  Some field values are optional.

| Field| Type|Value |Description|
|---------------------|------------------|-------------------|---------------------|
| name| string, required |John Smith |card holder name  |
| brand| string, optional | Visa|brand of card (visa, mastercard, amex) |
| number| string, required | 4111111111111111| card number|
| address_line1| string, optional | 123 Main St| billing address line 1|
| address_line2| string, optional| Suite 300| billing address line 2|
| address_postal_code | string, optional | M5H 3G8| billing address postal code|
| address_country     | string, optional | CAN| billing address country                |
| address_city        | string, optional | Toronto| billing address city                   |
| address_state       | string, optional |ON | billing address state/region/province  |
| expiry_month        | string, see notes below [1] |12 | card expiry month, 2 digits            |
| expiry_year         | string, see notes below [1] | 2022| card expiry year, 4 digits             |
| cvv                 | string, see notes below [1] |123| security code, 3 or 4 digits |

[1]: If you tokenize a card that will be used as a source of funds in a *Pull transaction* (i.e., Prepaid Load, P2P Transfer), `expiry_month` and `expiry_year` are **required**.  If you tokenize a card that wll be used to receive funds in a *Push transaction* (i.e., Funds disbursements), `expiry_month`, `expiry_year`, and `cvv` are **optional** (the only exception is for the U.S., where `expiry_month` and `expiry_year` are **required**).

<br>

### Response


| Field name|Type| Value| Description       |
|--------------|-------|------------------|----------------------------------------|
| type| string | payment_card or bank_account | The type of financial account being tokenized|
| token| (alphanumeric)|random key | encrypted card token|
| risk_level|string| low; medium; high| Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta)|
| push_funds_enabled  | boolean|true; false| If the recipient's card accepts real-time deposits or not. If not, the funds will be deposited in 24-48hr |
| name| string|John Smith| The full name of the sender or recipient|
| last_four_digits    | number| 3647| The last 4-digits of the card PAN; also used for easily identifying the card|
| expiry_year| number| 2022| The expiry year of the card (YYYY)|
| expiry_months| number|month| The expiry month of the card (MM)|
| currency| string|CAD, USD| The currency code used for the transaction - 3-char value|
| card_holder_type    | string|consumer; business| The type of card used by the sender or recipient in the transaction|
| brand| string|visa; mastercard| The card brand used in the transaction|
|bin| string | 6 digits | Bin number of issuer |
|card_product_name | string | Visa Corporate | The name of the card product |
|card_subtype_code | string | Reloadable; Non-Reloadable | The type of Prepaid card |
| funding_type| string|credit; debit; prepaid        | The type of card used for the transaction|
|issuer_name| string|BANCO AGROMERCANTIL DE GUATEMALA S.A. | The name of the Bank issuer |
| issuer_country_code | string|CAN, USA; ESP| Issuing country code - 3-char value                                                                       |
| fast_funds_enabled  |boolean| true; false | Whether or not the Recipient issuer anticipates in Fast Funds                                             |
| cvv_check_status    | string|pass; fail; unchecked; unavailable    | See Berkeley Client Services wiki for detailed description - [Fraud Prevention](https://berkeleypayments.atlassian.net/l/c/HguVGdGE)|
| avs_check_status    | string|pass; fail; unchecked; unavailable    | See Berkeley Client Services wiki for detailed description - [Fraud Prevention](https://berkeleypayments.atlassian.net/l/c/HguVGdGE)|
| address_state       | string|ON, BC, AB                    | Billing address province associated with the card (2-char)|
| address_postal_code | alphanumeric|M5H3G8| Canadian postal code or US ZIP code|
| address_line1       | string| 123 Main St.|  Street number and street name|
| address_line2       | string|Suite 300| Apartment number or suite number|                                             |
| address_country     | string|CAN, USA; ESP| Billing address country code                                                                              |
| address_city        | string|Toronto| Billing address city|

## Create a Bank Account Token
This endpoint allows you to create a token that is specific for a `Financial Account` or a bank account (i.e., credit, debit). 

### Request
Note that all fields must be present in the request.  Some field values are optional.

| Field| Type|Value |Description|
|---------------------|------------------|-------------------|---------------------|
| account\_number | string, required |12341234 | Bank Account Number, between 7 and 12 digits.  |
| transit\_number | string, required |12345 | Bank Account Transit Number  |
| institution\_number | string, required |001 | Bank Account Institution |
| account\_holder\_name | string, required |John Smith | Account Holder Name |
| currency | string, required | CAN, USD | Bank Account Currency |
| country | string, required | CAN, USA | Country of Bank Account |

<br>

### Response

| Field name|Type| Value| Description       |
|--------------|-------|------------------|----------------------------------------|
| account\_number | string, required |12341234 | Bank Account Number  |
| transit\_number | string, required |12345 | Bank Account Transit Number  |
| institution\_number | string, required |001 | Bank Account Institution |
| account\_holder\_name | string, required |John Smith | Account Holder Name |
| currency | string, required | CAN, USD | Bank Account Currency |
| country | string, required | CAN, USA | Country of Bank Account |
| last\_four\_digits| string, required | 1234 | Last Four Digits of Account Number |
| risk_level|string| low; medium; high| Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta)|
| token| (alphanumeric)|random key | encrypted bank account token|
| type| string | payment_card or bank_account | The type of financial account being tokenized|

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "DirectSend",
    "description": "DirectSend enables real-time fund transferring direct to any Visa cardholder. Funds reach the recipient's account within 30 minutes. You will receive real-time authorization of a transaction's success. /n You can use these endpoints for real-time funds disbursements, P2P transfers and Prepaid Loads.",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.staging.pungle.co/",
      "description": "Staging/Test"
    },
    {
      "url": "https://api.pungle.io",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v2/tokens": {
      "post": {
        "tags": [
          "Tokenization V2"
        ],
        "summary": "Create Token: Payment Card",
        "description": "The tokenization endpoint allows you to create tokens representing a Payment Card or Bank Account. These tokens can then be used to associate a Bank Account or Payment Card to an Account Holder.\n\nThe Tokenization endpoint should only be used for testing purposes, and instead the Berkeley client JavaScript library can be used to create tokens in order to reduce your PCI scope.\n\nNote: When using the Tokenization endpoint you should use the `Token` API Key. As this key can be exposed in client side applications.\n\n\n\n## Create a Payment Card Token\nThis endpoint allows you to create a token that is specific for a `Financial Account` or a payment card (i.e., credit, debit). \n\n### Request\nNote that all fields must be present in the request.  Some field values are optional.\n\n| Field| Type|Value |Description|\n|---------------------|------------------|-------------------|---------------------|\n| name| string, required |John Smith |card holder name  |\n| brand| string, optional | Visa|brand of card (visa, mastercard, amex) |\n| number| string, required | 4111111111111111| card number|\n| address_line1| string, optional | 123 Main St| billing address line 1|\n| address_line2| string, optional| Suite 300| billing address line 2|\n| address_postal_code | string, optional | M5H 3G8| billing address postal code|\n| address_country     | string, optional | CAN| billing address country                |\n| address_city        | string, optional | Toronto| billing address city                   |\n| address_state       | string, optional |ON | billing address state/region/province  |\n| expiry_month        | string, see notes below [1] |12 | card expiry month, 2 digits            |\n| expiry_year         | string, see notes below [1] | 2022| card expiry year, 4 digits             |\n| cvv                 | string, see notes below [1] |123| security code, 3 or 4 digits |\n\n[1]: If you tokenize a card that will be used as a source of funds in a *Pull transaction* (i.e., Prepaid Load, P2P Transfer), `expiry_month` and `expiry_year` are **required**.  If you tokenize a card that wll be used to receive funds in a *Push transaction* (i.e., Funds disbursements), `expiry_month`, `expiry_year`, and `cvv` are **optional** (the only exception is for the U.S., where `expiry_month` and `expiry_year` are **required**).\n\n<br>\n\n### Response\n\n\n| Field name|Type| Value| Description       |\n|--------------|-------|------------------|----------------------------------------|\n| type| string | payment_card or bank_account | The type of financial account being tokenized|\n| token| (alphanumeric)|random key | encrypted card token|\n| risk_level|string| low; medium; high| Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta)|\n| push_funds_enabled  | boolean|true; false| If the recipient's card accepts real-time deposits or not. If not, the funds will be deposited in 24-48hr |\n| name| string|John Smith| The full name of the sender or recipient|\n| last_four_digits    | number| 3647| The last 4-digits of the card PAN; also used for easily identifying the card|\n| expiry_year| number| 2022| The expiry year of the card (YYYY)|\n| expiry_months| number|month| The expiry month of the card (MM)|\n| currency| string|CAD, USD| The currency code used for the transaction - 3-char value|\n| card_holder_type    | string|consumer; business| The type of card used by the sender or recipient in the transaction|\n| brand| string|visa; mastercard| The card brand used in the transaction|\n|bin| string | 6 digits | Bin number of issuer |\n|card_product_name | string | Visa Corporate | The name of the card product |\n|card_subtype_code | string | Reloadable; Non-Reloadable | The type of Prepaid card |\n| funding_type| string|credit; debit; prepaid        | The type of card used for the transaction|\n|issuer_name| string|BANCO AGROMERCANTIL DE GUATEMALA S.A. | The name of the Bank issuer |\n| issuer_country_code | string|CAN, USA; ESP| Issuing country code - 3-char value                                                                       |\n| fast_funds_enabled  |boolean| true; false | Whether or not the Recipient issuer anticipates in Fast Funds                                             |\n| cvv_check_status    | string|pass; fail; unchecked; unavailable    | See Berkeley Client Services wiki for detailed description - [Fraud Prevention](https://berkeleypayments.atlassian.net/l/c/HguVGdGE)|\n| avs_check_status    | string|pass; fail; unchecked; unavailable    | See Berkeley Client Services wiki for detailed description - [Fraud Prevention](https://berkeleypayments.atlassian.net/l/c/HguVGdGE)|\n| address_state       | string|ON, BC, AB                    | Billing address province associated with the card (2-char)|\n| address_postal_code | alphanumeric|M5H3G8| Canadian postal code or US ZIP code|\n| address_line1       | string| 123 Main St.|  Street number and street name|\n| address_line2       | string|Suite 300| Apartment number or suite number|                                             |\n| address_country     | string|CAN, USA; ESP| Billing address country code                                                                              |\n| address_city        | string|Toronto| Billing address city|\n\n## Create a Bank Account Token\nThis endpoint allows you to create a token that is specific for a `Financial Account` or a bank account (i.e., credit, debit). \n\n### Request\nNote that all fields must be present in the request.  Some field values are optional.\n\n| Field| Type|Value |Description|\n|---------------------|------------------|-------------------|---------------------|\n| account\\_number | string, required |12341234 | Bank Account Number, between 7 and 12 digits.  |\n| transit\\_number | string, required |12345 | Bank Account Transit Number  |\n| institution\\_number | string, required |001 | Bank Account Institution |\n| account\\_holder\\_name | string, required |John Smith | Account Holder Name |\n| currency | string, required | CAN, USD | Bank Account Currency |\n| country | string, required | CAN, USA | Country of Bank Account |\n\n<br>\n\n### Response\n\n| Field name|Type| Value| Description       |\n|--------------|-------|------------------|----------------------------------------|\n| account\\_number | string, required |12341234 | Bank Account Number  |\n| transit\\_number | string, required |12345 | Bank Account Transit Number  |\n| institution\\_number | string, required |001 | Bank Account Institution |\n| account\\_holder\\_name | string, required |John Smith | Account Holder Name |\n| currency | string, required | CAN, USD | Bank Account Currency |\n| country | string, required | CAN, USA | Country of Bank Account |\n| last\\_four\\_digits| string, required | 1234 | Last Four Digits of Account Number |\n| risk_level|string| low; medium; high| Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta)|\n| token| (alphanumeric)|random key | encrypted bank account token|\n| type| string | payment_card or bank_account | The type of financial account being tokenized|",
        "operationId": "createTokenPaymentCard1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "card": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "John Smith"
                      },
                      "number": {
                        "type": "string",
                        "example": "4815090000000016"
                      }
                    }
                  }
                }
              },
              "example": {
                "card": {
                  "name": "John Smith",
                  "number": "4815090000000016"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create Token: Payment Card",
            "headers": {
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "string",
                  "example": "572"
                }
              },
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Mon, 10 Dec 2018 14:34:25 GMT"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "example": "\"no-cache\""
                }
              },
              "Strict-Transport-Security": {
                "schema": {
                  "type": "string",
                  "example": "\"max-age=63072000; includeSubdomains; preload\""
                }
              },
              "X-Content-Type-Options": {
                "schema": {
                  "type": "string",
                  "example": "nosniff"
                }
              },
              "X-Frame-Options": {
                "schema": {
                  "type": "string",
                  "example": "SAMEORIGIN"
                }
              },
              "X-XSS-Protection": {
                "schema": {
                  "type": "string",
                  "example": "\"1; mode=block\""
                }
              },
              "cache-control": {
                "schema": {
                  "type": "string",
                  "example": "\"max-age=0, private, must-revalidate, no-store, no-cache\""
                }
              },
              "server": {
                "schema": {
                  "type": "string",
                  "example": "Cowboy"
                }
              },
              "x-download-options": {
                "schema": {
                  "type": "string",
                  "example": "noopen"
                }
              },
              "x-permitted-cross-domain-policies": {
                "schema": {
                  "type": "string",
                  "example": "none"
                }
              },
              "x-request-id": {
                "schema": {
                  "type": "string",
                  "example": "2lnfuld0d9vem3a3gg03frl1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "address_city": {
                          "type": "string",
                          "example": "Toronto"
                        },
                        "address_country": {
                          "type": "string",
                          "example": "CAN"
                        },
                        "address_line1": {
                          "type": "string",
                          "example": "900 Metro Center Blv"
                        },
                        "address_line2": {
                          "type": "string",
                          "example": ""
                        },
                        "address_postal_code": {
                          "type": "string",
                          "example": "94404"
                        },
                        "address_state": {
                          "type": "string",
                          "example": "ON"
                        },
                        "avs_check_status": {
                          "type": "string",
                          "example": "pass"
                        },
                        "bin": {
                          "type": "string",
                          "example": "454565"
                        },
                        "brand": {
                          "type": "string",
                          "example": "visa"
                        },
                        "card_holder_type": {
                          "type": "string",
                          "example": "consumer"
                        },
                        "card_product_name": {
                          "type": "string",
                          "example": "Visa Corporate"
                        },
                        "card_subtype_code": {
                          "type": "string",
                          "example": "Reloadable"
                        },
                        "currency": {
                          "type": "string",
                          "example": "CAD"
                        },
                        "cvv_check_status": {
                          "type": "string",
                          "example": "pass"
                        },
                        "expiry_month": {
                          "type": "string",
                          "example": "10"
                        },
                        "expiry_year": {
                          "type": "string",
                          "example": "2020"
                        },
                        "fast_funds_enabled": {
                          "type": "boolean",
                          "example": false
                        },
                        "funding_type": {
                          "type": "string",
                          "example": "credit"
                        },
                        "issuer_country_code": {
                          "type": "string",
                          "example": "CAN"
                        },
                        "issuer_name": {
                          "type": "string",
                          "example": "TD Canada Trust"
                        },
                        "last_four_digits": {
                          "type": "string",
                          "example": "3551"
                        },
                        "name": {
                          "type": "string",
                          "example": "John Smith"
                        },
                        "push_funds_enabled": {
                          "type": "boolean",
                          "example": false
                        },
                        "risk_level": {
                          "type": "string",
                          "example": "low"
                        },
                        "token": {
                          "type": "string",
                          "example": "pctk_co_ciybj1Bt8iODOR5CrIKY98190612AF2063551"
                        },
                        "type": {
                          "type": "string",
                          "example": "payment_card"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Create Token: Payment Card": {
                    "value": {
                      "data": {
                        "address_city": "Toronto",
                        "address_country": "CAN",
                        "address_line1": "900 Metro Center Blv",
                        "address_line2": "",
                        "address_postal_code": "94404",
                        "address_state": "ON",
                        "avs_check_status": "pass",
                        "bin": "454565",
                        "brand": "visa",
                        "card_holder_type": "consumer",
                        "card_product_name": "Visa Corporate",
                        "card_subtype_code": "Reloadable",
                        "currency": "CAD",
                        "cvv_check_status": "pass",
                        "expiry_month": "10",
                        "expiry_year": "2020",
                        "fast_funds_enabled": false,
                        "funding_type": "credit",
                        "issuer_country_code": "CAN",
                        "issuer_name": "TD Canada Trust",
                        "last_four_digits": "3551",
                        "name": "John Smith",
                        "push_funds_enabled": false,
                        "risk_level": "low",
                        "token": "pctk_co_ciybj1Bt8iODOR5CrIKY98190612AF2063551",
                        "type": "payment_card"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```