POST
/
api
/
v1
/
order
/
create
Create Physical Card Order
const url = 'https://api.gnosispay.com/api/v1/order/create';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"personalizationSource":"ENS","ENSName":"<string>","shippingAddress":{"address1":"<string>","address2":"<string>","city":"<string>","postalCode":"<string>","country":"BR"},"virtual":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "id": "<string>",
  "transactionHash": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "status": "PENDINGTRANSACTION",
  "personalizationSource": "KYC",
  "embossedName": "<string>",
  "address1": "<string>",
  "address2": "<string>",
  "city": "<string>",
  "country": "<string>",
  "postalCode": "<string>",
  "state": "<string>",
  "couponCode": "<string>",
  "totalAmountEUR": 123,
  "totalDiscountEUR": 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
personalizationSource
enum<string>
required
Available options:
ENS
ENSName
string
required
Maximum length: 24
shippingAddress
object | null
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
required
transactionHash
string
embossedName
string
address1
string
address2
string
city
string
country
string
postalCode
string
state
string
couponCode
string
totalAmountEUR
number
virtual
boolean