Cards
STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net
Get card list
GET
https://switchapi3.azurewebsites.net/user/cards/
Retrieve user's cards.
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token
{
"message": "Cards retrieved successfully",
"data": [
{
"id": "63",
"card_type": "visa DEBIT",
"expiry_month": "12",
"expiry_year": "2020",
"country_code": "NG",
"last_4": "4081",
"bin": "408408",
"authorization_code": "AUTH_ifhxo8mr0c"
}
]
}
Get card
GET
https://switchapi3.azurewebsites.net/user/cards/:id
Retrieve card by id.
Path Parameters
id
string
Card id
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token
{
"message": "Card retrieved successfully",
"data": {
"id": 63,
"authorization_code": "AUTH_ifhxo8mr0c",
"bin": "408408",
"card_type": "visa DEBIT",
"country_code": "NG",
"expiry_month": "12",
"expiry_year": "2020",
"last_4": "4081"
}
}
Fund with saved card
POST
https://switchapi3.azurewebsites.net/user/cards/charge/:id
This endpoint funds the user's wallet or account.
Path Parameters
id
string
The id of the card
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token
Request Body
pin
string
Authenticate transaction. Required if user's set 2fa is pin.
otp
string
Authenticate transaction. Required if user's set 2fa is otp or google authenticator.
funding_destination
string
wallet or account. Defaults to wallet.
amount_kobo
string
The amount in kobo.
{
"message": "Funding successful"
}
Delete saved card
DELETE
https://switchapi3.azurewebsites.net/user/cards/:id
This endpoint deletes a user's saved card.
Path Parameters
id
string
The id of the card.
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token.
{
"message": "Card deleted successfully"
}
Last updated
Was this helpful?