PGecom
  • 🚀Introduction
  • đŸŽ¯Guides
    • Getting authenticated
  • 📚Concepts
    • Sandbox Environment
  • 🧑‍đŸ’ģAPI Endpoint
    • Ecommerce
      • đŸ›ī¸Shop
        • GetShopById
        • CreateShop
      • 👔Product
        • ProductSchema
        • GetProductById
        • GetProductBySlug
        • CreateNewProduct
      • 🛒Checkout
        • CreateCheckoutSession
      • Form
        • GetFormById
      • Invoice
        • GetInvoiceById
    • Wordpress Plugin
    • Chrome Extension
    • GiftCards
      • â„šī¸Gift Card Schema
      • ✅List giftcards
      • â˜‘ī¸Order a gift card
      • â˜‘ī¸Get giftcard
      • â˜‘ī¸Rates
    • Send rewards
      • â„šī¸Rewards Schema
      • â˜‘ī¸Send rewards
    • Withdraw
      • â„šī¸Withdraw Schema
      • â˜‘ī¸Process Withdraw
      • â˜‘ī¸Rates
    • Radar
      • â„šī¸Radar Schema
      • â˜‘ī¸Check for Fraudster
    • Top Up
      • â„šī¸Topup Schema
      • â˜‘ī¸Estimate
      • â˜‘ī¸Send
    • Payment
      • Mon Cash
        • CreateMonCashPayment
        • VerifyMonCashPayment
        • WithdrawToMonCashEstimate
        • WithdrawFundsToMonCash
      • PG Pay
        • ConfigurePGPay
        • CreatePGPayPayment
        • VerifyPGPaymentWithToken
        • VerifyPGPaymentWithOrderId
    • Deprecated
      • Card Holder
        • â„šī¸Card Holder Schema
        • â˜‘ī¸Update
      • Card
        • â„šī¸Card Schema
        • ✅Retrieve a single card
        • ✅List cards
        • â˜‘ī¸Create a card
        • â˜‘ī¸Create Customer
  • 🎓Resources
    • Support
    • Production Access
Powered by GitBook
On this page

Was this helpful?

  1. API Endpoint
  2. Deprecated
  3. Card

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

Headers

Name
Type
Description

authorization*

String

Bearer token

Request Body

Name
Type
Description

spendingAmount*

String

Monthly spending amount on the card

reason*

String

Reason why you need this card

places*

String

Places that you intent to use the card

customerID*

String

{
    "cardId": "ic_1LVrfdEDjZxHmxzHqsxUEuHe",
    "message": "Virtual Visa card purchased successfully"
    
}
{
    "message": "Token not valid"
}

PreviousList cardsNextCreate Customer

Last updated 1 year ago

Was this helpful?

🧑‍đŸ’ģ
â˜‘ī¸