Create card
curl --request POST \
--url https://api.opencard.io/api/v1/issuers/{slug}/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "12345",
"last_four": "1234",
"bin_number": "123456",
"liability": "corporate_with_personal_invoice",
"scheme": "visa",
"funding": "credit",
"issuer_organization_number": "5555555551",
"issuer_country_code": "SE",
"identity": {
"ssn": "190001011111",
"ssn_country_code": "SE",
"name": "Test Testsson",
"company_organization_number": "5555555555",
"company_country_code": "SE"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '12345',
last_four: '1234',
bin_number: '123456',
liability: 'corporate_with_personal_invoice',
scheme: 'visa',
funding: 'credit',
issuer_organization_number: '5555555551',
issuer_country_code: 'SE',
identity: {
ssn: '190001011111',
ssn_country_code: 'SE',
name: 'Test Testsson',
company_organization_number: '5555555555',
company_country_code: 'SE'
}
})
};
fetch('https://api.opencard.io/api/v1/issuers/{slug}/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/issuers/{slug}/cards"
payload = {
"id": "12345",
"last_four": "1234",
"bin_number": "123456",
"liability": "corporate_with_personal_invoice",
"scheme": "visa",
"funding": "credit",
"issuer_organization_number": "5555555551",
"issuer_country_code": "SE",
"identity": {
"ssn": "190001011111",
"ssn_country_code": "SE",
"name": "Test Testsson",
"company_organization_number": "5555555555",
"company_country_code": "SE"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/issuers/{slug}/cards",
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' => '12345',
'last_four' => '1234',
'bin_number' => '123456',
'liability' => 'corporate_with_personal_invoice',
'scheme' => 'visa',
'funding' => 'credit',
'issuer_organization_number' => '5555555551',
'issuer_country_code' => 'SE',
'identity' => [
'ssn' => '190001011111',
'ssn_country_code' => 'SE',
'name' => 'Test Testsson',
'company_organization_number' => '5555555555',
'company_country_code' => 'SE'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"ok": true,
"cardId": "12345",
"created": false
}{
"ok": true,
"cardId": "12345",
"created": true
}Cards
Create card
POST
/
api
/
v1
/
issuers
/
{slug}
/
cards
Create card
curl --request POST \
--url https://api.opencard.io/api/v1/issuers/{slug}/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "12345",
"last_four": "1234",
"bin_number": "123456",
"liability": "corporate_with_personal_invoice",
"scheme": "visa",
"funding": "credit",
"issuer_organization_number": "5555555551",
"issuer_country_code": "SE",
"identity": {
"ssn": "190001011111",
"ssn_country_code": "SE",
"name": "Test Testsson",
"company_organization_number": "5555555555",
"company_country_code": "SE"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '12345',
last_four: '1234',
bin_number: '123456',
liability: 'corporate_with_personal_invoice',
scheme: 'visa',
funding: 'credit',
issuer_organization_number: '5555555551',
issuer_country_code: 'SE',
identity: {
ssn: '190001011111',
ssn_country_code: 'SE',
name: 'Test Testsson',
company_organization_number: '5555555555',
company_country_code: 'SE'
}
})
};
fetch('https://api.opencard.io/api/v1/issuers/{slug}/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/issuers/{slug}/cards"
payload = {
"id": "12345",
"last_four": "1234",
"bin_number": "123456",
"liability": "corporate_with_personal_invoice",
"scheme": "visa",
"funding": "credit",
"issuer_organization_number": "5555555551",
"issuer_country_code": "SE",
"identity": {
"ssn": "190001011111",
"ssn_country_code": "SE",
"name": "Test Testsson",
"company_organization_number": "5555555555",
"company_country_code": "SE"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/issuers/{slug}/cards",
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' => '12345',
'last_four' => '1234',
'bin_number' => '123456',
'liability' => 'corporate_with_personal_invoice',
'scheme' => 'visa',
'funding' => 'credit',
'issuer_organization_number' => '5555555551',
'issuer_country_code' => 'SE',
'identity' => [
'ssn' => '190001011111',
'ssn_country_code' => 'SE',
'name' => 'Test Testsson',
'company_organization_number' => '5555555555',
'company_country_code' => 'SE'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"ok": true,
"cardId": "12345",
"created": false
}{
"ok": true,
"cardId": "12345",
"created": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Issuer slug assigned by OpenCard
Body
application/json
Maximum string length:
4Available options:
personal, corporate, corporate_with_personal_invoice Required string length:
2Show child attributes
Show child attributes
Card funding — delivered to EMS as webhook field card_funding
Available options:
debit, credit Response
Already exists
⌘I

