Skip to content

Saved cards

References to cards used for top-ups: brand and last four digits only. Cards are saved by the hosted checkout, never by posting card details.

Every endpoint here needs Authorization: Bearer <token> for a signed-in AutoPayKe account. See Authentication.

List saved cards

GET/api/v1/wallet/cards
Bearer token

Cards saved from earlier card top-ups.

Request
curl "https://api.autopayke.com/api/v1/wallet/cards" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": [
    {
      "id": "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
      "brand": "visa",
      "last4": "4242",
      "holderName": "Amina Wanjiku",
      "expiryMonth": 8,
      "expiryYear": 2028,
      "status": "active",
      "addedAt": "2026-10-12T08:30:00.000Z",
      "topUps": 3
    }
  ]
}

Get a saved card

GET/api/v1/wallet/cards/{id}
Bearer token

One card, with the daily card top-up limit that applies to it.

Path parameters
  • idstringrequired

    The card id.

Request
curl "https://api.autopayke.com/api/v1/wallet/cards/0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": {
    "id": "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
    "brand": "visa",
    "last4": "4242",
    "holderName": "Amina Wanjiku",
    "expiryMonth": 8,
    "expiryYear": 2028,
    "status": "active",
    "addedAt": "2026-10-12T08:30:00.000Z",
    "topUps": 3,
    "dailyLimitUsd": 500
  }
}

Remove a saved card

DEL/api/v1/wallet/cards/{id}
Bearer token

Forgets the card reference.

Path parameters
  • idstringrequired

    The card id.

Request
curl -X DELETE "https://api.autopayke.com/api/v1/wallet/cards/0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": {
    "removed": true
  }
}
  • POST /api/v1/wallet/cards always answers 405 NOT_SUPPORTED: cards are saved only after a hosted-checkout payment.