Now that we have an account opened, we can issue a card and attach it to the account. We will do it via the card_create API request. After enrolling into Paynetics platform you will be ablet to programmatically issue physical or virtual cards for businesses. The API enables the assignment of the card to the corresponding business account, configuration of card settings (e.g., spending limits), and generation of card credentials. This allows for convenient and automated card issuance for businesses.
Utilization of the API:
For this use case, as we mentioned, you will need to use the card_create request. We will proceed with issuing a card and assigning it the the account we opened for the business.
For full API specification and example of the request check the following URL - Paynetics card_create API documentation
Example request:
{
"program": "card_eur",
"account": "202f828a-c594-436d-b753-87c47556ef11", // We place the unique token ID of the account that we created
"merchant": "", // Merchant field is not needed as the system knows under which business this account was opened
"user": "", // User token is not needed as we do not assign the card to a particular user
"aml": "b204ac3f-a23e-442b-a909-898238197070",
"emboss_name": "John Doe",
"emboss_name_line4": "JohnDoe Ltd",
"fulfil1": "123456",
"fulfil2": "789123",
"thermal_line1": "123456",
"thermal_line2": "789123",
"active": false, // This can be set to true if we want the card to be activated right after it was issued
"pin": "1234", // Field is used if we want to set a particular PIN for the card
"type": "physical", // As we want to issue a physical card we do so through this field
"first_name": "John",
"last_name": "Doe",
"alias": "Company travel expense Card", // Now we have marked what is the main purpose of the card, by filling in the alias field
"delivery_details": {
"city": "Sofia",
"country": "BG",
"county": "Sofia Grad",
"zip": "1407",
"address1": "James Bouchier 76A",
"method": "string",
"code": "string",
"mobile_phone": "+3590000000"
},
"three_domain_enrolment": { // You can have both 3DS authentication methods configured but only one will be active at a given time. Those can be switched between
"otp_sms": "+3590000000",
"biometric": true
}
}Keep in mind that if the card is attached to a specific account, automatically the program for the account will be selected even if you point out program in the field when using card_create request.
Paynetics`s system is aware under which business, the account we are attaching the card to, was opened so we don`t need to place the merchant token.
Example response:
{
"code": 0,
"data": {
"program": "account_eur",
"token": "202f828a-c594-436d-b753-87c47556ef11",
"merchant": "68f63588-2859-4997-8a23-29c59223e6ba",
"user": "5eef34b5-69d8-4596-a9d3-b3aad500e825",
"type": "default",
"number": "0123456789",
"link_key": "1234",
"is_main": true,
"status": "active",
"multicurrency": false,
"balances": [
{
"available": 1.23,
"blocked": 1.23,
"currency": "EUR",
"token": "338e7368-4800-40ad-a4db-2e3df401087b",
"iban": "BG31PATC4002115468108680",
"sort_code": "123456",
"account_number": "12345678",
"number": "0123456789",
"is_main": true
}
]
}
}The response will give us all the relevant data for the card, we need to confirm that the account was opened properly. This will include the merchant token for validation purposes, although it was not sent in the request itself.
Issue a Second Card for an account
Now there are cases where we might want to have more than one card attached to the same account, but there is a caveat. Which we will explain now.
Paynetic`s system has a rule where only 1 active card, can be assigned to an active account. In this sense if you want to issue multiple cards under the account, what needs to happen is to open a new account, which will be linked to the the 1st one.
This account will be virtual and is linked to one main account and does not hold a balance. Instead, they are using the primary (main) account balance. So as an overview – we issue linked account and then issue a card which we assign to the linked account.
Utilization of the API:
This can be done through the account_create request only in the field “main” you must place the unique token ID for the main account “under” which the new account will be placed.
Example request:
{
"program": "account_eur",
"merchant": "242d993a-be0e-461d-b9e4-7c84b8bfff4f", // we fill in the merchant token so that we point out under which business we want the account to be created
"user": "", // as we do not want the account to be opened under a specific user field should be left empty
"main": "202f828a-c594-436d-b753-87c47556ef11", // now for the 2nd account, we are placing the unique token ID of the account to which we want to attach it. We use the token id of the account we previously created
"skip_iban_generation": false, // in this case we want the account to have an IBAN too, so we keep the value “false”
"alias": "Company expenses 2nd" // With this alias the company can easily see what is this account used for
}Example response:
{
"code": 0,
"data": {
"program": "account_eur",
"token": "202f828a-c594-436d-b753-87c475tttttt",
"merchant": "68f63588-2859-4997-8a23-29c59223e6ba",
"user": "",
"type": "default",
"number": "0123456789",
"is_main": false,
"status": "active",
"multicurrency": false,
"balances": [
{
"available": 1.23,
"blocked": 1.23,
"currency": "EUR",
"token": "338e7368-4800-40ad-a4db-2e3df401087b", // The linked account will use the balance of the main account so the same token will be provided
"iban": "BG31PATC4002115468108680",
"sort_code": "123456",
"account_number": "12345678",
"number": "0123456789",
"is_main": true
}
]
}
}Again, in the response for account creation you will see the standard info for the account: account number, status of the account, which is by default active, available balance, IBAN if such was generated, currency of the account, unique account token ID, Account Sort code
Now you can use the unique token ID from the response to issue additional card, which created in this way will be using the balance of the main account.
Issue a second card with card_create
We have opened a linked account, which we will use to issue the 2nd card.
The difference with the previous card_create request is that in the 2nd we place the unique token ID of the linked account in the account field. T
hus the 1st and the 2nd card will use the balance of the main account.
Example request:
{
"program": "card_eur",
"account": "202f828a-c594-436d-b753-87c475tttttt", // We place the unique token ID of the alinked account that we created
"merchant": "", // Merchant field is not needed as the system knows under which business this account was opened
"user": "", // User token is not needed as we do not assign the card to a particular user
"aml": "b204ac3f-a23e-442b-a909-898238197070",
"emboss_name": "John Doe",
"emboss_name_line4": "JohnDoe Ltd",
"fulfil1": "123456",
"fulfil2": "789123",
"thermal_line1": "123456",
"thermal_line2": "789123",
"active": false, // This can be set to true if we want the card to be activated right after it was issued
"pin": "1234", // Field is used if we want to set a particular PIN for the card
"type": "physical", // As we want to issue a physical card we do so through this field
"first_name": "John",
"last_name": "Doe",
"alias": "Company travel expense Card 2", // Now we have marked what is the main purpose of the card, by filling in the alias field
"delivery_details": {
"city": "Sofia",
"country": "BG",
"county": "Sofia Grad",
"zip": "1407",
"address1": "James Bouchier 76A",
"method": "string",
"code": "string",
"mobile_phone": "+3590000000"
},
"three_domain_enrolment": {
"otp_sms": "+3590000000",
"biometric": true
}
}Example response:
{
"code": 0,
"data": {
"program": "account_eur",
"token": "202f828a-c594-436d-b753-87c47556ef11",
"merchant": "68f63588-2859-4997-8a23-29c59223e6ba",
"user": "5eef34b5-69d8-4596-a9d3-b3aad500e825",
"type": "default",
"number": "0123456789",
"link_key": "1234",
"is_main": false,
"status": "active",
"multicurrency": false,
"balances": [
{
"available": 1.23,
"blocked": 1.23,
"currency": "EUR",
"token": "338e7368-4800-40ad-a4db-2e3df401087b",
"iban": "BG31PATC4002115468108680",
"sort_code": "123456",
"account_number": "12345678",
"number": "0123456789",
"is_main": false
}
]
}
The only difference in the card create response in this case, is that the card and account now are not main, as we used the unique token for the linked account. So now we have one main account with card, one virtual account linked to the main with a card and they use the same balance.