Cards
Cards are the core resource in the Swypex Partner API. Use these endpoints to list cards, retrieve card details, and manage spending limits.
The card model
The card model contains all the information about a card, including the cardholder details, last 4 digits, nickname, and spending limits.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the card. Example:
CRD1000000000
- Name
last4- Type
- string | null
- Description
Last 4 digits of the card number. Returns
nullif the card has not been activated yet.
- Name
nickname- Type
- string
- Description
User-assigned nickname for the card. Used to identify the card in the dashboard.
- Name
cardHolder- Type
- object
- Description
Information about the cardholder.
- Name
id- Type
- string
- Description
Unique identifier for the cardholder. Example:
USR1000000000
- Name
fullName- Type
- string
- Description
Full name of the cardholder.
- Name
limits- Type
- object
- Description
Current spending limits on the card. All values are in cents.
- Name
daily- Type
- integer
- Description
Daily spending limit in cents. Range:
0to100000000(up to EGP 1M per day).
- Name
monthly- Type
- integer
- Description
Monthly spending limit in cents. Range:
0to300000000(up to EGP 3M per month).
- Name
atm- Type
- integer
- Description
Monthly ATM withdrawal limit in cents. Range:
0to8000000(up to EGP 80k per month).
- Name
approval_based- Type
- integer | null
- Description
Approval-based limit in cents. Range: 0 to 99,999,999,999 (up to EGP 999.9M).
nullfor regular cards. For approval-based cards, daily/monthly/atm limits are set to maximum values and are not enforced.
List all cards
This endpoint allows you to retrieve a paginated list of all cards. By default, a maximum of 10 cards are shown per page.
Optional attributes
- Name
cursor- Type
- string
- Description
Pagination cursor for continued iteration. Use the
nextCursorvalue from the previous response.
- Name
limit- Type
- integer
- Description
Limit the number of cards returned. Default is 10.
Request
curl -G https://p.swypex.com/v1/card \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
{
"cards": [
{
"id": "CRD1000000000",
"last4": "1234",
"nickname": "Business Travel Card",
"cardHolder": {
"id": "USR1000000000",
"fullName": "Sara Amr"
},
"limits": {
"daily": 500000,
"monthly": 2000000,
"atm": 400000,
"approval_based": null
}
},
{
"id": "CRD1000000001",
"last4": "5678",
"nickname": "Marketing Expenses",
"cardHolder": {
"id": "USR1000000001",
"fullName": "Ahmed Hassan"
},
"limits": {
"daily": 1000000,
"monthly": 5000000,
"atm": 0,
"approval_based": null
}
}
// ... 8 more cards
],
"nextCursor": "eyJpZCI6IkNSRDEwMDAwMDAwMDEifQ=="
}
Retrieve a card
This endpoint allows you to retrieve a card by providing the card ID. Refer to the card model at the top of this page to see which properties are included with card objects.
Request
curl https://p.swypex.com/v1/card/CRD1000000000 \
-H "Authorization: Bearer {token}"
Response
{
"id": "CRD1000000000",
"last4": "1234",
"nickname": "Business Travel Card",
"cardHolder": {
"id": "USR1000000000",
"fullName": "Sara Amr"
},
"limits": {
"daily": 500000,
"monthly": 2000000,
"atm": 400000,
"approval_based": null
}
}
Set card limits
This endpoint allows you to replace all spending limits on a card. All limit fields must be provided. To update only specific limits, use the PATCH endpoint instead.
All limit values are in cents. For example, to set a EGP 5,000 daily limit, pass 500000.
Required attributes
- Name
daily- Type
- integer
- Description
Daily spending limit in cents (0 to 100,000,000).
- Name
monthly- Type
- integer
- Description
Monthly spending limit in cents (0 to 300,000,000).
- Name
atm- Type
- integer
- Description
Monthly ATM withdrawal limit in cents (0 to 300,000,000).
- Name
approval_based- Type
- integer | null
- Description
Approval-based limit in cents (0 to 99,999,999,999), or
nullfor regular cards.
Request
curl -X PUT https://p.swypex.com/v1/card/CRD1000000000/limits \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"daily": 750000,
"monthly": 3000000,
"atm": 500000,
"approval_based": null
}'
Response
{
"id": "CRD1000000000",
"last4": "1234",
"nickname": "Business Travel Card",
"cardHolder": {
"id": "USR1000000000",
"fullName": "Sara Amr"
},
"limits": {
"daily": 750000,
"monthly": 3000000,
"atm": 500000,
"approval_based": null
}
}
Update card limits
This endpoint allows you to partially update spending limits on a card. The provided amount will be added to the current limit of the card. Only the fields you provide will be updated; other limits will remain unchanged.
This uses JSON Merge Patch (RFC 7396), so only include the fields you want to change.
Optional attributes
- Name
daily- Type
- integer
- Description
Daily spending limit in cents (0 to 100,000,000).
- Name
monthly- Type
- integer
- Description
Monthly spending limit in cents (0 to 300,000,000).
- Name
atm- Type
- integer
- Description
Monthly ATM withdrawal limit in cents (0 to 300,000,000).
- Name
approval_based- Type
- integer | null
- Description
Approval-based limit in cents (0 to 99,999,999,999), or
nullfor regular cards.
Request
curl -X PATCH https://p.swypex.com/v1/card/CRD1000000000/limits \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/merge-patch+json" \
-d '{
"daily": 1000000
}'
Response
{
"id": "CRD1000000000",
"last4": "1234",
"nickname": "Business Travel Card",
"cardHolder": {
"id": "USR1000000000",
"fullName": "Sara Amr"
},
"limits": {
"daily": 1000000,
"monthly": 2000000,
"atm": 400000,
"approval_based": null
}
}