Create virtual or physical card

POST /payment/create-card

Create a new payment card (virtual or physical) linked to an account. Supports various card types and configurations.

application/json

Body Required

  • data object Required

    The actual request data to be processed

    Hide data attributes Show data attributes object
    • accountId string Required

      ID of the account to link the card to

    • cardType string Required

      Type of card to create

      Values are virtual or physical.

    • cardholderName string Required

      Name of the cardholder

    • spendingLimit number

      Daily spending limit

    • currency string

      Card currency

    • expiryDate string(date)

      Card expiry date (for physical cards)

    • deliveryAddress object

      Delivery address for physical cards

      Hide deliveryAddress attributes Show deliveryAddress attributes object
      • street string
      • city string
      • postalCode string
      • country string
  • signature string Required

    ed25519 signature of the data, signed with user's private key

  • publicKey string Required

    User's derived public key for signature verification

  • timestamp integer Required

    Unix timestamp when the request was created (milliseconds)

  • nonce string Required

    Unique nonce to prevent replay attacks

Responses

  • 201 application/json

    Card created successfully

    Hide response attributes Show response attributes object
    • success boolean
    • cardId string
    • cardNumber string

      Masked card number (for virtual cards, full number)

    • expiryDate string(date)

      Card expiry date

    • status string

      Values are active, inactive, or suspended.

    • cardType string
    • estimatedDelivery string(date)

      Estimated delivery date for physical cards

  • 400

    Invalid request parameters

  • 401

    Authentication failed

  • 403

    Insufficient permissions

  • 429

    Rate limit exceeded

  • 500

    Internal server error

POST /payment/create-card
curl \
 --request POST 'https://pay-api.aiic.nz/v1/payment/create-card' \
 --header "X-Public-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"data":{"accountId":"acc_123","cardType":"virtual","cardholderName":"John Doe","spendingLimit":1000,"currency":"NZD","expiryDate":"2025-05-04","deliveryAddress":{"street":"string","city":"string","postalCode":"string","country":"string"}},"signature":"base64-encoded-signature","publicKey":"base64-encoded-public-key","timestamp":1703123456789,"nonce":"abc123-def456-ghi789"}'
Request examples
{
  "data": {
    "accountId": "acc_123",
    "cardType": "virtual",
    "cardholderName": "John Doe",
    "spendingLimit": 1000,
    "currency": "NZD",
    "expiryDate": "2025-05-04",
    "deliveryAddress": {
      "street": "string",
      "city": "string",
      "postalCode": "string",
      "country": "string"
    }
  },
  "signature": "base64-encoded-signature",
  "publicKey": "base64-encoded-public-key",
  "timestamp": 1703123456789,
  "nonce": "abc123-def456-ghi789"
}
Response examples (201)
{
  "success": true,
  "cardId": "card_abc123",
  "cardNumber": "**** **** **** 1234",
  "expiryDate": "2025-05-04",
  "status": "active",
  "cardType": "virtual",
  "estimatedDelivery": "2025-05-04"
}