Skip to content
Navigation

Tokenize a sealed card

POST
https://api.nicer.travel/tokenization

Opens a card envelope the checkout sealed in the browser to the card intake key, validates the card and stores it encrypted, and answers its brand, last four digits and payment method id. Any signed-in person may call it: commerce authorizes the card for them before the envelope is opened. The same handler serves POST /tokenization/payment-link for a payment-link session.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Request body JSON required

  • sealed
    object
    required
    • v
      number
      required
    • alg
      string
      required
    • kid
      string
      required
      minLength: 1
    • wrappedKey
      string
      required
      minLength: 1
    • nonce
      string
      required
      minLength: 1
    • ciphertext
      string
      required
      minLength: 1
  • paymentMethodId
    optional
    string
    pattern: ^paym_.*
  • saveMethod
    optional
    boolean
  • saveOnly
    optional
    boolean

Returns

200

OK

JSON
  • brand
    visa
    or
    mastercard
    or
    amex
    or
    discover
    or
    unionpay
    required
  • last4
    string
    required
    pattern: ^\d{4}$
  • paymentCredentialId
    required

    Any of the following:

    • string
    • null
  • paymentMethodId
    string
    required
    pattern: ^paym_.*
  • source
    NICER#AUTHORIZATION_FORM
    or
    NICER#PAYMENT_LINK
    required

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close