Skip to main content
POST
/
api
/
v1
/
order
/
create
Create Physical Card Order
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    personalizationSource: 'ENS',
    ENSName: '<string>',
    shippingAddress: {
      address1: '<string>',
      city: '<string>',
      postalCode: '<string>',
      country: 'BR',
      address2: '<string>'
    },
    virtual: false
  })
};

fetch('https://api.valox.co/api/v1/order/create', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "status": "PENDINGTRANSACTION",
  "personalizationSource": "KYC",
  "totalDiscountEUR": 123,
  "transactionHash": "<string>",
  "embossedName": "<string>",
  "address1": "<string>",
  "address2": "<string>",
  "city": "<string>",
  "country": "<string>",
  "postalCode": "<string>",
  "state": "<string>",
  "couponCode": "<string>",
  "totalAmountEUR": 123,
  "virtual": true
}

Authorizations

Authorization
string
header
required

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

Body

application/json
  • Option 1
  • Option 2
personalizationSource
enum<string>
required
Available options:
ENS
ENSName
string
required
Maximum string length: 24
shippingAddress
object
virtual
boolean
default:false

Response

Card order created successfully

id
string
required
createdAt
string<date-time>
required
status
enum<string>
required

Current order status in the state machine. See the state transition diagram in the documentation for valid transitions.

Available options:
PENDINGTRANSACTION,
TRANSACTIONCOMPLETE,
CONFIRMATIONREQUIRED,
READY,
CARDCREATED,
FAILEDTRANSACTION,
CANCELLED
Example:

"PENDINGTRANSACTION"

personalizationSource
enum<string>
required
Available options:
KYC,
ENS
totalDiscountEUR
number<double>
required
transactionHash
string
embossedName
string
address1
string
address2
string
city
string
country
string
postalCode
string
state
string
couponCode
string
totalAmountEUR
number<double>
virtual
boolean