customerId — you do not create cards directly through this API.
All requests use the x-api-key header (see Authentication). The sandbox base URL is https://api.sandbox.z2pay.com.
Endpoints
| Method | Route | Description |
|---|---|---|
GET | /cards/customer/{customerId} | Lists saved cards for a customer (paginated) |
GET | /cards/{id} | Retrieves a card by ID |
DELETE | /cards/{id} | Deactivates a card (soft delete) |
The Card object
These are the fields returned by all endpoints. No sensitive data is exposed.Card identifier, prefixed with
crd_.ID of the customer who owns the card (prefix
cust_).Card brand (e.g.,
visa, mastercard, elo, amex).First digits of the card (BIN). This is not the full card number.
Last digits of the card. Use together with
brand to display the card safely (e.g., Visa •••• 4242).Cardholder name, as provided during tokenization.
Expiration month, 1 or 2 digits (e.g.,
7 or 07).Expiration year, 4 digits (e.g.,
2030).Card status. Possible values:
active, expired, disabled.Deterministic card identifier. Identical cards (same customer) share the same fingerprint.
Creation date, in ISO 8601 with timezone.
Last update date, in ISO 8601 with timezone.
null while the card is active. After deactivation, contains the date (ISO 8601) when the card was deactivated.Monetary values do not apply to this resource. Dates follow the ISO 8601 standard with timezone — see Conventions.
List cards for a customer
Path parameters
Customer ID (prefix
cust_).Query parameters
Page to return. Integer, minimum
1.Number of items per page. Integer, minimum
1, maximum 100.Request example
Response example 200
List of Card objects (see The Card object).
Pagination metadata:
page, limit, total (total number of cards), and totalPages.Retrieve a card by ID
Path parameters
Card ID (prefix
crd_).Request example
Response example 200
Errors
Deactivate a card
deletedAt field populated.
This endpoint is idempotent. Send the
Idempotency-Key header with a unique value per operation to ensure that retries (timeouts, retries) have no duplicate effect. See Conventions.Path parameters
ID of the card to deactivate (prefix
crd_).Headers
Unique key for the operation. Recommended to prevent duplicate deactivations in case of retry.
Request example
Response example 200
After deactivation, the card no longer appears in List cards for a customer.
Errors
See also
Tokenizer
How to tokenize card data securely (PCI) before charging.
Customers
Manage the customers who own the saved cards.
Payments
Charge using a card token and the customer.
Test cards
Card numbers to use in the sandbox environment.

