âī¸Create a card
A Visa Business card can be used to purchase any eligible business transactions on Amazon, Ebay, Alibaba, AliExpress, etc
In order to use the create a card endpoint, you'll need to create a customer first
You can take a look at the customer endpoint via this link Create Customer
Once you've created a customer, you'll need the customer id in order to create a virtual card
Please note that the virtual card can take 24 hours before a user's approval for it.
The virtual card is free however there is a fee for applying for the virtual card which is $15 USD to apply for it
The below example gives an example of how to make the request using the endpoint
const axios = require('axios');
let data = '{\n "customerId": "d97ca351-966c-47e5-a1fa-b8017515763c",\n "spendingAmount": 2000,\n "reason": "I wan to buy Products on Amazon",\n "places": "AliExpress, Amazon, Etc"\n}';
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://sandbox.pgecom.com/api/v1/business/visa',
headers: { },
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
s
import requests
url = "https://sandbox.pgecom.com/api/v1/business/visa"
payload = "{\n \"customerId\": \"d97ca351-966c-47e5-a1fa-b8017515763c\",\n \"spendingAmount\": 2000,\n \"reason\": \"I wan to buy Products on Amazon\",\n \"places\": \"AliExpress, Amazon, Etc\"\n}"
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('http://localhost:3002/api/card');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setBody('{\n "fullName": "Esterling Accime",\n "amount": 5,\n "email": "ukdgckvdxtqfmbrdea@bvhrs.com",\n "billingAddress": {\n "line1": "9700 Medlock Bridge Road",\n "city": "John Creeks",\n "country": "US",\n "state": "WA",\n "postal_code": "90098"\n },\n "isPhysical": false,\n "person": "user"\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();
}
Create a virtual
POST
https://sandbox.pgecom.com/api/v1/business/visa
Request Body
Monthly spending amount on the card
Reason why you need this card
Places that you intent to use the card
{
"cardId": "ic_1LVrfdEDjZxHmxzHqsxUEuHe",
"message": "Virtual Visa card purchased successfully"
}
{
"message": "Token not valid"
}