Versapay Internal API

Operations intended only to the iframe front end

Operations 6

GET /sessions/{id} get a session #
POST /sessions/{id}/tokens get a token #
PATCH /sessions/{id}/wallet/{walletid}/creditcards/{creditcardid} update a credit card wallet entry #
DELETE /sessions/{id}/wallet/{walletid}/creditcards/{creditcardid} remove a credit card wallet entry #
PATCH /sessions/{id}/wallet/{walletid}/bankaccounts/{bankaccountid} update a bank account wallet entry #
DELETE /sessions/{id}/wallet/{walletid}/bankaccounts/{bankaccountid} remove a bank account wallet entry #

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/versapay-internal-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 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.

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

OpenAPI Specification

versapay-internal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '# Introduction


    The Versapay e-commerce solution is composed of several components.'
  version: 2.0.0
  title: Versapay Ecommerce Internal API
  contact:
    url: https://www.versapay.com
    name: Versapay
    email: support@versapay.com
  x-logo:
    url: https://developers.versapay.com/images/logo.png
servers:
- url: https://{subdomain}.versapay.com/api/v2
  variables:
    subdomain:
      default: ecommerce-api
tags:
- name: Internal
  description: Operations intended only to the iframe front end
paths:
  /sessions/{id}:
    get:
      tags:
      - Internal
      summary: get a session
      operationId: getSessionById
      security: []
      description: Retrieve a session and its options for constructing an iframe
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      responses:
        '200':
          description: The session was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionOptionGet'
        '404':
          description: The sesssion was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sessions/{id}/tokens:
    post:
      tags:
      - Internal
      summary: get a token
      operationId: getToken
      security: []
      description: Get the token for a plaintext account number
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '201':
          description: The token was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Bad input parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The session was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '412':
          description: Payment method verification failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sessions/{id}/wallet/{walletid}/creditcards/{creditcardid}:
    patch:
      operationId: updateWalletCreditCard
      security: []
      tags:
      - Internal
      summary: update a credit card wallet entry
      description: This operation will update an existing credit card wallet entry with information collected from the buyer.
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      - name: walletid
        in: path
        description: Wallet ID
        required: true
        schema:
          $ref: '#/components/schemas/WalletID'
      - name: creditcardid
        in: path
        description: Credit Card Token
        required: true
        schema:
          $ref: '#/components/schemas/FundToken'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCardTokenUpdate'
      responses:
        '202':
          description: The wallet has been updated
        '400':
          description: Bad input parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session or wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      operationId: deleteWalletCreditCard
      security: []
      tags:
      - Internal
      summary: remove a credit card wallet entry
      description: This operation will remove an existing credit card entry from a wallet.
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      - name: walletid
        in: path
        description: Wallet ID
        required: true
        schema:
          $ref: '#/components/schemas/WalletID'
      - name: creditcardid
        in: path
        description: Credit Card Token
        required: true
        schema:
          $ref: '#/components/schemas/FundToken'
      responses:
        '202':
          description: The wallet has been updated
        '400':
          description: Bad input parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session or wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sessions/{id}/wallet/{walletid}/bankaccounts/{bankaccountid}:
    patch:
      operationId: updateWalletBankAccount
      security: []
      tags:
      - Internal
      summary: update a bank account wallet entry
      description: This operation will update an existing bank account wallet entry with information collected from the buyer.
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      - name: walletid
        in: path
        description: Wallet ID
        required: true
        schema:
          $ref: '#/components/schemas/WalletID'
      - name: bankaccountid
        in: path
        description: Bank Account Token
        required: true
        schema:
          $ref: '#/components/schemas/FundToken'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankAccountTokenUpdate'
      responses:
        '202':
          description: The wallet has been updated
        '400':
          description: Bad input parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session or wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      operationId: deleteWalletBankAccount
      security: []
      tags:
      - Internal
      summary: remove a bank account wallet entry
      description: This operation will remove an existing bank account entry from a wallet.
      parameters:
      - name: id
        in: path
        description: Session ID
        required: true
        schema:
          $ref: '#/components/schemas/SessionID'
      - name: walletid
        in: path
        description: Wallet ID
        required: true
        schema:
          $ref: '#/components/schemas/WalletID'
      - name: bankaccountid
        in: path
        description: Bank Account Token
        required: true
        schema:
          $ref: '#/components/schemas/FundToken'
      responses:
        '202':
          description: The wallet has been updated
        '400':
          description: Bad input parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session or wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CardAccountNumber:
      type: string
      example: '4111111111111111'
      pattern: ^\d{8,19}$
      description: The card account number
    ACH:
      description: Account information for an ACH transaction
      required:
      - accountNumber
      - routingNumber
      - checkType
      - accountType
      - accountHolder
      - currency
      properties:
        accountNumber:
          $ref: '#/components/schemas/BankAccountNumber'
        routingNumber:
          $ref: '#/components/schemas/BankRoutingNumber'
        checkType:
          $ref: '#/components/schemas/CheckType'
        accountType:
          $ref: '#/components/schemas/BankAccountType'
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        currency:
          $ref: '#/components/schemas/Currency'
    RejectAddressMismatch:
      type: boolean
      example: true
      description: Set custom avs protection rule to reject or allow credit card transactions with an address mismatch
    GiftCard:
      description: Account information for a gift card transaction
      required:
      - accountNumber
      - expirationMonth
      - expirationYear
      properties:
        accountNumber:
          $ref: '#/components/schemas/CardAccountNumber'
        expirationMonth:
          $ref: '#/components/schemas/CardExpirationMonth'
        expirationYear:
          $ref: '#/components/schemas/CardExpirationYear'
        pin:
          $ref: '#/components/schemas/PIN'
    GiftCardPaymentType:
      description: A credit card payment type definition
      properties:
        paymentType:
          $ref: '#/components/schemas/PaymentType'
      example:
        name: giftCard
        label: Gift Card
        promoted: false
        fields:
        - name: gcAccountNo
          label: Account Number
          errorLabel: Gift card number
        - name: expDate
          label: Expiration Date
          errorLabel: Expiration date
        - name: pin
          label: PIN
          errorLabel: PIN
    WalletID:
      type: string
      example: BA25BVH5HCRI
      pattern: ^[0-9A-Z]{12}$
      description: The wallet ID returned by a POST to /wallets
    RejectPostCodeMismatch:
      type: boolean
      example: true
      description: Set custom avs protection rule to reject or allow credit card transactions with a postal code mismatch
    TokenRequest:
      description: A request for a new token for the provided payment method
      required:
      - type
      properties:
        type:
          $ref: '#/components/schemas/PaymentMethod'
        addToWallet:
          type: boolean
          example: false
          description: Set this to true to add the payment method to the customer's wallet
        captchaToken:
          type: string
          example: abc123
          description: Send the Google reCaptcha token for verification.
      anyOf:
      - $ref: '#/components/schemas/CreditCard'
      - $ref: '#/components/schemas/ACH'
      - $ref: '#/components/schemas/GiftCard'
    BankAccountToken:
      description: Token information for a bank acocunt
      required:
      - token
      properties:
        token:
          $ref: '#/components/schemas/FundToken'
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        routingNumber:
          $ref: '#/components/schemas/BankRoutingNumber'
        accountNumberLastFour:
          $ref: '#/components/schemas/AccountNumberLastFour'
        currency:
          $ref: '#/components/schemas/Currency'
        editable:
          type: boolean
          example: true
          description: Set to true if the payment method should be editable by the customer
    RejectAVSUnknown:
      type: boolean
      example: true
      description: Set custom avs protection rule to reject or allow credit card transactions with a avs unknown
    BankAccountType:
      type: string
      enum:
      - checking
      - savings
      example: checking
      description: The type of account (checking or savings)
    BankAccountNumber:
      type: string
      example: '123456789'
      pattern: ^\d{4,34}$
      description: The demand deposit account number
    PaymentType:
      description: A payment type or method
      required:
      - name
      - label
      properties:
        name:
          $ref: '#/components/schemas/PaymentMethod'
        label:
          type: string
          example: Credit Card
          description: The payment method display name
        promoted:
          type: boolean
          example: false
          description: Set this option to true to display this payment method in a promoted fashion
        fields:
          $ref: '#/components/schemas/FieldOptions'
      additionalProperties:
        description: Reserved for future use
        oneOf:
        - type: object
        - type: boolean
        - type: integer
        - type: string
        - type: number
    FieldOptions:
      type: array
      description: A collection of field options
      items:
        $ref: '#/components/schemas/FieldOption'
    BankAccountTokenUpdate:
      description: Information for updating an existing bank account token
      properties:
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
    CardExpirationMonth:
      type: integer
      example: 12
      minimum: 1
      maximum: 12
      description: The expiration month, expressed as an integer from 1 (January) to 12 (December)
    SessionOptionBase:
      description: An option for a specific session
      additionalProperties:
        oneOf:
        - type: object
        - type: boolean
        - type: integer
        - type: string
        - type: number
      properties:
        fields:
          allOf:
          - $ref: '#/components/schemas/FieldOptions'
          - deprecated: true
        paymentTypes:
          $ref: '#/components/schemas/PaymentTypes'
        avsRules:
          $ref: '#/components/schemas/AVSOption'
    AVSOption:
      description: Merchant defined AVS fraud protection settings
      properties:
        rejectAddressMismatch:
          $ref: '#/components/schemas/RejectAddressMismatch'
        rejectPostCodeMismatch:
          $ref: '#/components/schemas/RejectPostCodeMismatch'
        rejectUnknown:
          $ref: '#/components/schemas/RejectAVSUnknown'
    PIN:
      type: string
      pattern: ^\d{3,12}$
      example: '123'
      description: The PIN
    AccountNumberLastFour:
      type: string
      example: '1234'
      pattern: ^\d{4}$
      description: The last four digits of the account number
    CheckType:
      type: string
      enum:
      - business
      - personal
      example: business
      description: The type of account (business or personal)
    CreditCardPaymentType:
      description: A credit card payment type definition
      properties:
        paymentType:
          $ref: '#/components/schemas/PaymentType'
      example:
        name: creditCard
        label: Payment Card
        promoted: false
        fields:
        - name: cardholderName
          label: Cardholder Name
          errorLabel: Cardholder name
        - name: accountNo
          label: Account Number
          errorLabel: Credit card number
        - name: expDate
          label: Expiration Date
          errorLabel: Expiration date
        - name: cvv
          label: Security Code
          errorLabel: Security code
    AccountHolder:
      type: string
      example: Jane Smith
      minLength: 1
      maxLength: 50
      pattern: ^\S(.*\S)?$
      description: The name of the cardholder
    WalletOptionsGet:
      allOf:
      - $ref: '#/components/schemas/WalletOptionsBase'
      - type: object
        properties:
          creditCardTokens:
            $ref: '#/components/schemas/CreditCardTokens'
          bankAccountTokens:
            $ref: '#/components/schemas/BankAccountTokens'
    SessionID:
      type: string
      format: uuid
      example: d290f1ee-6c54-4b01-90e6-d701748f0851
      pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
      description: The session ID returned by a POST to /sessions
    CardBrand:
      type: string
      example: visa
      enum:
      - visa
      - master
      - american_express
      - discover
      description: The card brand
    PaymentTypes:
      type: array
      items:
        anyOf:
        - $ref: '#/components/schemas/CreditCardPaymentType'
        - $ref: '#/components/schemas/ACHPaymentType'
        - $ref: '#/components/schemas/GiftCardPaymentType'
        - $ref: '#/components/schemas/ApplePayPaymentType'
      example:
      - name: creditCard
        label: Payment Card
        promoted: false
        fields:
        - name: cardholderName
          label: Cardholder Name
          errorLabel: Cardholder name
        - name: accountNo
          label: Account Number
          errorLabel: Credit card number
        - name: expDate
          label: Expiration Date
          errorLabel: Expiration date
        - name: cvv
          label: Security Code
          errorLabel: Security code
      - name: ach
        label: Bank Account
        promoted: false
        fields:
        - name: accountType
          label: Account Type
          errorLabel: Account type
        - name: checkType
          label: Check Type
          errorLabel: Check type
        - name: accountHolder
          label: Account Holder
          errorLabel: Account holder
        - name: routingNo
          label: Routing Number
          errorLabel: Routing number
        - name: achAccountNo
          label: Account Number
          errorLabel: Bank account number
      - name: giftCard
        label: Gift Card
        promoted: false
        fields:
        - name: gcAccountNo
          label: Account Number
          errorLabel: Gift card number
        - name: expDate
          label: Expiration Date
          errorLabel: Expiration date
        - name: pin
          label: PIN
          errorLabel: PIN
      - name: applePay
        label: ApplePay
        promoted: true
        fields:
        - name: applePay
        - label: applePay
        - errorLabel: applePay
    BankAccountTokens:
      type: array
      items:
        $ref: '#/components/schemas/BankAccountToken'
    SessionOptionGet:
      allOf:
      - type: object
        properties:
          wallet:
            $ref: '#/components/schemas/WalletOptionsGet'
      - $ref: '#/components/schemas/SessionOptionBase'
    CardExpirationYear:
      type: integer
      example: 2030
      minimum: 2020
      maximum: 2099
      description: The expiration year, expressed as a 4-digit year
    WalletOptionsBase:
      description: Options for wallet behavior
      properties:
        id:
          $ref: '#/components/schemas/WalletID'
        customerId:
          type: string
          example: 1NQGAW7N4S7H
          minLength: 1
          pattern: ^[0-9A-Z]+$
          description: Set this option to the desired customer id, this can be specified instead of a wallet id
        tokens:
          type: array
          description: An array of payment method tokens associated with the specified wallet ID or customer ID. Use this array to filter the contents of the wallet and only display the specified fund tokens.
          items:
            $ref: '#/components/schemas/FundToken'
        allowAdd:
          type: boolean
          example: true
          description: Set this option to true if the customer should be allowed to add new payment methods to the wallet
        allowEdit:
          type: boolean
          example: true
          description: Set this option to true if the customer should be allowed to edit existing wallet items
        allowDelete:
          type: boolean
          example: true
          description: Set this option to true if the customer should be allowed to remove items from the wallet
        saveByDefault:
          type: boolean
          example: true
          description: Set this option to true if the entry should be saved to the wallet by default
      example:
        id: BA25BVH5HCRI
        customerId: CUST12345
        tokens:
        - 1NQGAW7N4S7H
        allowAdd: true
        allowEdit: true
        allowDelete: true
        saveByDefault: false
    CreditCardTokens:
      type: array
      description: A collection of credit card tokens
      items:
        $ref: '#/components/schemas/CreditCardToken'
    CreditCard:
      description: Account information for a credit card transaction
      required:
      - accountNumber
      - expirationMonth
      - expirationYear
      properties:
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        accountNumber:
          $ref: '#/components/schemas/CardAccountNumber'
        expirationMonth:
          $ref: '#/components/schemas/CardExpirationMonth'
        expirationYear:
          $ref: '#/components/schemas/CardExpirationYear'
        cardVerificationValue:
          $ref: '#/components/schemas/CardVerificationValue'
    CardVerificationValue:
      type: string
      pattern: ^\d{3,4}$
      example: '123'
      description: The card verification value
    CreditCardToken:
      description: Token information for a credit card
      required:
      - token
      properties:
        token:
          $ref: '#/components/schemas/FundToken'
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        accountNumberLastFour:
          $ref: '#/components/schemas/AccountNumberLastFour'
        expirationMonth:
          $ref: '#/components/schemas/CardExpirationMonth'
        expirationYear:
          $ref: '#/components/schemas/CardExpirationYear'
        brand:
          $ref: '#/components/schemas/CardBrand'
        editable:
          type: boolean
          example: true
          description: Set to true if the payment method should be editable by the customer
    ACHPaymentType:
      description: A credit card payment type definition
      properties:
        paymentType:
          $ref: '#/components/schemas/PaymentType'
      example:
        name: ach
        label: Bank Account
        promoted: false
        fields:
        - name: accountType
          label: Account Type
          errorLabel: Account type
        - name: checkType
          label: Check Type
          errorLabel: Check type
        - name: accountHolder
          label: Account Holder
          errorLabel: Account holder
        - name: routingNo
          label: Routing Number
          errorLabel: Routing number
        - name: achAccountNo
          label: Account Number
          errorLabel: Bank account number
    CreditCardTokenUpdate:
      description: Information for updating an existing credit card token
      properties:
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        expirationMonth:
          $ref: '#/components/schemas/CardExpirationMonth'
        expirationYear:
          $ref: '#/components/schemas/CardExpirationYear'
        cardVerificationValue:
          $ref: '#/components/schemas/CardVerificationValue'
    PaymentMethod:
      type: string
      enum:
      - creditCard
      - ach
      - giftCard
      - applePay
      example: creditCard
      description: The payment type
    Currency:
      type: string
      example: USD
      pattern: ^[A-Z]{3}$
      description: The uppercase 3-letter ISO currency code
    FundToken:
      type: string
      example: 1NQGAW7N4S7H
      pattern: ^[0-9A-Z]{12}$
      description: The token associated with a funding source
    FieldOption:
      description: Options for a single field
      required:
      - name
      - label
      additionalProperties:
        description: Reserved for future use
        oneOf:
        - type: boolean
        - type: integer
        - type: string
        - type: number
      properties:
        name:
          type: string
          example: expDate
          description: Field name
        label:
          type: string
          example: Expiration Date
          description: Field display name
        placeholder:
          type: string
          example: MM / YY
          description: The placeholder shown on the form
        errorLabel:
          type: string
          example: Please check the Expiration Date
          description: The error message displayed for an invalid entry
        allowLabelUpdate:
          type: boolean
          example: true
          description: Set to true if the client-side code should be allowed to override the label
        id:
          type: string
          example: ddlExpDate
          minLength: 1
          description: The DOM ID of the field
    TokenResponse:
      type: object
      description: A response containing a token
      required:
      - token
      properties:
        token:
          $ref: '#/components/schemas/FundToken'
    BankRoutingNumber:
      type: string
      example: '123456780'
      pattern: ^\d{8,9}$
      description: The routing number of the financial institution
    Error:
      type: object
      description: Error
      properties:
        message:
          type: string
          example: not found
          description: The error message
        errors:
          type: array
          description: A collection of errors
          items:
            type: object
            description: An error
            properties:
              path:
                type: string
                example: /foo
                description: The path that generated the error
              message:
                type: string
                example: not found
                description: The error message
    ApplePayPaymentType:
      description: A credit card payment type definition
      properties:
        paymentType:
          $ref: '#/components/schemas/PaymentType'
      example:
        name: applePay
        label: ApplePay
        promoted: true
        fields:
        - name: applePay
        - label: applePay
        - errorLabel: applePay