---
title: Get the customer prepaid wallet
slug: reference/get-the-customer-prepaid-wallet
createdAt: 2024-09-30T17:03:00.667Z
---

{
  "id": "pBwR7r64FC1rpiYklw8gy",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/customer-portal/prepaid-wallet",
    "servers": [
      {
        "url": "https://app.amberflo.io/customer-portal/prepaid-wallet"
      }
    ],
    "name": "Get the customer prepaid wallet",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "productId",
          "type": "string",
          "description": "Product ID as defined in account pricing. Change from default only if you have multiple products.",
          "default": "1"
        },
        {
          "kind": "required",
          "name": "sessionToken",
          "type": "string",
          "description": "<p>A required session token used to authenticate API calls made on behalf of a customer. This token is obtained from the <code>Create a session</code> endpoint and must be included with every request to authorize access.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "api_key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "billing-customer-prepaid-wallet-response",
            "schema": [
              {
                "name": "creditUnit",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "active",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "lastUpdateTimeInMillis",
                    "kind": "optional",
                    "type": "integer",
                    "example": 0
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "ratioToCurrency",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "shortName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "key",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "accountId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "productId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "prepaidCards",
                "kind": "optional",
                "type": "array",
                "description": "A list of prepaid cards owned by the customer - can be reward cards, one time prepaid cards or recurrent prepaid cards.",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "amountLeftInCredits",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string<ONE_TIME | RECURRENCE | EXTERNAL_ONE_TIME | EXTERNAL_RECURRENCE | CREDIT_ONE_TIME | REWARDS | COMMITMENT_REWARDS>",
                    "example": ""
                  },
                  {
                    "name": "expirationTimeInMillis",
                    "kind": "optional",
                    "type": "integer",
                    "example": 0
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "paymentCurrencyInfo",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "object",
                        "example": "",
                        "schema": [
                          {
                            "name": "currencyCode",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "object",
                        "example": "",
                        "schema": [
                          {
                            "name": "currencyCode",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "The prepaid card payment transaction id as it appears in the external System (Stripe, etc).",
                    "example": ""
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string<PRE_PAYMENT | REQUIRES_ACTION | PENDING | FAILED | SETTLED | NOT_NEEDED | UNKNOWN>",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "prepaidConditionsList",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "prepaidUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "This card uri.",
                    "example": ""
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "description": "Amount paid by the customer to own this card.",
                    "example": ""
                  },
                  {
                    "name": "priceInBaseCurrency",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "priceInCredits",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "amountInCredits",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      },
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "The product invoice uri.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "Uri of the entity which created this card.",
                    "example": ""
                  },
                  {
                    "name": "startTimeInMillis",
                    "kind": "optional",
                    "type": "integer",
                    "example": 0
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "usedAmountInCredits",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "description": "Worth is in base currency.",
                    "example": ""
                  },
                  {
                    "name": "worthInCredits",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/billing-customer-prepaid-wallet-response",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "r5ePq4eCrReCLB5zG2vi-",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/customer-portal/prepaid-wallet?productId=1&sessionToken=string' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "e4qcuFWJTD2gCdSPTVd1F",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/customer-portal/prepaid-wallet?productId=1&sessionToken=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ef-oNZDMPWvTlCXVINpMi",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/customer-portal/prepaid-wallet?productId=1&sessionToken=string\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "j601mpxslAItsEqoAW409",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/customer-portal/prepaid-wallet?productId=1&sessionToken=string\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "r5ePq4eCrReCLB5zG2vi-"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful response\n{\n  \"creditUnit\": {\n    \"active\": false,\n    \"description\": \"\",\n    \"id\": \"\",\n    \"lastUpdateTimeInMillis\": 0,\n    \"name\": \"\",\n    \"ratioToCurrency\": 0,\n    \"shortName\": \"\"\n  },\n  \"key\": {\n    \"accountId\": \"\",\n    \"customerId\": \"\",\n    \"productId\": \"\"\n  },\n  \"prepaidCards\": [\n    {\n      \"amountLeft\": 0,\n      \"amountLeftInCredits\": 0,\n      \"cardType\": \"\",\n      \"expirationTimeInMillis\": 0,\n      \"label\": \"\",\n      \"paymentCurrencyInfo\": {\n        \"basePlanCurrency\": {\n          \"currencyCode\": \"\"\n        },\n        \"exchangeRate\": 0,\n        \"paymentCurrency\": {\n          \"currencyCode\": \"\"\n        }\n      },\n      \"paymentId\": \"\",\n      \"paymentStatus\": \"\",\n      \"paymentSystemName\": \"\",\n      \"prepaidConditions\": {\n        \"prepaidConditionsList\": [\n          {}\n        ]\n      },\n      \"prepaidUri\": \"\",\n      \"price\": 0,\n      \"priceInBaseCurrency\": 0,\n      \"priceInCredits\": 0,\n      \"productInvoices\": [\n        {\n          \"amount\": 0,\n          \"amountInCredits\": 0,\n          \"createdTimeInSeconds\": 0,\n          \"invoiceUri\": \"\"\n        }\n      ],\n      \"sourceUri\": \"\",\n      \"startTimeInMillis\": 0,\n      \"usedAmount\": 0,\n      \"usedAmountInCredits\": 0,\n      \"worth\": 0,\n      \"worthInCredits\": 0\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "ttRJihZppMnqErYnXuEOf"
    }
  ]
}