/get_cards
Lists all successfully linked debit cards for a given user_handle.
This endpoint will return a list of successfully linked debit cards along with basic card information linked to the requested user_handle. These are the cards that were linked using the /link_card endpoint.
Requests
Authorization / Authentication
Apps using Access Token Authorization
Use a valid access token in an Authorization: Bearer request header.
See Authenticating with an Access Token for more details.
Apps using ECDSA Authentication
Both authsignature
and usersignature
headers are required for this request. The usersignature header should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register_wallet endpoint).
See the section on ECDSA Authentication for more detail about ECDSA signature generation.
Note - We recently renamed the field auth_handle
to app_handle
. For backward compatibility, auth_handle
is still valid but has been removed from our documentation.
POST /0.2/get_cards HTTP/1.1
sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"created": 1234567890,
"auth_handle": "handle.silamoney.eth",
"user_handle":"user.silamoney.eth",
"reference": "<your unique id>"
},
"card_type": "debit"
}
***
HTTP/1.1 200 OK
{
"success": true,
"cards": [
{
"card_name": "Card Name",
"card_last_4": 1157,
"expiration": "12/27",
"card_type": "Debit",
"card_network": "Visa",
"pull_enabled": true,
"push_enabled": null,
"push_availability": null,
"active": true,
"country": "GB",
"currency": "USD",
"card_id": "1183988b-c572-40ac-8b5f-0369413f7e33"
}
],
"pagination": {
"returned_count": 1,
"total_count": 1,
"current_page": 1,
"total_pages": 1
},
"status": "SUCCESS",
"reference": "cb8f73e5-df42-4040-b1a0-dc7536b2d6ba",
"response_time_ms": "86"
}
Key | Type | Description |
---|---|---|
header | JSON object | Required. Requires these keys in JSON format: created, auth_handle, user_handle. See the /check_handle endpoint for the complete list of fields in this object. |
card_type | String | Optional. Filter listing by card type, supported values: DEBIT, CREDIT |
Responses
Status Code | success Attribute | Description |
---|---|---|
200 | true | Cards were successfully fetched and have been rendered in the response. |
Below are the possible values for all fields of the objects listed in the "cards" field of the response:
Field | Type | Possible Values | Description |
---|---|---|---|
card_name | String | This is a nickname supplied by the /link_card request which will be used to reference this card in transaction requests. | |
card_last_4 | Integer | These are the last 4 digits of the card for the purpose of identifying the card among other linked cards. | |
expiration | String | This is the card's expiration date. | |
card_type | String | "Debit" | This describes the type of card that was linked. |
card_network | String | "Visa" | |
pull_enabled | Boolean | true/false | This indicates whether funds can be pulled from the card (whether funds can be debited from the card, in other words). |
push_enabled | Boolean | true/false | This indicates whether funds can be pushed to the card (whether funds can be credited to the card, in other words). |
push_availability | Boolean | true/false | This indicates the availability of funds pushed to the card as reported by the card issuer. |
active | Boolean | true/false | This is true if the card is usable in transaction requests, false if not. |
country | String | Any 2-character country code in the ISO 3166 standard (e.g. "US") | This is where the card was issued. |
currency | String | Any 3-character currency code in the ISO 4217 standard (e.g. "USD") | This is the currency supported by the card. |
card_id | String (UUID) | A unique ID in UUID format. | This is a unique ID generated by Sila to identify the linked card. |
Updated 12 months ago