Skip to main content
POST
/
api
/
v1
/
order
/
{orderId}
/
create-card
Create a Physical Card
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    pinData: {encryptedKey: 'encryptedKey', encryptedPin: 'encryptedPin', iv: 'iv'},
    transactionHash: '0x1234567890123456789012345678901234567890123456789012345678901234',
    couponCode: 'COUPON_CODE'
  })
};

fetch('https://api.valox.co/api/v1/order/{orderId}/create-card', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
"success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

orderId
string
required

The unique identifier of the card order.

Example:

"1234"

Body

application/json
pinData
object

Optional PIN data for the card

transactionHash
string

Transaction hash for card payment. Required for paid cards. Must be in hexadecimal format (0x...).

Example:

"0x1234567890123456789012345678901234567890123456789012345678901234"

couponCode
string

Optional coupon code for discount

Example:

"COUPON_CODE"

Response

The card was created successfully

success
boolean
Example:

true

cardToken
string

The token of the created card

Example:

"1234567890"