---
title: "Tokenize credit card"
method: POST
path: "/scripts/tokenization/tokens"
tags: ["Tokenization"]
---

# Tokenize credit card

`POST /scripts/tokenization/tokens`

NOTE that the full URL for this API call is https://api.na.bambora.com/scripts/tokenization/tokens. Turn a credit card into a token using this service. This helps lessen your PCI scope by not passing the credit card information to your server. Instead you turn the card number into a token in the client app, then send the token to the server. When you send the token to Bambora to make a payment, Bambora then looks up the card number from that token and makes the payment. Tokens can also be used to create payment profiles.

## Request body

- TokenRequest
  - `number` string, required — The credit card number
  - `expiry_month` string, required — eg. 02 for February.
  - `expiry_year` string, required — eg. 17 for 2017.
  - `cvd` string, required — Security code on the back of the credit card.

## Response `200`

Token response object. One will always be returned even if the data or card is invalid. The validity of the card is not checked with this API call.

- TokenResponse
  - `token` string, required — The token representing the credit card number that you will send for purchases. You will always receive a token, even if the request data is wrong or the card is invalid.
  - `code` string — Response code for the message. It can be ignored.
  - `version` integer — Message version number. Can be ignored.
  - `message` string — Response message with any hints as to what might have gone wrong, if something went wrong.

---

[API](https://skmtc.net/worldline-solutions/apis/worldline-payment-apis.md) · [All operations](https://skmtc.net/worldline-solutions/apis/worldline-payment-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worldline-solutions/worldline-payment-apis/versions/d661d9e357a1/schema)
