v1

latestOpenAPI 3.1.02026-07-24270180.3 KB

Create a vault token

Create a new vault payment token representing user’s payment information.

post/v1/vault/payment_sources

Headers

x-user-secret-keystring required

Your API private/secret key. This can be found in the powerboard dashboard.

Content-Typestring required

Content-Type will always be application/json

Request body

tokenstring required

One-time token returned from the PowerBoard widget with all the payment source information

first_namestring

Customer's first name

last_namestring

Customer's last name

emailstring

The customer's email address

phonestring

The customer's phone number

address_line1string

Customer's address line 1

address_line2string

Customer's address line 2

address_statestring

Customer's address state

address_countrystring

Customer's address country

address_citystring

Customer's address city

address_postcodestring

Customer's address postcode

vault_type'session' | 'permanent'

The type of vault token you wish to create. Available values: 'permanent' or 'session'

typestring

Type of payment source, i.e. card

card_numberstring

The card number

expire_monthstring

The card expiration month, i.e. 08

expire_yearstring

The card expiration year, i.e. 2025

card_ccvstring

The card ccv number

store_ccvstring

A flag to be able to use a CCV value for the initial transaction

Response

200

statusinteger
{"stackTrail":"paths:/v1/vault/payment_sources:post:responses:200:content:application/json:schema:properties:error","oasType":"schema","type":"unknown"}

Example response

{
  "status": 201,
  "resource": {
    "type": "payment_source",
    "data": {
      "vault_token": "93a44003-1184-4f98-b539-ae6e7377fc78",
      "type": "card",
      "company_id": "678842c71cd4d8d8488a83f3",
      "card_name": "test 78676",
      "card_number_last4": "0008",
      "card_number_bin": "51234500",
      "card_scheme": "mastercard",
      "status": "active",
      "expire_month": 1,
      "expire_year": 2039,
      "created_at": "2025-02-07T05:09:44.848Z",
      "updated_at": "2025-02-07T05:10:02.787Z",
      "_source_ip_address": "130.41.2.221",
      "vault_ccv_stored": true,
      "vault_type": "permanent"
    }
  }
}