API Documentation
Integrate with our card issuing platform. All API requests should be sent with the `Content-Type: application/json` header.
Authentication: All API requests must include your publickey and secretkey in the request headers.
Mastercard API
Create Mastercard
Creates a new virtual Mastercard.
Endpoint: POST
/api/mastercard/createcard
Create Addon Card
Create an addon virtual card linked to a primary card user, they will share the same balance. Ensure you have sufficient balance for the addon card fee of $1.50.
Endpoint: POST
/api/mastercard/createaddon
Fund Mastercard
Funds a Mastercard from your funding wallet. A topup fee of $1 + 1% applies.
Endpoint: POST
/api/mastercard/fundcard
Get Card Details
Retrieves details for a specific Mastercard.
Endpoint: POST
/api/mastercard/getcarddetails
Get All Cards
Retrieves a list of all Mastercards for a specific user email.
Endpoint: POST
/api/mastercard/getallcards
Block / Unblock Card
Blocks or unblocks a specific Mastercard.
Endpoints:
POST /api/mastercard/blockdigitalPOST /api/mastercard/unblockdigital
3DS Secure Management
Checks for pending 3DS transactions and approves them.
Endpoints:
POST /api/mastercard/check3dsPOST /api/mastercard/approve3ds
Get GPay/Apple Pay OTP
Retrieves a One-Time Password (OTP) for adding a card to a mobile wallet like Google Pay or Apple Pay.
Endpoint: POST
/api/mastercard/checkwallet
Spend Control
Create spending controls on a Mastercard.
Endpoint: POST
/api/mastercard/spendcontrol
Delete Spend Control
Delete an existing spending control from a Mastercard.
Endpoint: POST
/api/mastercard/deletespendcontrol
Webhooks
Webhook for Wallet Google Pay / Apple Pay
This webhook is triggered for wallet tokenization events (Google Pay / Apple Pay).
{
"cardId": "crd-b3454534-e0c7-4502-bbfb-e345435323",
"userId": "usr-3305ced1-b12b-423f-a19f-16202e6dd505",
"eventId": "45b2bd57-1851-4ca5-ae0a-85248d347b22",
"eventName": "cardTokenization.deliverActivationCode",
"emailAddress": "3454353445@gmail.com",
"eventTargetId": "ctk-5655169d-71f8-40cc-8536-9170f097489d",
"activationCode": "559522",
"activationMethod": "email",
"digitalWalletName": "googlePay",
"consumerFacingEntityName": "GOOGLE"
}
Webhook for 3DS Authentication
This webhook is triggered for 3DS authentication events.
{
"cardId": "crd-1c8c002c-a98b-4f2c-878c-24591750dcf4",
"userId": "usr-d8260513-bf2b-4807-8208-3d4c15ba7438",
"eventId": "cd0e17cc-8801-4c77-82bf-885cfaf17cfb",
"walletId": "wlt-9885d99b-7e91-43da-a567-e04ce601c487",
"eventName": "cardAuthentication.created",
"maskedPan": "533867******8498",
"merchantName": "apple.com/bill",
"eventTargetId": "3ds-28050f17-168d-4d20-af9c-9e9b788a3031",
"walletAddress": "0x8379C9a6f0f4491555AD3C98e1DfdA1a0d88dd2D",
"merchantAmount": "3.99",
"merchantCurrency": "EUR"
}
Visacard API
An Initial Loading of $3 is required per card issuance.
Create Visacard
Creates a new virtual Visacard.
Endpoint: POST
/api/visacard/createcard
Fund Visacard
Funds a Visacard from your visa wallet. A topup fee of $1 + 1% applies.
Endpoint: POST /api/visacard/fundcard
Get Card Details
Retrieves details for a specific Visacard.
Endpoint: POST /api/visacard/getcard
Get All Cards
Retrieves a list of all Visacards for a specific user email.
Endpoint: POST
/api/visacard/getallcards
Block / Unblock Card
Blocks or unblocks a specific Visacard.
Endpoints:
POST /api/visacard/blockcardPOST /api/visacard/unblockcard
Terminate Card
Terminate a Visa card by sending a deletion request.
Endpoint: POST /api/terminate
Headers:
publickey(required): Your public API keysecretkey(required): Your secret API keyContent-Type: application/json
Request Body Parameters:
cardid(required): The unique identifier of the card to terminateemail(required): The email address of the card owner
See POSTMAN collection
Giftcards API
Get All Giftcards
Retrieve a paginated list of all available giftcards in the catalog. You can filter the results using query parameters.
Endpoint: GET /api/getgiftcards
Query Parameters:
page(optional): Page number (default: 1)limit(optional): Number of items per page (default: 20)search(optional): Search by title, currency, or regioncountry(optional): Filter by region/countrycurrency(optional): Filter by exact currency code (e.g., USD)
curl -X GET "https://pagocards.com/api/getgiftcards?page=1&limit=20&search=amazon" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Get Giftcard By SKU
Retrieve details of a specific giftcard using its SKU.
Endpoint: GET /api/getgiftcard/{sku}
curl -X GET https://pagocards.com/api/getgiftcard/1000 \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Get Exchange Rates
Fetch the current exchange rates required if purchasing giftcards priced in currencies other than USD.
Endpoint: GET /api/getexchangerates
curl -X GET https://pagocards.com/api/getexchangerates \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Check SKU Availability
Verify if a specific quantity and price of a giftcard SKU is available for purchase before placing an order.
Endpoint: GET
/api/checkskuavailability/{sku}?item_count=1&price=10.00
curl -X GET "https://pagocards.com/api/checkskuavailability/1000?item_count=1&price=25.00" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Purchase Giftcard
Purchase a giftcard using the user's giftcard wallet balance. The total cost is automatically deducted.
Endpoint: POST /api/purchasegiftcard
curl -X POST https://pagocards.com/api/purchasegiftcard \
-H "Content-Type: application/json" \
-d '{
"sku": "1000",
"quantity": 1,
"amount": 25.00,
"publickey": "YOUR_PUBLIC_KEY",
"secretkey": "YOUR_SECRET_KEY"
}'
Get Giftcard Order
Retrieve details and the share link for a specific purchased giftcard order using its reference code.
Endpoint: GET
/api/getgiftcardorder/{referencecode}
curl -X GET https://pagocards.com/api/getgiftcardorder/01c79b97-8ab4-423c-a11d-225897f2135a \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Get Giftcard Order History
Retrieve a paginated list of all giftcard purchase records associated with the API key.
Endpoint: GET
/api/getgiftcardorderhistory
Query Parameters:
page(optional): Page number (default: 1)limit(optional): Number of items per page (default: 20)
curl -X GET "https://pagocards.com/api/getgiftcardorderhistory?page=1&limit=20" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY"