Pinch Payments Tokens API

The Tokens API from Pinch Payments — 1 operation(s) for tokens.

Operations 1

POST /tokens Tokenise Payment Source #

Documentation

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pinch-payments-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pinch-payments-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pinch-api Tokens API
  version: '2020.1'
servers:
- url: https://api.getpinch.com.au/test
security:
- sec0: []
tags:
- name: Tokens
paths:
  /tokens:
    post:
      summary: Tokenise Payment Source
      description: Safely submit credit card or bank account details to our servers in exchange for a token that can be used in future.
      operationId: tokenise
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - publishableKey
              properties:
                publishableKey:
                  type: string
                  description: The publishable key found in your API Keys settings
                sourceType:
                  type: string
                  description: The type of payment source to tokenise.
                  enum:
                  - credit-card
                  - bank-account
                cardNumber:
                  type: string
                  description: '[Credit Card] The credit card number. (Required if tokenising a Credit Card)'
                cvc:
                  type: string
                  description: '[Credit Card] The verification code found on the back of the credit card. (Required if tokenising a Credit Card)'
                expiryMonth:
                  type: integer
                  description: '[Credit Card] The two digit expiry month. (Required if tokenising a Credit Card)'
                  format: int32
                expiryYear:
                  type: integer
                  description: '[Credit Card] The four-digit expiry year. (Required if tokenising a Credit Card)'
                  format: int32
                cardHolderName:
                  type: string
                  description: '[Credit Card] The name of the person who owns the credit card. (Required if tokenising a Credit Card)'
                bankAccountName:
                  type: string
                  description: '[Bank Account] The name of the bank account. (Required if tokenising a Bank Account)'
                bankAccountRouting:
                  type: string
                  description: '[Bank Account] The Routing number of the bank account. Referred to as BSB in Australia, normally the first 6 digits of a New Zealand account number. (Required if tokenising a Bank Account)'
                bankAccountNumber:
                  type: string
                  description: '[Bank Account] The Bank account number not including the Routing number. (Required if tokenising a Bank Account)'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"token\": \"tkn_XXXXXXXXXXXXXXXXXXXXXX\",\n    \"cardHolderName\": \"Ben Hotdog\",\n    \"displayCardNumber\": \"4242\",\n    \"expiryDate\": \"2022-12-01T00:00:00Z\",\n    \"cardScheme\": \"visa\",\n    \"origin\": \"AU\"\n}"
              schema:
                type: object
                properties:
                  token:
                    type: string
                    example: tkn_XXXXXXXXXXXXXXXXXXXXXX
                  cardHolderName:
                    type: string
                    example: Ben Hotdog
                  displayCardNumber:
                    type: string
                    example: '4242'
                  expiryDate:
                    type: string
                    example: '2022-12-01T00:00:00Z'
                  cardScheme:
                    type: string
                    example: visa
                  origin:
                    type: string
                    example: AU
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: "[\n    {\n        \"propertyName\": \"\",\n        \"errorMessage\": \"Invalid publishable key: pk_test_XXXXXXXXX\",\n        \"attemptedValue\": null,\n        \"customState\": null,\n        \"severity\": 0,\n        \"errorCode\": null,\n        \"formattedMessageArguments\": null,\n        \"formattedMessagePlaceholderValues\": null,\n        \"resourceName\": null\n    }\n]"
              schema:
                type: array
                items:
                  type: object
                  properties:
                    propertyName:
                      type: string
                      example: ''
                    errorMessage:
                      type: string
                      example: 'Invalid publishable key: pk_test_XXXXXXXXX'
                    attemptedValue: {}
                    customState: {}
                    severity:
                      type: integer
                      example: 0
                      default: 0
                    errorCode: {}
                    formattedMessageArguments: {}
                    formattedMessagePlaceholderValues: {}
                    resourceName: {}
        '403':
          description: '403'
          content:
            text/plain:
              examples:
                Result:
                  value: ''
      deprecated: false
      security: []
      x-readme:
        code-samples:
        - language: curl
          code: "curl https://api.getpinch.com.au/test/tokens\n -H \"Content-Type: application/json\" \n -d \"{\n    'publishableKey': 'pk_test_hjbdslfkjhb8789oplrblsdf8bl',\n    'sourceType': 'credit-card',\n    'cardNumber': '4242424242424242',\n    'cvc\": '123',\n    'expiryMonth': 12,\n    'expiryYear': 2022,\n    'cardHolderName': 'Ben Hotdog'\n\t\t}\""
          name: credit-card
        - language: curl
          code: "curl https://api.getpinch.com.au/test/tokens\n -H \"Content-Type: application/json\" \n -d \"{\n    'publishableKey': 'pk_test_hjbdslfkjhb8789oplrblsdf8bl',\n    'sourceType': 'bank-account',\n    'bankAccountName': 'Ben Hotdog',\n    'bankAccountRoutingNumber\": '001001',\n    'bankAccountNumber': '001001001'\n\t\t}\""
          name: bank-account
        samples-languages:
        - curl
      tags:
      - Tokens
components:
  securitySchemes:
    sec0:
      type: oauth2
      flows: {}
x-readme:
  headers:
  - key: pinch-version
    value: '2020.1'
  explorer-enabled: true
  proxy-enabled: true