Create an online credit card vault

Overview

This endpoint is used to create vaults that store data representing a credit card.

A creditCard object is expected in the request with the follow fields:

creditCard: The credit card to store
expiryMonth: The expiry month of the card
Type: integer
Values: [1-12]
Presence: required
expiryYear: The expiry year of the card
Type: integer
Values: 4-digit integer e.g. 2018
Presence: required
name: The cardholder's name
Type: string
Max length: 30
Presence: required
number: The card number (Must pass Luhn algorithm FAQ)
Type: string
Values: [0-9]
Min length: 8
Max length: 19
Presence: required

As this is an online vault endpoint, the request may contain the fields:
- (required) device: The device information associated with this vault. Device Fingerprinting
- (optional) hashedPin: Extra field to increase the level of security of the vault. FAQ
For more information about online vaults see here.

Additionally the user may create metadata tags for their vault.

metadata {: Add metadata tags to the vault. FAQ

This JSON Object contains key/value pairs, with each pair representing a metadata tag.

Type: JSON Object
Format: <key>: <value>
Presence: optional
Max Key/Value pairs: 50
<key>: The key of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: required
Min length: 1
Max length: 32
<value>: The value of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: optional
Min length: 0
Max length: 255

Structure

{
application {: The application details
Type: JSON Object
Presence: required
apiKey: The application's api key
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
uuid: The application's uuid
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
device {: Contains the end-user's device metrics. Device Fingerprinting
Type: JSON Object
Presence: required
browserType: Type of browser on the end-user's device
Type: string
Value: alphanumeric, dash, underscore, space
Min length: 2
Presence: required
browserVersion: Version of the browser on the end-user's device
Type: string
Value: numeric, dots
Min length: 2
Presence: required
osType: Operating System on the end-user's device
Type: string
Value: alphanumeric, dash, underscore, space
Min length: 2
Presence: required
fonts [: Fonts on the end-user's device
Type: Array of string
Min length: 1
Presence: required
username: The username that this vault is associated with. FAQ
Type: string
Values: alphanumeric, dashes, spaces, underscores
Min length: 1
Max length: 64
Presence: required
externalRef: Your reference to this operation for audits. FAQ
Type: string
Values: utf8
Min length: 1
Max length: 64
Presence: optional
vault {: The vault to create
Type: JSON Object
Presence: required
creditCard {: Contains the credit card details to store
Type: JSON Object
Presence: required
expiryMonth: The expiry month of the card
Type: integer
Values: [1-12]
Presence: required
expiryYear: The expiry year of the card
Type: integer
Values: 4-digit integer e.g. 2018
Presence: required
name: The cardholder's name
Type: string
Max length: 30
Presence: required
number: The card number (Must pass Luhn algorithm FAQ)
Type: string
Values: [0-9]
Min length: 8
Max length: 19
Presence: required
name: The name of the vault
Type: string
Values: utf8
Min length: 1
Max length: 64
Presence: required
hashedPin: Value to secure this vault. For more information about the hashedPin see here.
Type: string
Values: base64
Presence: optional
metadata {: Add metadata tags to the vault. FAQ

This JSON Object contains key/value pairs, with each pair representing a metadata tag.

Type: JSON Object
Format: <key>: <value>
Presence: optional
Max Key/Value pairs: 50
<key>: The key of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: required
Min length: 1
Max length: 32
<value>: The value of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: optional
Min length: 0
Max length: 255
}
{
responseStatus {: Contains details about the response status
Type: JSON Object
Presence: required
code: The response status code
Type: optional
Values: alphanumeric, dashes
Presence: optional
detailedErrors [{: Contains error details if any error(s) occurred
Type: Array of JSON Objects
Presence: optional
errorReasons [: Contains reasons for the parent detailed error
Type: Array of string
Presence: optional
property: The JSON property in the request responsible for the parent detailed error
Type: string
Presence: optional
message: The response message
Type: string
Values: see Sanctum error messages
Presence: optional
status: The response status
Type: string
Values: ERROR, SUCCESS
Presence: required
vault {: Contains the details of the created vault
Type: JSON Object
Presence: required
credentials {: Contains the credentials required for further use of the created vault
Type: JSON Object
Presence: required
encryptedData: The vault's encryptedData
Type: string
Presence: required
payload: The vault's payload
Type: string
Presence: required
uuid: The uuid of the created vault
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
}

Usage

API used
POST /sanctum/v1-2/vault/credit-card/online