Issue cards

The quick start allows you to get cards running quickly

The quick start guide assumes your Yordex contacts have already given you your sandbox account details, API keys, trader id and bank account id. If that isn't the case, please contact us.

In this guide we will focus on creating a card. In the next guide we will show you how to simulate a transaction in our test environment.

Create a cardholder

The card is assigned to a cardholder. This is how to create a cardholder.

curl {baseURL}/users  
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X POST  
-d '{
  "firstName": "John",
  "lastName": "Smith",
  "gender": "M",
  "email":"[email protected]",
  "roles":["ROLE_TRADER_STANDARD"],
  "mobileNumberCountryCode": "44",
  "mobileNumber": "7777123456"
}'

For more details please refer to the create user guide.

Create a virtual card

Once you have a cardholder, you can issue virtual or physical cards. A cardholder can have more than one card.

This is how you create a virtual card:

curl {baseURL}/cards
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X POST
-d '{
    "userId": ":user_id",
    "currency": "GBP",
    "accountId": ":account_id",
    "virtual": true,
    "multipleOrders": true,
    "createExpense": true
}'

The userId was returned in the response when creating the user above. multipleOrders and createExpense both true means that an order will be automatically created when a transaction is made on the card, see the getting started guide for an explanation of orders.

For more details please refer to the managing cards

View virtual card details

To view the card details you will need to call below two APIs.

First, call the API to get a URL

curl {baseURL}/cards/:cardId/paymentdetails?ipAddress=ip-address  
-H "Content-type: application/json"  
-X GET

The response will look like

{
  "url": "{baseURL}/cards/pan/:pan-id"
}

Now you can use this URL to get the card details

curl {baseURL}/cards/pan/:pan-id
-H "Content-type: application/json"  
-H "Authorization:your-api-key"  
-X GET

The response will look like this:

{  
  "card_name": "Frank Underwood",  
  "card_pan": "4000000000000000",  
  "card_exp_date": "2025-02-28",  
  "card_cvc2": "123"  
}

For more details refer to getting card details