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
}
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
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Card order created successfully
The response is of type object
.