Koin Tokenize Services API

The Tokenize Services API from Koin — 1 operation(s) for tokenize services.

OpenAPI Specification

koin-tokenize-services-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Antifraud Access Tokenize Services API
  description: Antifraud services
  license:
    name: Apache License Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '2.0'
servers:
- url: https://api-sandbox.koin.com.br
  description: Sandbox domain url
tags:
- name: Tokenize Services
paths:
  /v1/payment/tokenize:
    post:
      tags:
      - Tokenize Services
      summary: Tokenize Card
      description: Create secure token from card.
      operationId: tokenizeCardPOST
      parameters:
      - name: Content-Type
        in: header
        example: application/json
        description: The Media type of the body of the request. Default value for payment provider protocol is application/json
        schema:
          type: string
        required: true
      - name: Accept
        in: header
        example: application/json
        description: Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenizeCard'
      responses:
        '200':
          description: Create secure token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizeCardResponse'
              examples:
                Successful create secure token:
                  $ref: '#/components/examples/TokenizeCardExampleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication failed:
                  value:
                    message: Authentication failed
                    status: ERROR
components:
  schemas:
    TokenizeCardResponse:
      title: Tokenize card response
      type: object
      required:
      - secure_token
      properties:
        secure_token:
          type: string
          description: Secure token used for create payment service with payment method card.
          example: 86198ce2640145ef2488e884b8ecb459d414700dc540f76ee6034824f6187e9ac3d100f3649650754d3a2592c0391c3f90d924d745fb7e6d0a9fae4cfa79c4e55f9ab1e00102c0a5c7a7e7c59cfff219c86c30c77b9e5509e224f293052f58c275123a
    TokenizeCard:
      title: Card
      required:
      - transaction
      - card
      type: object
      properties:
        transaction:
          required:
          - reference_id
          type: object
          properties:
            reference_id:
              type: string
              pattern: utf-8
              description: Transaction identifier, generated by client. (Maximum of 50 characters - Unique per transaction).
              example: REF0000001
        card:
          required:
          - number
          - expiration_month
          - expiration_year
          - security_code
          - holder_name
          type: object
          properties:
            number:
              type: string
              description: Credit card number.
              example: '4225289837059229'
            expiration_month:
              type: string
              description: Month of the card expiration.
              example: '01'
            expiration_year:
              type: string
              description: Year of the card expiration.
              example: '2030'
            security_code:
              type: string
              pattern: ([0-9]){4}
              description: 3 or 4 digit number on the back of the card.
              example: '123'
            holder_name:
              type: string
              description: Name of card holder, as it appears on the card.
              example: Jhon Doe Jones
    ErrorResponse:
      title: Error Response
      type: object
      properties:
        code:
          type: string
          description: Standardized error code.
        message:
          type: string
          description: Error message.
        causes:
          type: array
          description: List of error causes.
          items:
            type: string
  examples:
    TokenizeCardExampleResponse:
      value:
        secure_token: 86198ce2640145ef2488e884b8ecb459d414700dc540f76ee6034824f6187e9ac3d100f3649650754d3a2592c0391c3f90d924d745fb7e6d0a9fae4cfa79c4e55f9ab1e00102c0a5c7a7e7c59cfff219c86c30c77b9e5509e224f293052f58c275123a