Card
All the necessary APIs to manage a card.
Create card
This API allows you to create a card with crypto.
Note: This API initializes a card with a "pending" status and returns a crypto address in the response. You should display this address to your users along with payment instructions, and the address should be funded within 24 hrs of being generated. After the deposit is processed, the card status will change to "success," and the deposited amount will be credited to the card.
This crypto address expires after 24 hours. If no deposit is recieve the address becomes invalid, and any funds sent to it are lost. However, if the payment is recieve within 24 hours, the address becomes active and linked to the card forever. The user can send future deposits to the address and it will credited to the card. You can always get this address using the get card crypto address endpoint.
Also, Palremit automatically charges $2 for card creation. If a user deposits $10, the new card will be pre-funded with $8. If you prefer not to pass this cost on to your users, we can deduct the card creation fee from your Business wallet. Additionally, you can customize the card creation fee by contacting sales to configure it.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/create_card_with_crypto' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data '{
"cardholder_id": "123f9df497e64e908b1db05f0f2f0beb",
"card_type": "virtual",
"card_brand": "Visa2",
"card_currency": "USD",
"crypto_amount": "10",
"crypto_currency": "USDT",
"crypto_network": "tron",
"crypto_token": "trc20",
"meta_data": {"user_id": "142"}
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/issuing/cards/create_card_with_crypto"
payload = json.dumps({
"cardholder_id": "123f9df497e64e908b1db05f0f2f0beb",
"card_type": "virtual",
"card_brand": "Visa2",
"card_currency": "USD",
"crypto_amount": "10",
"crypto_currency": "USDT",
"crypto_network": "tron",
"crypto_token": "trc20",
"meta_data": {
"user_id": "142"
}
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/create_card_with_crypto',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
},
body: JSON.stringify({
"cardholder_id": "123f9df497e64e908b1db05f0f2f0beb",
"card_type": "virtual",
"card_brand": "Visa2",
"card_currency": "USD",
"crypto_amount": "10",
"crypto_currency": "USDT",
"crypto_network": "tron",
"crypto_token": "trc20",
"meta_data": {
"user_id": "142"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/create_card_with_crypto');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "cardholder_id": "123f9df497e64e908b1db05f0f2f0beb",
\n "card_type": "virtual",
\n "card_brand": "Visa2",
\n "card_currency": "USD",
\n "crypto_amount": "10",
\n "crypto_currency": "USDT",
\n "crypto_network": "tron",
\n "crypto_token": "trc20",
\n "meta_data": {"user_id": "142"}
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/create_card_with_crypto"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"cardholder_id": "123f9df497e64e908b1db05f0f2f0beb",`+"
"+`
"card_type": "virtual",`+"
"+`
"card_brand": "Visa2",`+"
"+`
"card_currency": "USD",`+"
"+`
"crypto_amount": "10",`+"
"+`
"crypto_currency": "USDT",`+"
"+`
"crypto_network": "tron",`+"
"+`
"crypto_token": "trc20",`+"
"+`
"meta_data": {"user_id": "142"}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Body
cardholder_id : String *required
card_type (can either be "virtual" or "physical") : String *required
card_brand (can either be "Mastercard" or "Visa") : String *required
card_currency (can either be "USD" or "NGN") : String *required
meta_data : Dictionary *Optional
Response
🟢 200: Payment initiated successfully.
{
"status": "success",
"message": "Payment initiated successfully",
"data": {
"crypto_to_usd": 10,
"card": {
"cardholder_id": "589f9df497e64e908b1db05f0f2f0beb",
"card_id": "bfbe11cd-c85a-47d1-b336-7088bb50f62a",
"card_type": "virtual",
"card_brand": "Visa2",
"card_currency": "USD",
"card_creation_fee": 0,
"card_meta": {
"meta_data": {
"user_id": "142"
},
"initial_card_id": "bfbe11cd-c85a-47d1-b336-7088bb50f62a"
},
"first_deposit": 10,
"first_deposit_fee": 0,
"first_balance": 8,
"is_active": true,
"issuing_status": "pending",
"_id": "65ce4a8474396c863243c1ea",
"createdAt": "2024-02-15T17:31:48.483Z",
"updatedAt": "2024-02-15T17:31:48.483Z",
"__v": 0
},
"cardCryptoAddress": {
"business": "65cdec414d11c5aa12ae721a",
"cardholder_id": "589f9df497e64e908b1db05f0f2f0beb",
"card_id": "bfbe11cd-c85a-47d1-b336-7088bb50f62a",
"address": "TAewh6KySF879DtuDBngT5pwr7DLGT4RdW",
"currency": "USDT",
"token": "trc20",
"network": "tron",
"public_key": "xpub6F1yFW5gchsbUZNNfwwukUio6GZBvytCwG4fqn6XuJXvxLQwLCWEqNhjx8ctLS1nZmNriujhsbtHHw6PDZ72yGzwQJ6Gq2mxymybLuyAVNf",
"_id": "65ce4a8474396c863243c1ec",
"createdAt": "2024-02-15T17:31:48.701Z",
"updatedAt": "2024-02-15T17:31:48.701Z",
"__v": 0
}
}
}
Note:
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Get card crypto address
This API allows you to get the crypto address that is associated with the card.
Note: This address is the same as the one generated during the card creation process. If for some reason, the fund is sent to the address but the card is not credited, the fund will be remitted to your business wallet.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/topup_with_crypto' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data '{
"card_id": "4b8b313329234c46929d1b728e230d7a",
"currency": "USDT",
"network": "tron",
"token": "trc20"
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/issuing/cards/topup_with_crypto"
payload = json.dumps({
"card_id": "4b8b313329234c46929d1b728e230d7a",
"currency": "USDT",
"network": "tron",
"token": "trc20"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/topup_with_crypto',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
},
body: JSON.stringify({
"card_id": "4b8b313329234c46929d1b728e230d7a",
"currency": "USDT",
"network": "tron",
"token": "trc20"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/topup_with_crypto');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "card_id": "4b8b313329234c46929d1b728e230d7a",
\n "currency": "USDT",
\n "network": "tron",
\n "token": "trc20"
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/topup_with_crypto"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"card_id": "4b8b313329234c46929d1b728e230d7a",`+"
"+`
"currency": "USDT",`+"
"+`
"network": "tron",`+"
"+`
"token": "trc20"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Body
card_id : String *required
currency : String *required
network : String *required
token : String *required
Response
🟢 200: Deposit USDT into the address to fund the card.
{
"status": "success",
"message": "Deposit USDT into the address to fund the card.",
"data": {
"payment_info": {
"address": "THKadyH5tu4WPoVitXzkmCfioadYpavKk3",
"currency": "USDT",
"network": "tron",
"token": "trc20"
}
}
}
🟡 202: card funding in progress.
{
"status": "success",
"message": "Card funding in progress",
"data": {
"card_id": "0e357341429042f8a3062ed0902a1234",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Withdraw to crypto address
This API allows you to withdraw to a crypto address.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/withdraw_to_crypto_address' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data '{
"card_id": "jkfc68fb4d734de28fbff02e93d6ad7c",
"address": "THKadyH5tu4WPoVitXzkmCfioadYpavKj8",
"amount": "10",
"currency": "USDT",
"network": "tron",
"token": "trc20"
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/issuing/cards/withdraw_to_crypto_address"
payload = json.dumps({
"card_id": "jkfc68fb4d734de28fbff02e93d6ad7c",
"address": "THKadyH5tu4WPoVitXzkmCfioadYpavKj8
",
"amount": "10",
"currency": "USDT",
"network": "tron",
"token": "trc20"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Body
card_id : String *required
address : String *required
amount : String *required
currency : String *required
network : String *required
token : String *required
Get card balance
This API allows you to get the card balance.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/get_card_balance?card_id=85112e358a4d40188dd1ff6f49cc1c08' \
--header 'Authorization: Bearer xxxxx'
import http.client
conn = http.client.HTTPSConnection("localhost", 3000)
payload = ''
headers = {
'Authorization': 'Bearer xxxxx'
}
conn.request("GET", "https://business-api-testnet.palremit.com/core/issuing/cards/get_card_balance?card_id=85112e358a4d40188dd1ff6f49cc1c08", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/get_card_balance?card_id=85112e358a4d40188dd1ff6f49cc1c08',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/get_card_balance?card_id=85112e358a4d40188dd1ff6f49cc1c08');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/get_card_balance?card_id=85112e358a4d40188dd1ff6f49cc1c08"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card retrieved successfully.
{
"status": "success",
"message": "Card retrieved successfully",
"data": {
"card_id": "85112e358a4d40188dd1ff6f49cc1c08",
"balance": "0"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Decrypt card details
This API allows you to decrypt a card.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/decrypt_card_details?card_id=85112e358a4d40188dd1ff6f49cc1c08' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/decrypt_card_details?card_id=85112e358a4d40188dd1ff6f49cc1c08"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/decrypt_card_details?card_id=85112e358a4d40188dd1ff6f49cc1c08',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/decrypt_card_details?card_id=85112e358a4d40188dd1ff6f49cc1c08');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/decrypt_card_details?card_id=85112e358a4d40188dd1ff6f49cc1c08"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card details decrypted successfully.
{
"status": "success",
"message": "Card details decrypted successfully",
"data": {
"card_id": "85112e358a4d40188dd1ff6f49cc1c08",
"card_number": "4681269977114309",
"expiry_month": "1",
"expiry_year": "2028",
"cvv": "657",
"last_4": "4309",
"card_currency": "USD",
"brand": "Visa",
"billing_address": {
"billing_address1": "256 Chapman Road STE 105-4",
"billing_city": "Newark",
"billing_country": "US",
"billing_zip_code": "19702",
"country_code": "US",
"state": "Delaware",
"state_code": "DE"
},
"card_name": "John Doe",
"cardholder_id": "0e357341429042f8a3062ed0902a1234",
"company_id": null,
"created_at": 1705745327,
"issuing_app_id": "f5853b70-ddb8-446d-b4d3-16c6e82604d0",
"card_type": "virtual",
"is_active": true,
"livemode": false,
"meta_data": {
"user_id": "142"
},
"pin_3ds_activated": null,
"insufficient_funds_decline_count": null,
"has_done_debit_in_a_month": null,
"balance": "80"
}
}
Debit card
This API allows you to withdraw funds from a card
curl --location --request PATCH 'https://business-api-testnet.palremit.com/core/issuing/cards/debit_card' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data '{
"card_id": "0e123341429042f8a3062ed0902a1234",
"amount": "10",
"transaction_reference": "216ef11a58bf468baeb9cdbb963",
"transaction_method": "payment",
"currency": "USD"
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/issuing/cards/debit_card"
payload = json.dumps({
"card_id": "0e123341429042f8a3062ed0902a1234",
"amount": "10",
"transaction_reference": "216ef11a58bf468baeb9cdbb963",
"currency": "USD"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/debit_card',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
},
body: JSON.stringify({
"card_id": "0e123341429042f8a3062ed0902a1234",
"amount": "10",
"transaction_reference": "216ef11a58bf468baeb9cdbb963",
"currency": "USD"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/debit_card');
$request->setMethod('PATCH');
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "card_id": "0e123341429042f8a3062ed0902a1234",
\n "amount": "10",
\n "transaction_reference": "216ef11a58bf468baeb9cdbb963",
\n "currency": "USD"
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/debit_card');
$request->setMethod('PATCH');
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "card_id": "0e123341429042f8a3062ed0902a1234",
\n "amount": "10",
\n "transaction_reference": "216ef11a58bf468baeb9cdbb963",
\n "currency": "USD"
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
Body
card_id : String *required
amount(in cents) : String *required
transaction_reference (must be unique) : String *required
currency: can be either "USD" or "NGN" String *required
Response
🟢 200: Card unloaded successfully.
{
"status": "success",
"message": "Card unloaded successfully",
"data": {
"card_id": "0e357341429042f8a3062ed0902a1234",
"transaction_reference": "216ef11a58bf468baeb9cdbb963"
}
}
🟡 202: card unloading in progress.
{
"status": "success",
"message": "Card unloading in progress",
"data": {
"card_id": "b7fc2c83e96144489bdffa1f2249e2ff",
"transaction_reference": "b7fc2c83e96144489bdffa1f2249e2ff0000111999111"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Freeze card
This API allows your users to freeze their cards. After freezing a card the is_active
field in the get card details endpoint is immediately updated to False
.
Keep in mind that when you initiate a card freeze, the card balance is instantly set to zero on our system. The balance remains static until the card is unfrozen. Additionally, funding a frozen card is not possible; you must unfreeze the card before initiating any funding operations.
curl --location --request PATCH 'https://business-api-testnet.palremit.com/core/issuing/cards/freeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/freeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/freeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/freeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08');
$request->setMethod('PATCH');
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/freeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
method := "PATCH"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card frozen successfully.
{
"status": "success",
"message": "Card frozen successfully",
"data": {
"card_id": "0e357341429042f8a3062ed0902a1234"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Unfreeze card
This API allows your users to unfreeze their card. When you unfreeze a card the is_active
field in the get card details endpoint is immediately updated to True
.
curl --location --request PATCH 'https://business-api-testnet.palremit.com/core/issuing/cards/unfreeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/unfreeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/unfreeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/unfreeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08');
$request->setMethod('PATCH');
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/unfreeze_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
method := "PATCH"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card unfrozen successfully.
{
"status": "success",
"message": "Card unfrozen successfully",
"data": {
"card_id": "0e357341429042f8a3062ed0902a1234"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Get card transactions
Use this API to get all the transactions on a card.
If you want to retrieve transactions by date you can specify the start_date
and end_date
in URL parameters. The value of the dates should be in seconds (Timestamp) e.g start_date=1701622595&end_date=1801622595
. The end data must be greater than the start date.
Kindly be aware that all transactions are recorded in the GMT zone. If GMT is not your local time zone, you must perform the necessary conversion to reflect transactions accurately in your local time.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/get_card_transactions?card_id=85112e358a4d40188dd1ff6f49cc1c08&page=1"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card retrieved successfully.
{
"status": "success",
"message": "Card transactions retrieved successfully",
"data": [
{
"transaction_method": "card",
"_id": "65dc8a48b3a97f7d2fe5e63d",
"business": "65cdec414d11c5aa12ae721a",
"reference": "859505050505",
"card_id": "95280a4505994aa1bd163c6d1a320e73",
"cardholder_id": "6f6f1402af5748e6b1af7c30f4882138",
"amount": 1,
"currency": "USD",
"description": "",
"status": "success",
"order_type": "debit",
"payment_method": "crypto_payment",
"createdAt": "2024-02-26T12:55:36.979Z",
"updatedAt": "2024-02-26T12:55:36.979Z",
"__v": 0,
"order_subtype": "payment"
},
{
"transaction_method": "card",
"_id": "65dc8e22233d89061c39274f",
"business": "65cdec414d11c5aa12ae721a",
"reference": "8595050505051",
"card_id": "95280a4505994aa1bd163c6d1a320e73",
"cardholder_id": "6f6f1402af5748e6b1af7c30f4882138",
"amount": 1,
"currency": "USD",
"description": "",
"status": "success",
"order_type": "debit",
"payment_method": "card",
"createdAt": "2024-02-26T13:12:02.265Z",
"updatedAt": "2024-02-26T13:12:02.265Z",
"__v": 0,
"order_subtype": "payment"
}
]
}
🔴 400: Invalid card ID
{
"status": "error",
"message": "Invalid card ID, there's no card with this ID."
}
Get all cardholder's card
This API returns all the cards assigned to a cardholder in a list.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/get_all_cardholder_cards?cardholder_id=0e357341429042f8a3062ed0902a0040"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card retrieved successfully.
{
"status": "success",
"message": "Card retrieved successfully",
"data": {
"cards": [
{
"billing_address": {
"billing_address1": "256 Chapman Road STE 105-4",
"billing_city": "Newark",
"billing_country": "US",
"billing_zip_code": "19702",
"country_code": "US",
"state": "Delaware",
"state_code": "DE"
},
"brand": "Visa",
"card_currency": "USD",
"card_id": "b3d575348fb541348658af7be2f48afe",
"card_name": "John Doe",
"card_number": "ev:RFVC:nmPn/uZgK5L27d2r:AnA3MZKjf7UioVMKVqLBKfqRm2psUO68f54Z1QRhrF+1:VqAO6u9KxDDMh13e/7F09pFMfbyrOPO2hTwoOL0oZLI:$",
"card_type": "virtual",
"cardholder_id": "0e357341429042f8a3062ed0902a0040",
"created_at": 1705754845,
"cvv": "ev:RFVC:xM2bUxSa9Xj3t3sd:AnA3MZKjf7UioVMKVqLBKfqRm2psUO68f54Z1QRhrF+1:zWSrhptWo6YpSI3CtEHECn3z6g:$",
"expiry_month": "ev:RFVC:66xvxsARZmR7xaQB:AnA3MZKjf7UioVMKVqLBKfqRm2psUO68f54Z1QRhrF+1:0IoSCqaApI4lTA+XC7RIIIY:$",
"expiry_year": "ev:RFVC:udjz2LnbRou0jn7S:AnA3MZKjf7UioVMKVqLBKfqRm2psUO68f54Z1QRhrF+1:F7h5qUHEGsEtf5IIb5QAnXQgQJ8:$",
"is_active": true,
"issuing_app_id": "f5853b70-ddb8-446d-b4d3-16c6e82604d0",
"last_4": "4459",
"livemode": false,
"meta_data": {
"user_id": "142"
},
"pin_3ds_activated": null
},
{
"billing_address": {
"billing_address1": "256 Chapman Road STE 105-4",
"billing_city": "Newark",
"billing_country": "US",
"billing_zip_code": "19702",
"country_code": "US",
"state": "Delaware",
"state_code": "DE"
},
"brand": "Visa",
"card_currency": "USD",
"card_id": "85112e358a4d40188dd1ff6f49cc1c08",
"card_name": "John Doe",
"card_number": "ev:RFVC:O817rrISsdyk9RQj:AuYxq3p3VbmggCl35qDp8xpI76GDHG9boT1nRxCGSxiZ:+2as/qIeo8xYWnXv+wKSvmz7WiUMH9aBNS4Lk4sgDok:$",
"card_type": "virtual",
"cardholder_id": "0e357341429042f8a3062ed0902a0040",
"created_at": 1705745327,
"cvv": "ev:RFVC:GjEdMh0qv7P+LITs:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:Cu1JQTb6KzTQKK2u/BhjfnwLwg:$",
"expiry_month": "ev:RFVC:dQ2aNMNpFpiT1HG8:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:mi9bFBiVm7nHEoIqxUvib74:$",
"expiry_year": "ev:RFVC:3Y04ulKFLtaf/UgQ:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:q5mmJ0OPY/k61Qc6+O18oCZIhD4:$",
"is_active": true,
"issuing_app_id": "f5853b70-ddb8-446d-b4d3-16c6e82604d0",
"last_4": "4309",
"livemode": false,
"meta_data": {
"user_id": "142"
},
"pin_3ds_activated": null
}
],
"meta": {
"total": 2,
"pages": 1,
"previous": null,
"next": null
}
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Get card details
This API allows you to fetch the details for a card you created.
Given that a card's data, including sensitive details like the card number, CVV, and expiry date, is transmitted, it undergoes encryption during transfer to your end. The decryption process is automatic upon arrival at your server.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cards/get_card?card_id=85112e358a4d40188dd1ff6f49cc1c08' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cards/get_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cards/get_card?card_id=85112e358a4d40188dd1ff6f49cc1c08',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cards/get_card?card_id=85112e358a4d40188dd1ff6f49cc1c08');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cards/get_card?card_id=85112e358a4d40188dd1ff6f49cc1c08"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: Card retrieved successfully.
{
"status": "success",
"message": "Card retrieved successfully",
"data": {
"card_id": "85112e358a4d40188dd1ff6f49cc1c08",
"card_number": "ev:RFVC:O817rrISsdyk9RQj:AuYxq3p3VbmggCl35qDp8xpI76GDHG9boT1nRxCGSxiZ:+2as/qIeo8xYWnXv+wKSvmz7WiUMH9aBNS4Lk4sgDok:$",
"expiry_month": "ev:RFVC:dQ2aNMNpFpiT1HG8:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:mi9bFBiVm7nHEoIqxUvib74:$",
"expiry_year": "ev:RFVC:3Y04ulKFLtaf/UgQ:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:q5mmJ0OPY/k61Qc6+O18oCZIhD4:$",
"cvv": "ev:RFVC:GjEdMh0qv7P+LITs:AsD8Q0WoieJBLccktb+quHxLm9cVQBwhjGKh+OObqkyf:Cu1JQTb6KzTQKK2u/BhjfnwLwg:$",
"last_4": "4309",
"card_currency": "USD",
"brand": "Visa",
"billing_address": {
"billing_address1": "256 Chapman Road STE 105-4",
"billing_city": "Newark",
"billing_country": "US",
"billing_zip_code": "19702",
"country_code": "US",
"state": "Delaware",
"state_code": "DE"
},
"card_name": "John Doe",
"cardholder_id": "0e357341429042f8a3062ed0902a0040",
"company_id": null,
"created_at": 1705745327,
"issuing_app_id": "f5853b70-ddb8-446d-b4d3-16c6e82604d0",
"card_type": "virtual",
"is_active": true,
"livemode": false,
"meta_data": {
"user_id": "142"
},
"pin_3ds_activated": null,
"insufficient_funds_decline_count": null,
"has_done_debit_in_a_month": null,
"balance": "0"
}
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Last updated