User Management

Retrieve extended card profile

Returns the data you need to display and transact on a connected user's credit cards: card brand name, card art and, on the secure host, the expiration date.

This endpoint is synchronous. You get one request and one response, with nothing to poll and no webhook.

Hosts

The request is the same on both hosts. The host you call decides which fields come back.

  • Secure host: returns all fields, including expirationDate.
    • Production: https://secure-api.spinwheel.io
    • Sandbox: https://secure-sandbox-api.spinwheel.io
  • Standard host: returns all fields except expirationDate.
    • Production: https://api.spinwheel.io
    • Sandbox: https://sandbox-api.spinwheel.io

🚧 Secure API access required

The secure host works only if the secure API is enabled for your account. Contact your Spinwheel representative to turn it on.

Response behavior

Only open cards are returned. Closed accounts are left out of the response, so you don't need to filter them yourself. The one exception: if you name a closed card in creditCardIds, it comes back with status CREDIT_CARD_ACCOUNT_CLOSED.

📘 Card counts may differ from the Debt Profile

Closed cards are left out, so expect this endpoint to return fewer entries than the Debt Profile shows for the same user.

Check for each field, not for the status. A card can have status SUCCESS and still have no expirationDate. On the standard host, no card ever includes one. Check whether the field is present before you use it.

Statuses that need action

  • USER_INPUT_REQUIRED: Spinwheel needs the card number or the expiration date from the user. Collect it and send it with Credit Card Profile Update, which is available on the secure host only.
  • CREDIT_CARD_ACCOUNT_CLOSED: The card you named in creditCardIds is closed. No action needed: remove the card from your UI.
post/v1/users/{userId}/creditCards/extendedProfile

Request

  • Base URL
    https://sandbox-api.spinwheel.io
  • URL
    https://sandbox-api.spinwheel.io/v1/users/{userId}/creditCards/extendedProfile
  • Auth
    API key in header Authorization

Path parameters

userIdstring required

Request body

creditCardIdsstring[]

The cards to retrieve data for, as returned by the Debt Profile. Omit the field entirely to receive every open card the user holds. An empty array is rejected.

Example request

{
  "creditCardIds": [
    "c41a7e92-58b3-4d61-8f07-2b9c5a3e14d8",
    "7d3f0b64-91ac-4e28-b5d3-8e17c62f490a"
  ]
}

Response

Per-card results. Per-card failures do not fail the request.

Example response

{
  "status": {
    "code": 200,
    "desc": "success",
    "messages": [
      {
        "desc": "Example description"
      }
    ]
  },
  "data": {
    "userId": "9f2c41d8-3b7a-4e15-9c02-6d8be41f7a33",
    "creditCards": [
      {
        "creditCardId": "7d3f0b64-91ac-4e28-b5d3-8e17c62f490a",
        "status": "SUCCESS",
        "cardBrand": {
          "cardName": "Visa",
          "cardArtUrl": "https://www.visa.com/en_us/visa-everywhere/visa-card-art.html",
          "updatedOn": 1597753517524
        },
        "expirationDate": {
          "month": "07",
          "year": "2027"
        }
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.