curl --request POST \
--url https://api.example.com/card \
--header 'Content-Type: application/json' \
--data '
{
"id": "20218aae-b15e-406c-9e9f-23735cd86a48",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"programId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardholderId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"accountId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"plastic": {
"embossingName": "John Doe",
"preferredCardDeliveryType": "MAIL",
"preferredPinDeliveryType": "MAIL",
"manufacturerId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"externalLayoutCode": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"cardVersions": [
{
"status": "ACTIVE",
"expirationTime": "2030-08-31T23:59:59Z",
"renewalDate": "2023-12-25",
"sequenceNumber": 1,
"keySetId": "01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"role": "MAIN_CARD",
"mainCardId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardConfigurationCode": "MC_DEBIT_1",
"cardConfigurationType": "CREDIT",
"cardScheme": "MASTERCARD",
"maskedPan": "123456______4285",
"pinStatus": "GENERATED",
"cardStatus": "ACTIVE",
"automaticRenewal": true,
"digitalLayoutCode": 9,
"multiApplicationProperties": {
"applicationName": "Credit Application",
"applicationIndex": 1,
"contactPriorityLevel": 1,
"contactlessPriorityLevel": 1,
"printed": true,
"chipEnabled": true
},
"updateCount": 1,
"additionalValues": {
"keyWithPlainTextValue": "value1",
"keyWithBase64Value": "dmFsdWUyYmFzZTY0ZW5jb2RlZA=="
},
"feeConfigId": "SILVER"
}
'import requests
url = "https://api.example.com/card"
payload = {
"id": "20218aae-b15e-406c-9e9f-23735cd86a48",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"programId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardholderId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"accountId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"plastic": {
"embossingName": "John Doe",
"preferredCardDeliveryType": "MAIL",
"preferredPinDeliveryType": "MAIL",
"manufacturerId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"externalLayoutCode": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"cardVersions": [
{
"status": "ACTIVE",
"expirationTime": "2030-08-31T23:59:59Z",
"renewalDate": "2023-12-25",
"sequenceNumber": 1,
"keySetId": "01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"role": "MAIN_CARD",
"mainCardId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardConfigurationCode": "MC_DEBIT_1",
"cardConfigurationType": "CREDIT",
"cardScheme": "MASTERCARD",
"maskedPan": "123456______4285",
"pinStatus": "GENERATED",
"cardStatus": "ACTIVE",
"automaticRenewal": True,
"digitalLayoutCode": 9,
"multiApplicationProperties": {
"applicationName": "Credit Application",
"applicationIndex": 1,
"contactPriorityLevel": 1,
"contactlessPriorityLevel": 1,
"printed": True,
"chipEnabled": True
},
"updateCount": 1,
"additionalValues": {
"keyWithPlainTextValue": "value1",
"keyWithBase64Value": "dmFsdWUyYmFzZTY0ZW5jb2RlZA=="
},
"feeConfigId": "SILVER"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '20218aae-b15e-406c-9e9f-23735cd86a48',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
programId: '20218aae-b15e-406c-9e9f-23735cd86a48',
cardholderId: '20218aae-b15e-406c-9e9f-23735cd86a48',
accountId: '20218aae-b15e-406c-9e9f-23735cd86a48',
plastic: {
embossingName: 'John Doe',
preferredCardDeliveryType: 'MAIL',
preferredPinDeliveryType: 'MAIL',
manufacturerId: '20218aae-b15e-406c-9e9f-23735cd86a48',
externalLayoutCode: 1,
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
},
cardVersions: [
{
status: 'ACTIVE',
expirationTime: '2030-08-31T23:59:59Z',
renewalDate: '2023-12-25',
sequenceNumber: 1,
keySetId: '01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
],
role: 'MAIN_CARD',
mainCardId: '20218aae-b15e-406c-9e9f-23735cd86a48',
cardConfigurationCode: 'MC_DEBIT_1',
cardConfigurationType: 'CREDIT',
cardScheme: 'MASTERCARD',
maskedPan: '123456______4285',
pinStatus: 'GENERATED',
cardStatus: 'ACTIVE',
automaticRenewal: true,
digitalLayoutCode: 9,
multiApplicationProperties: {
applicationName: 'Credit Application',
applicationIndex: 1,
contactPriorityLevel: 1,
contactlessPriorityLevel: 1,
printed: true,
chipEnabled: true
},
updateCount: 1,
additionalValues: {
keyWithPlainTextValue: 'value1',
keyWithBase64Value: 'dmFsdWUyYmFzZTY0ZW5jb2RlZA=='
},
feeConfigId: 'SILVER'
})
};
fetch('https://api.example.com/card', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/card",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'programId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'cardholderId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'accountId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'plastic' => [
'embossingName' => 'John Doe',
'preferredCardDeliveryType' => 'MAIL',
'preferredPinDeliveryType' => 'MAIL',
'manufacturerId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'externalLayoutCode' => 1,
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
],
'cardVersions' => [
[
'status' => 'ACTIVE',
'expirationTime' => '2030-08-31T23:59:59Z',
'renewalDate' => '2023-12-25',
'sequenceNumber' => 1,
'keySetId' => '01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
],
'role' => 'MAIN_CARD',
'mainCardId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'cardConfigurationCode' => 'MC_DEBIT_1',
'cardConfigurationType' => 'CREDIT',
'cardScheme' => 'MASTERCARD',
'maskedPan' => '123456______4285',
'pinStatus' => 'GENERATED',
'cardStatus' => 'ACTIVE',
'automaticRenewal' => true,
'digitalLayoutCode' => 9,
'multiApplicationProperties' => [
'applicationName' => 'Credit Application',
'applicationIndex' => 1,
'contactPriorityLevel' => 1,
'contactlessPriorityLevel' => 1,
'printed' => true,
'chipEnabled' => true
],
'updateCount' => 1,
'additionalValues' => [
'keyWithPlainTextValue' => 'value1',
'keyWithBase64Value' => 'dmFsdWUyYmFzZTY0ZW5jb2RlZA=='
],
'feeConfigId' => 'SILVER'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/card"
payload := strings.NewReader("{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/card")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}"
response = http.request(request)
puts response.read_bodyCard Webhook
This is not an endpoint. This is the description of a request that is sent to subscribed webhooks upon card creation, update or closure.
curl --request POST \
--url https://api.example.com/card \
--header 'Content-Type: application/json' \
--data '
{
"id": "20218aae-b15e-406c-9e9f-23735cd86a48",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"programId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardholderId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"accountId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"plastic": {
"embossingName": "John Doe",
"preferredCardDeliveryType": "MAIL",
"preferredPinDeliveryType": "MAIL",
"manufacturerId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"externalLayoutCode": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"cardVersions": [
{
"status": "ACTIVE",
"expirationTime": "2030-08-31T23:59:59Z",
"renewalDate": "2023-12-25",
"sequenceNumber": 1,
"keySetId": "01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"role": "MAIN_CARD",
"mainCardId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardConfigurationCode": "MC_DEBIT_1",
"cardConfigurationType": "CREDIT",
"cardScheme": "MASTERCARD",
"maskedPan": "123456______4285",
"pinStatus": "GENERATED",
"cardStatus": "ACTIVE",
"automaticRenewal": true,
"digitalLayoutCode": 9,
"multiApplicationProperties": {
"applicationName": "Credit Application",
"applicationIndex": 1,
"contactPriorityLevel": 1,
"contactlessPriorityLevel": 1,
"printed": true,
"chipEnabled": true
},
"updateCount": 1,
"additionalValues": {
"keyWithPlainTextValue": "value1",
"keyWithBase64Value": "dmFsdWUyYmFzZTY0ZW5jb2RlZA=="
},
"feeConfigId": "SILVER"
}
'import requests
url = "https://api.example.com/card"
payload = {
"id": "20218aae-b15e-406c-9e9f-23735cd86a48",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"programId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardholderId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"accountId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"plastic": {
"embossingName": "John Doe",
"preferredCardDeliveryType": "MAIL",
"preferredPinDeliveryType": "MAIL",
"manufacturerId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"externalLayoutCode": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"cardVersions": [
{
"status": "ACTIVE",
"expirationTime": "2030-08-31T23:59:59Z",
"renewalDate": "2023-12-25",
"sequenceNumber": 1,
"keySetId": "01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"role": "MAIN_CARD",
"mainCardId": "20218aae-b15e-406c-9e9f-23735cd86a48",
"cardConfigurationCode": "MC_DEBIT_1",
"cardConfigurationType": "CREDIT",
"cardScheme": "MASTERCARD",
"maskedPan": "123456______4285",
"pinStatus": "GENERATED",
"cardStatus": "ACTIVE",
"automaticRenewal": True,
"digitalLayoutCode": 9,
"multiApplicationProperties": {
"applicationName": "Credit Application",
"applicationIndex": 1,
"contactPriorityLevel": 1,
"contactlessPriorityLevel": 1,
"printed": True,
"chipEnabled": True
},
"updateCount": 1,
"additionalValues": {
"keyWithPlainTextValue": "value1",
"keyWithBase64Value": "dmFsdWUyYmFzZTY0ZW5jb2RlZA=="
},
"feeConfigId": "SILVER"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '20218aae-b15e-406c-9e9f-23735cd86a48',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
programId: '20218aae-b15e-406c-9e9f-23735cd86a48',
cardholderId: '20218aae-b15e-406c-9e9f-23735cd86a48',
accountId: '20218aae-b15e-406c-9e9f-23735cd86a48',
plastic: {
embossingName: 'John Doe',
preferredCardDeliveryType: 'MAIL',
preferredPinDeliveryType: 'MAIL',
manufacturerId: '20218aae-b15e-406c-9e9f-23735cd86a48',
externalLayoutCode: 1,
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
},
cardVersions: [
{
status: 'ACTIVE',
expirationTime: '2030-08-31T23:59:59Z',
renewalDate: '2023-12-25',
sequenceNumber: 1,
keySetId: '01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
],
role: 'MAIN_CARD',
mainCardId: '20218aae-b15e-406c-9e9f-23735cd86a48',
cardConfigurationCode: 'MC_DEBIT_1',
cardConfigurationType: 'CREDIT',
cardScheme: 'MASTERCARD',
maskedPan: '123456______4285',
pinStatus: 'GENERATED',
cardStatus: 'ACTIVE',
automaticRenewal: true,
digitalLayoutCode: 9,
multiApplicationProperties: {
applicationName: 'Credit Application',
applicationIndex: 1,
contactPriorityLevel: 1,
contactlessPriorityLevel: 1,
printed: true,
chipEnabled: true
},
updateCount: 1,
additionalValues: {
keyWithPlainTextValue: 'value1',
keyWithBase64Value: 'dmFsdWUyYmFzZTY0ZW5jb2RlZA=='
},
feeConfigId: 'SILVER'
})
};
fetch('https://api.example.com/card', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/card",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'programId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'cardholderId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'accountId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'plastic' => [
'embossingName' => 'John Doe',
'preferredCardDeliveryType' => 'MAIL',
'preferredPinDeliveryType' => 'MAIL',
'manufacturerId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'externalLayoutCode' => 1,
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
],
'cardVersions' => [
[
'status' => 'ACTIVE',
'expirationTime' => '2030-08-31T23:59:59Z',
'renewalDate' => '2023-12-25',
'sequenceNumber' => 1,
'keySetId' => '01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
],
'role' => 'MAIN_CARD',
'mainCardId' => '20218aae-b15e-406c-9e9f-23735cd86a48',
'cardConfigurationCode' => 'MC_DEBIT_1',
'cardConfigurationType' => 'CREDIT',
'cardScheme' => 'MASTERCARD',
'maskedPan' => '123456______4285',
'pinStatus' => 'GENERATED',
'cardStatus' => 'ACTIVE',
'automaticRenewal' => true,
'digitalLayoutCode' => 9,
'multiApplicationProperties' => [
'applicationName' => 'Credit Application',
'applicationIndex' => 1,
'contactPriorityLevel' => 1,
'contactlessPriorityLevel' => 1,
'printed' => true,
'chipEnabled' => true
],
'updateCount' => 1,
'additionalValues' => [
'keyWithPlainTextValue' => 'value1',
'keyWithBase64Value' => 'dmFsdWUyYmFzZTY0ZW5jb2RlZA=='
],
'feeConfigId' => 'SILVER'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/card"
payload := strings.NewReader("{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/card")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"programId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardholderId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"accountId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"plastic\": {\n \"embossingName\": \"John Doe\",\n \"preferredCardDeliveryType\": \"MAIL\",\n \"preferredPinDeliveryType\": \"MAIL\",\n \"manufacturerId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"externalLayoutCode\": 1,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cardVersions\": [\n {\n \"status\": \"ACTIVE\",\n \"expirationTime\": \"2030-08-31T23:59:59Z\",\n \"renewalDate\": \"2023-12-25\",\n \"sequenceNumber\": 1,\n \"keySetId\": \"01b20ad2-3c2a-48d2-ac2e-5bf6d8b246cd\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"role\": \"MAIN_CARD\",\n \"mainCardId\": \"20218aae-b15e-406c-9e9f-23735cd86a48\",\n \"cardConfigurationCode\": \"MC_DEBIT_1\",\n \"cardConfigurationType\": \"CREDIT\",\n \"cardScheme\": \"MASTERCARD\",\n \"maskedPan\": \"123456______4285\",\n \"pinStatus\": \"GENERATED\",\n \"cardStatus\": \"ACTIVE\",\n \"automaticRenewal\": true,\n \"digitalLayoutCode\": 9,\n \"multiApplicationProperties\": {\n \"applicationName\": \"Credit Application\",\n \"applicationIndex\": 1,\n \"contactPriorityLevel\": 1,\n \"contactlessPriorityLevel\": 1,\n \"printed\": true,\n \"chipEnabled\": true\n },\n \"updateCount\": 1,\n \"additionalValues\": {\n \"keyWithPlainTextValue\": \"value1\",\n \"keyWithBase64Value\": \"dmFsdWUyYmFzZTY0ZW5jb2RlZA==\"\n },\n \"feeConfigId\": \"SILVER\"\n}"
response = http.request(request)
puts response.read_bodyDownload OpenAPI specification
Body
Card event
Unique identifier of a card.
"20218aae-b15e-406c-9e9f-23735cd86a48"
The date and time when the card was created.
The date and time when the object/entity was updated last time.
The program ID associated with the card.
"20218aae-b15e-406c-9e9f-23735cd86a48"
Unique identifier of the cardholder associated with the card.
"20218aae-b15e-406c-9e9f-23735cd86a48"
Unique identifier of the account associated with the card.
1 - 36^[a-zA-Z0-9-]+$"20218aae-b15e-406c-9e9f-23735cd86a48"
Show child attributes
Show child attributes
Card versions ordered by sequence number ascending.
Show child attributes
Show child attributes
The role of the card. Multi application cards will have one main card and multiple card applications. Single cards will be treated as main cards.
MAIN_CARD, CARD_APPLICATION "MAIN_CARD"
Unique identifier of the main card. Populated if this card is part of a card application
"20218aae-b15e-406c-9e9f-23735cd86a48"
A unique code to identify the card configuration. Max character limit is 36.
1 - 36^[A-Za-z0-9_-]+$"MC_DEBIT_1"
The type of card defined by this card configuration.
DEBIT, CREDIT, COMBO "CREDIT"
MASTERCARD, VISA "MASTERCARD"
A masked version of the primary account number
"123456______4285"
- GENERATED - A pin has been randomly generated for the card.
- WAITING - A pin is waiting to be set on the card.
- SET - A pin has been manually set on the card.
- INHERITED - For card applications only. The pin status is inherited from the main card.
GENERATED, WAITING, SET, INHERITED "GENERATED"
- ACTIVE - Card is active and is enabled for normal usage.
- BLOCKED - Card is temporarily blocked.
- BLOCKED_SUSPECTED_FRAUD - Card is temporarily blocked due to suspected fraud.
- CLOSED_DUE_TO_FRAUD - Card has been closed due to fraud.
- CLOSED_LOST - Card has been closed due to being lost.
- CLOSED_STOLEN - Card has been closed due to being stolen.
- CLOSED - Card has been manually closed.
- CLOSED_EXPIRED - Card has no active or initial card versions and cannot be used.
ACTIVE, BLOCKED, BLOCKED_SUSPECTED_FRAUD, CLOSED_DUE_TO_FRAUD, CLOSED_LOST, CLOSED_STOLEN, CLOSED, CLOSED_EXPIRED "ACTIVE"
A flag indicating whether automatic renewal is enabled or not.
The digital layout code for the card. Max character limit is 36.
1 - 36^[a-zA-Z0-9-]+$9
Show child attributes
Show child attributes
The version number of the entity.
1
You can include up to 30 additional key-value pairs in the embossing file sent to the card manufacturer.
- Keys must follow the pattern:
^[a-zA-Z0-9-]{1,36}$(only letters, numbers, and hyphens, with a maximum length of 36 characters). - Values must follow the pattern:
^[a-zA-Z0-9|\-_ +.@éàèùçâêîôûëïü'/=]{1,1000}$.
Enfuce does not perform any additional validation on these key-value pairs beyond ensuring they match the specified patterns.
These fields are intended for storing data without further processing. If you need to store a complex structure, you can base64 encode the value. The encoded value will be passed as entered, without modifications.
⚠ Important: Any usage of these fields should be agreed upon with the manufacturer.
Show child attributes
Show child attributes
{
"keyWithPlainTextValue": "value1",
"keyWithBase64Value": "dmFsdWUyYmFzZTY0ZW5jb2RlZA=="
}
Unique identifier of a fee configuration. When provided, this value overrides the program default. This feature must be enabled for the tenant; otherwise, this field can be left null and will not be used.
1 - 36^[a-zA-Z0-9_-]+$"SILVER"
Response
Event processed successfully.
Was this page helpful?

