Skip to main content
Welcome to the Paygen Cards API Quickstart. This guide will walk you through the essential steps to issue your first card using our REST API.

1. Obtain your API Credentials

To interact with the Paygen Cards API, you need an API key. Obtain your API key from the developer dashboard. Include the key as a header in your HTTP requests:
x-api-key: <your_api_key_here>

2. Provision an Account

Before you can issue cards, you need an account to act as your funding pipeline (often a fiat checking account).
curl -X POST https://api-dev.paygen.online/accounts \
  -H "x-api-key: <your_api_key_here>" \
  -H "Content-Type: application/json" \
  -d '{
    "ownerType": "business",
    "ownerId": "665f1c4f4a4f4a4f4a4f4a4f",
    "name": "Primary USD Wallet",
    "type": "checking",
    "category": "fiat",
    "currency": "USD"
  }'
Save the id from the response (e.g., account_id), which you will need later to fund cards.

3. Create a Card Holder

Every card must be assigned to a card holder profile. You can submit card holder details using multipart/form-data (which also supports KYC document uploads, but we’ll stick to text fields here).
curl -X POST https://api-dev.paygen.online/card-holders \
  -H "x-api-key: <your_api_key_here>" \
  -F "firstName=Jane" \
  -F "lastName=Doe" \
  -F "email=jane.doe@example.com" \
  -F "phoneNumber=+1234567890" \
  -F "addressLine1=123 Main St" \
  -F "city=San Francisco" \
  -F "state=CA" \
  -F "postalCode=94105" \
  -F "country=US"
Save the id from the response (e.g., card_holder_id).

4. Issue a Card

Now that you have a funding account and a card holder, you can issue your first card.
curl -X POST https://api-dev.paygen.online/cards \
  -H "x-api-key: <your_api_key_here>" \
  -H "Content-Type: application/json" \
  -d '{
    "debitAccountId": "<account_id>",
    "cardHolderId": "<card_holder_id>",
    "type": "virtual",
    "brand": "Visa",
    "currency": "USD",
    "status": "active",
    "amount": 100
  }'
Once successful, our system provisions a virtual card, deducts the initial funding amount from the specified debit account, and returns the card record.

Next Steps

Congratulations! You have issued your first card.
  • Learn about Authentication in more detail.
  • Read about securely retrieving sensitive card PANs and CVVs.
  • Check out the API Reference to explore all available endpoints and features.