Create Physical Card Process

1

Create a Card Order

This endpoint creates a new CardOrder with the status of PENDINGTRANSACTION:
cURL
curl -X POST /api/v1/order/create
The Card Order is created with the following data:
  • A shipping address can be specified by filling the shippingAddress field, see endpoint specifications. If not set, the KYC address will be used for shipping.
  • The total amount to be paid is set in EURe. The amount is 30.23.
  • A coupon code can be applied to reduce the amount to be paid, either at signup or in the next step
2

(Optional) Attach a Coupon

This endpoint attaches a coupon to the CardOrder with orderId:
cURL
curl -X POST /api/v1/order/{orderId}/attach-coupon
The coupon needs to be valid, otherwise an error is thrown. If the user has a coupon code both from the signup, and from this step, the one from the signup takes precedence.
3

(Optional) Attach an on-chain transaction

This is only needed if the card is not free. If CardOrder.totalAmountEUR is the same as the CardOrder.totalDiscountEUR then the card is considered free.
This endpoint allows setting a transaction hash to the specified orderId.
cURL
curl -X PUT /api/v1/order/{orderId}/attach-transaction \
-d '{
  "transactionHash": "0x..."
}'
The transaction can only be used once across all card orders.
4

Confirm the payment was performed

This endpoint must be called even if the card is free. It moves the card order to the READY status.
To confirm the payment call this endpoint:
cURL
curl -X PUT /api/v1/order/{orderId}/confirm-payment
The conditions for the payment are:
  • In order to call this endpoint, the CardOrder.status needs to be PENDINGTRANSACTION.
  • If the card is not free, we check if a payment was done.
    • Token used for payment needs to be EURe 0xcB444e90D8198415266c6a2724b7900fb12FC56E.
    • Payment was done to 0x3D4FD6a1A7a1382ae1d62C3DD7247254a0236847.
    • The respective EURe amount was paid in that transaction hash (partial transfers are not supported).
If all the conditions above are met, the CardOrder.status is set to READY.
5

Create the Physical Card

Finally, you can create the Physical Card:
cURL
curl -X POST /api/v1/order/:orderId/create-card
When successful, this endpoint returns the cardToken from the newly created card.In order to create a Card out of a CardOrder the following conditions need to be met:
  • No cards were created out of this orderId.
  • User needs to have a verified phone number.
  • User needs to have a name set.
  • User needs to be from a supported country.
  • User address needs to be set.
  • User needs to have an approved KYC.
  • The risk score needs to be Green or Orange based on the user’s answers to the Source of funds questionnaire.
  • User needs to have the shipping details for the physical card order set.
    • The shipping details can be different from the KYC address, as long as it is in the same country.
    • Virtual cards do not require a shipping address.
  • The embossed name for the card needs to be set.
6

Set the Card PIN using the Partner Secure Elements (PSE)

The card PIN should be set immediately after the card is created via the Partner Secure Elements (PSE). Use the cardToken returned from the previous endpoint to set the PIN. If a PIN is not provided upon creation, a random one will be assigned. Changing this randomly assigned PIN requires the user to visit an ATM. Refer to the card PINs section to learn more about the online and offline PINs.For detailed instructions about how to change the PIN, please refer to the PSE SDK documentation.