Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Endpoint Tokenizer API
version: 1.0.0
description: "## About\nThe Tokenizer API provides an alternative to our [public npm package](https://www.npmjs.com/package/@boltpay/tokenizer). If you would prefer to use that, you can follow our [Tokenizer documentation](/developers/references/bolt-tokenizer). \n\n## How It Works\nThis API uses two endpoints to implement custom back-office integrations such as direct payment processing.\n\nThe `/public_key` endpoint returns a key used in the `/token` endpoint, used to encrypt and decrypt the payload containing credit card information.\n"
servers:
- url: https://staging.bolttk.com
description: The Staging URL (Staged Data).
- url: https://sandbox.bolttk.com
description: The Sandbox URL (Test Data).
- url: https://production.bolttk.com
description: The Production URL (Production Data).
tags:
- name: Tokenizer
paths:
/public_key:
get:
description: 'Returns current `public_key` to be used to sign `/token` requests. There is no need for authorization or authentication with this endpoint, nor headers.
'
operationId: tokenizerPublicKey
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/public_key_response'
description: SUCCESS.
'500':
content:
text/plain:
schema:
example: Internal server error
type: string
description: Internal service error
summary: Get Public Key
tags:
- Tokenizer
/token:
post:
description: "Collects and stores the credit card information and returns a token representing the stored card. \n\nAlternatively, Bolt also provides an [NPM package](https://help.boltapp.com/developers/references/bolt-tokenizer/) for ease of use. \n"
operationId: tokenizerToken
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/post_token_request'
description: This payload includes credit card information encrypted with a locally generated client public and private key pair, nonce string, and server public key.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/post_token_api_response'
description: SUCCESS. The token was generated and added to the encrypted payload.
'422':
content:
text/plain:
schema:
example: Unprocessable entity
type: string
description: Unprocessable entity
'500':
content:
text/plain:
schema:
example: Internal server error
type: string
description: Internal service error
summary: Post Token
tags:
- Tokenizer
components:
schemas:
post_token_request:
description: Post Token
properties:
nonce:
description: An artificial random string which was used to encrypt the payload. Guarantees that each string to be encrypted results in different ciphertext.
example: enKobp7uZhgDk96Kjp8pjpX+qeWHW9yE
format: base64
type: string
payload:
description: "The credit card information, which has been encrypted and encoded using Elliptic Curve Diffie-Hellman Key Exchange. \n\nContains the json object with following fields:\n\n| Key | Value | \n| --- | ----- | \n| `cc` | The credit card number. | \n| `cvv` | The card verification value. | \n"
example: hoNo0xogjmcOVzTB+Fg6tY7v/ZBp3VBQE4XxMcJMApZU3cANjui5KLI7oYpDBuP+ejop2oU=
format: base64
type: string
public_key:
$ref: '#/components/schemas/public_key_response'
type: object
public_key_response:
description: 'A client public key, generated locally.
'
example: /v7FsRGXEErA7f9y1uyMW0ApMUnC32RenDPpueLcYV8=
format: base64
type: string
payload_response:
description: "The encrypted card information and the newly generated card token. It can be decrypted with client private key, server public key and nonce. \n\nAfter decoding and decrypting, the payload is an object: \n| Object | Value | \n| ------ | ----- | \n| `token` | The token is the newly generated credit card token. | \n| `expiry` | The date at which the token expires. | \n| `last4` | The last 4 digits of the card number. | \n| `bin` | The credit card bin. | \n| `network` | The credit card network. | \n"
example: T5m0ig7ROC/6WVJ9f8NcKRPhjEmn9833i3T4lZiTTNbZgOXM8gRXKeNDSH9BrzicqgjEXNriuZn9E8/xL5mb3lpIPAtX0L0dBDpojb/xa/QNi9/zEiZ6+MmBa6EQCEfKZxiOG9l9BMi3gS+UZxGcF18yfra/UXdhnvQW7PGk0Ex2F6MggwjdJOWoPgKG8UROTBMstoL23plFwfGScyZ+g0uo
format: base64
type: string
post_token_api_response:
description: Token Successfully Created
properties:
nonce:
description: 'An artificial random string used to decrypt the `payload`.
'
example: ObJS+95BqxwqGgPMrvg//XAogXeBsMdP
format: base64
type: string
payload:
$ref: '#/components/schemas/payload_response'
type: object