/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"
}
KeyTypeDescription
headerJSON objectRequired. 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_typeStringOptional. Filter listing by card type, supported values: DEBIT, CREDIT

Responses

Status Codesuccess AttributeDescription
200trueCards 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:

FieldTypePossible ValuesDescription
card_nameStringThis is a nickname supplied by the /link_card request which will be used to reference this card in transaction requests.
card_last_4IntegerThese are the last 4 digits of the card for the purpose of identifying the card among other linked cards.
expirationStringThis is the card's expiration date.
card_typeString"Debit"This describes the type of card that was linked.
card_networkString"Visa"
pull_enabledBooleantrue/falseThis indicates whether funds can be pulled from the card (whether funds can be debited from the card, in other words).
push_enabledBooleantrue/falseThis indicates whether funds can be pushed to the card (whether funds can be credited to the card, in other words).
push_availabilityBooleantrue/falseThis indicates the availability of funds pushed to the card as reported by the card issuer.
activeBooleantrue/falseThis is true if the card is usable in transaction requests, false if not.
countryStringAny 2-character country code in the ISO 3166 standard (e.g. "US")This is where the card was issued.
currencyStringAny 3-character currency code in the ISO 4217 standard (e.g. "USD")This is the currency supported by the card.
card_idString (UUID)A unique ID in UUID format.This is a unique ID generated by Sila to identify the linked card.