Cards

Issuing a card returns its serial and the Apple, Google and web URLs.

Endpoints

POST /cards

Issue a card and return the Apple, Google and web URLs.

GET /cards/{serial}

Balance, tier, status and program of one card.

POST /cards/{serial}/topup

Prepaid: sell packs. Body packs (default 1) and amount (default packs × pack_price). Adds packs × units_per_pack.

POST /cards/{serial}/use

Prepaid: deduct count units, 1 up to max_use_per_scan. Refused with insufficient_units when fewer remain.

POST /cards/{serial}/block

Block or unblock a card without deleting its ledger.

Example

curl -X POST https://perfito.al/v1/cards \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0fa416e7" \
  -d '{ "program_id": 4, "customer": { "phone": "+355691234567" } }'