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

curl -X POST https://pagocards.com/api/mastercard/createcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com",
  "initialload" : 10.00 // optional, default 0
}'
{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com",
  "initialload" : 10.00 // optional, default 0
}

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

curl -X POST https://pagocards.com/api/mastercard/createaddon \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "firstname": "Jane",
  "lastname": "Doe",
  "cardid": "card_primaryyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "firstname": "Jane",
  "lastname": "Doe",
  "cardid": "card_primaryyyyyyyy"
}

Fund Mastercard

Funds a Mastercard from your funding wallet. A topup fee of $1 + 1% applies.

Endpoint: POST /api/mastercard/fundcard

curl -X POST https://pagocards.com/api/mastercard/fundcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "cardid": "card_yyyyyyyyyyyy",
  "email": "jane.doe@example.com",
  "amount": 25
}'
{
  "cardid": "card_yyyyyyyyyyyy",
  "email": "jane.doe@example.com",
  "amount": 25
}

Get Card Details

Retrieves details for a specific Mastercard.

Endpoint: POST /api/mastercard/getcarddetails

curl -X POST https://pagocards.com/api/mastercard/getcarddetails \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

Get All Cards

Retrieves a list of all Mastercards for a specific user email.

Endpoint: POST /api/mastercard/getallcards

curl -X POST https://pagocards.com/api/mastercard/getallcards \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com"
}'
{
  "email": "jane.doe@example.com"
}

Block / Unblock Card

Blocks or unblocks a specific Mastercard.

Endpoints:

  • POST /api/mastercard/blockdigital
  • POST /api/mastercard/unblockdigital
curl -X POST https://pagocards.com/api/mastercard/blockdigital \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

3DS Secure Management

Checks for pending 3DS transactions and approves them.

Endpoints:

  • POST /api/mastercard/check3ds
  • POST /api/mastercard/approve3ds
// For check3ds
curl -X POST https://pagocards.com/api/mastercard/check3ds \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'

// For approve3ds
curl -X POST https://pagocards.com/api/mastercard/approve3ds \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "eventId": "event_zzzzzzzzzzzz"
}'
// For check3ds
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

// For approve3ds
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "eventId": "event_zzzzzzzzzzzz"
}

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

curl -X POST https://pagocards.com/api/mastercard/checkwallet \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

Spend Control

Create spending controls on a Mastercard.

Endpoint: POST /api/mastercard/spendcontrol

curl -X POST https://pagocards.com/api/mastercard/spendcontrol \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "description": "Daily online spending",
  "type": "purchase", //Enum: purchase | blockedMcc
  "period": "daily", //Enum: daily | monthly | yearly
  "limit": 100
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "description": "Daily online spending",
  "type": "velocity_limit",
  "period": "daily",
  "limit": 100
}

Delete Spend Control

Delete an existing spending control from a Mastercard.

Endpoint: POST /api/mastercard/deletespendcontrol

curl -X POST https://pagocards.com/api/mastercard/deletespendcontrol \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "controlid": "ctrl_xxxxxxxxxxxx"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy",
  "controlid": "ctrl_xxxxxxxxxxxx"
}

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

curl -X POST https://pagocards.com/api/visacard/createcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com"
}'
{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com"
}

Fund Visacard

Funds a Visacard from your visa wallet. A topup fee of $1 + 1% applies.

Endpoint: POST /api/visacard/fundcard

curl -X POST https://pagocards.com/api/visacard/fundcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "cardid": "card_yyyyyyyyyyyy",
  "email": "jane.doe@example.com",
  "amount": 25
}'
{
  "cardid": "card_yyyyyyyyyyyy",
  "email": "jane.doe@example.com",
  "amount": 25
}

Get Card Details

Retrieves details for a specific Visacard.

Endpoint: POST /api/visacard/getcard

curl -X POST https://pagocards.com/api/visacard/getcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

Get All Cards

Retrieves a list of all Visacards for a specific user email.

Endpoint: POST /api/visacard/getallcards

curl -X POST https://pagocards.com/api/visacard/getallcards \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com"
}'
{
  "email": "jane.doe@example.com"
}

Block / Unblock Card

Blocks or unblocks a specific Visacard.

Endpoints:

  • POST /api/visacard/blockcard
  • POST /api/visacard/unblockcard
curl -X POST https://pagocards.com/api/visacard/blockcard \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}'
{
  "email": "jane.doe@example.com",
  "cardid": "card_yyyyyyyyyyyy"
}

Terminate Card

Terminate a Visa card by sending a deletion request.

Endpoint: POST /api/terminate

Headers:

  • publickey (required): Your public API key
  • secretkey (required): Your secret API key
  • Content-Type: application/json

Request Body Parameters:

  • cardid (required): The unique identifier of the card to terminate
  • email (required): The email address of the card owner
curl -X POST https://pagocards.com/api/terminate \
-H "Content-Type: application/json" \
-H "publickey: YOUR_PUBLIC_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-d '{
  "cardid": "card_abc123xyz",
  "email": "user@example.com"
}'
{
  "cardid": "card_abc123xyz",
  "email": "user@example.com"
}

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 region
  • country (optional): Filter by region/country
  • currency (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"
}'
{
  "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"