---
title: Retrieve customer prepaid credit wallet
slug: reference/retrieve-customer-prepaid-credit-wallet
docTags: 
createdAt: 2025-03-18T18:28:02.918Z
---

{
  "id": "DYvWpQjR9vg-Q3IXxshyB",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/payments/billing/customer-prepaid-wallet",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/billing/customer-prepaid-wallet"
      }
    ],
    "name": "Retrieve customer prepaid credit wallet",
    "description": "<p>Retrieves comprehensive details about a customer's prepaid credit wallet including balances, usage, and transaction history.\nUse this endpoint to check credit availability and track prepaid credit consumption.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Check current prepaid credit balances and availability</li>\n<li>Review credit usage patterns and consumption history</li>\n<li>Monitor prepaid credit expiration dates and validity</li>\n<li>Support customer service inquiries about credit status</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "customerId",
          "type": "string",
          "example": "customer_12345",
          "description": "Unique identifier for the customer whose prepaid wallet should be retrieved.\nThis parameter is required to identify which customer's credit wallet to access.\n"
        },
        {
          "kind": "optional",
          "name": "productId",
          "type": "string",
          "example": "product_67890",
          "description": "<p>Unique identifier for the specific product within the prepaid wallet.\nIf not provided, defaults to the account's default product ID.\nUsed to filter prepaid credits for a specific product or service.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returns detailed customer prepaid wallet with credit balances, usage history, and expiration details",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Detailed customer prepaid wallet containing all prepaid cards with usage history, payment status, and credit unit conversion information.",
            "customType": "payment.billing.prepaid_to_product.detailed.DetailedCustomerPrepaidWallet.out",
            "schema": [
              {
                "name": "key",
                "kind": "optional",
                "type": "object",
                "description": "Unique identifier containing account, customer, and product information for this wallet",
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.CustomerPrepaidWalletKey.out",
                "customType": "payment.billing.prepaid_to_product.CustomerPrepaidWalletKey.out",
                "schema": [
                  {
                    "name": "accountId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Account identifier for the prepaid wallet owner in the billing system.",
                    "example": ""
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Customer identifier for the specific user within the account's prepaid wallet system.",
                    "example": ""
                  },
                  {
                    "name": "productId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Product identifier that defines the scope and usage conditions for prepaid credits.",
                    "example": ""
                  }
                ]
              },
              {
                "name": "prepaidCards",
                "kind": "optional",
                "type": "array",
                "description": "List of prepaid cards sorted by creation time with detailed usage and payment information",
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.detailed.DetailedPrepaidCard.out",
                "customType": "payment.billing.prepaid_to_product.detailed.DetailedPrepaidCard.out[]",
                "schema": [
                  {
                    "name": "prepaidUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique URI identifier for this prepaid card within the system",
                    "example": ""
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "URI of the source entity or process that created this prepaid card",
                    "example": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "External payment system transaction identifier for the prepaid card purchase",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of external payment system used for processing this prepaid card",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type classification defining payment source and recurrence pattern for this card",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "schema": []
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "Current payment processing status indicating successful completion or pending states",
                    "modelRef": "#/components/schemas/payment.payment.PaymentStatus.in",
                    "customType": "payment.payment.PaymentStatus.in",
                    "schema": []
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "description": "Purchase price of prepaid card in original payment currency with exchange rates applied",
                    "example": ""
                  },
                  {
                    "name": "priceInBaseCurrency",
                    "kind": "optional",
                    "type": "number",
                    "description": "Purchase price of prepaid card converted to account base currency for billing",
                    "example": ""
                  },
                  {
                    "name": "paymentCurrencyInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Currency conversion information including exchange rates and payment currency details",
                    "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.out",
                    "customType": "payment.billing.PaymentCurrencyInfo.out",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Base account currency code in ISO 4217 format used for pricing calculations and billing operations",
                        "example": "USD"
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Customer payment currency code in ISO 4217 format used for actual billing and payment processing",
                        "example": "USD"
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "description": "Exchange rate from base plan currency to payment currency used for currency conversion calculations",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "description": "Credit value that customer receives for usage after purchase completion",
                    "example": ""
                  },
                  {
                    "name": "startTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp in milliseconds when prepaid card becomes active for usage",
                    "example": 0
                  },
                  {
                    "name": "expirationTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp in milliseconds when unused prepaid credits expire permanently",
                    "example": 0
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "Chronological list of product invoices where prepaid credits were applied for billing",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.detailed.DetailedPrepaidProductInvoice.out",
                    "customType": "payment.billing.prepaid_to_product.detailed.DetailedPrepaidProductInvoice.out[]",
                    "schema": [
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique URI identifier for the product invoice where prepaid credits were applied",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp when the product invoice was created and prepaid credits applied",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Amount of prepaid credits consumed from customer wallet for this product invoice",
                        "example": ""
                      },
                      {
                        "name": "amountInCredits",
                        "kind": "optional",
                        "type": "number",
                        "description": "Prepaid amount converted to credit units for price-based cards when credit billing enabled",
                        "example": ""
                      },
                      {
                        "name": "invoiceAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Total invoice amount before prepaid credit application showing original billing amount",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Total amount of prepaid credits consumed for customer charges across all invoices",
                    "example": ""
                  },
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "description": "Remaining prepaid credit balance available for future customer charges and usage",
                    "example": ""
                  },
                  {
                    "name": "priceInCredits",
                    "kind": "optional",
                    "type": "number",
                    "description": "Purchase price converted to credit units when credit-based billing is configured",
                    "example": ""
                  },
                  {
                    "name": "worthInCredits",
                    "kind": "optional",
                    "type": "number",
                    "description": "Credit value converted to credit units when credit-based billing is configured",
                    "example": ""
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "description": "Conditional rules determining when and where prepaid credits apply to customer charges",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "schema": [
                      {
                        "name": "prepaidConditionsList",
                        "kind": "optional",
                        "type": "object",
                        "description": "Active set of prepaid conditions determining when credits apply to customer charges",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.out",
                        "customType": "payment.billing.prepaid_to_product.PrepaidCondition.out[]",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type identifier for dimension-based prepaid condition, automatically set to class name.",
                                "example": "",
                                "default": "DimensionValueMapPrepaidCondition"
                              },
                              {
                                "name": "dimensionMapValue",
                                "kind": "optional",
                                "type": "map",
                                "description": "Single dimension key-value pair specifying usage dimension criteria for prepaid credit application.",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed type identifier for product item dimension prepaid condition implementation",
                                "example": "",
                                "default": "ProductItemDimensionPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Unique identifier of product item where prepaid credits should be applied",
                                "example": ""
                              },
                              {
                                "name": "dimensions",
                                "kind": "optional",
                                "type": "map",
                                "description": "Optional dimension key-value pairs for targeted credit application within product item",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "prepaidConditionsHistory",
                        "kind": "optional",
                        "type": "map",
                        "description": "Historical timeline mapping timestamps to condition sets for audit and tracking purposes",
                        "example": "",
                        "customType": "map<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "Human-readable label or name assigned to this prepaid card for identification",
                    "example": ""
                  },
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "description": "External order identifier linking this prepaid card to original purchase transaction",
                    "example": ""
                  },
                  {
                    "name": "installments",
                    "kind": "optional",
                    "type": "object",
                    "description": "Payment installment schedule for prepaid cards purchased with deferred payment plans",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "schema": [
                      {
                        "name": "prepaidInstallments",
                        "kind": "required",
                        "type": "array",
                        "description": "Ordered list of payment schedules defining when installments are billed to customer",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in",
                        "customType": "payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]",
                        "schema": [
                          {
                            "name": "amountPrice",
                            "kind": "required",
                            "type": "number",
                            "description": "Payment amount of individual installment charged to customer in account base currency",
                            "example": ""
                          },
                          {
                            "name": "scheduledPurchaseTimeInSeconds",
                            "kind": "required",
                            "type": "integer<int64>",
                            "description": "Unix timestamp when installment payment should be processed and billed to customer",
                            "example": 0
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "creditUnit",
                "kind": "optional",
                "type": "object",
                "description": "Credit unit configuration for currency conversion and credit-based billing calculations",
                "modelRef": "#/components/schemas/payment.pricing.CreditUnit.out",
                "customType": "payment.pricing.CreditUnit.out",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for this credit unit configuration within the account",
                    "example": ""
                  },
                  {
                    "name": "shortName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Abbreviated name for credit unit used in compact displays and reports",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Full descriptive name for credit unit displayed to customers and administrators",
                    "example": ""
                  },
                  {
                    "name": "ratioToCurrency",
                    "kind": "optional",
                    "type": "number",
                    "description": "Exchange rate defining amount of account currency per credit unit for conversions",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Detailed explanation of credit unit purpose and usage for customer understanding",
                    "example": ""
                  },
                  {
                    "name": "active",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether this credit unit configuration is currently enabled for billing operations",
                    "example": ""
                  },
                  {
                    "name": "lastUpdateTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp in milliseconds when credit unit configuration was last modified",
                    "example": 0
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.detailed.DetailedCustomerPrepaidWallet.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid customer ID or malformed wallet request parameters",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Insufficient permissions to access customer prepaid wallet data",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Customer not found or no prepaid wallet configured",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while retrieving wallet information",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "PBS3G8H1VlPeiQjVGmx2r",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/payments/billing/customer-prepaid-wallet?customerId=customer_12345' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "q-1udPTwfxMMhpcxjm9Uu",
          "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/payments/billing/customer-prepaid-wallet?customerId=customer_12345\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "p3DJ2CYf7NTqQ95bojQTn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/billing/customer-prepaid-wallet?customerId=customer_12345\")\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": "8rsLkfftrDRT_m55HyKFb",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/billing/customer-prepaid-wallet?customerId=customer_12345\"\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": "PBS3G8H1VlPeiQjVGmx2r"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Returns detailed customer prepaid wallet with credit balances, usage history, and expiration details\n{\n  \"key\": {\n    \"accountId\": \"\",\n    \"customerId\": \"\",\n    \"productId\": \"\"\n  },\n  \"prepaidCards\": [\n    {\n      \"prepaidUri\": \"\",\n      \"sourceUri\": \"\",\n      \"paymentId\": \"\",\n      \"paymentSystemName\": \"\",\n      \"cardType\": \"\",\n      \"paymentStatus\": \"\",\n      \"price\": 0,\n      \"priceInBaseCurrency\": 0,\n      \"paymentCurrencyInfo\": {\n        \"basePlanCurrency\": \"USD\",\n        \"paymentCurrency\": \"USD\",\n        \"exchangeRate\": 0\n      },\n      \"worth\": 0,\n      \"startTimeInMillis\": \"\",\n      \"expirationTimeInMillis\": \"\",\n      \"productInvoices\": [\n        {\n          \"invoiceUri\": \"\",\n          \"createdTimeInSeconds\": \"\",\n          \"amount\": 0,\n          \"amountInCredits\": 0,\n          \"invoiceAmount\": 0\n        }\n      ],\n      \"usedAmount\": 0,\n      \"amountLeft\": 0,\n      \"priceInCredits\": 0,\n      \"worthInCredits\": 0,\n      \"prepaidConditions\": {\n        \"prepaidConditionsList\": {},\n        \"prepaidConditionsHistory\": \"\"\n      },\n      \"label\": \"\",\n      \"orderId\": \"\",\n      \"installments\": {\n        \"prepaidInstallments\": [\n          {\n            \"amountPrice\": 0,\n            \"scheduledPurchaseTimeInSeconds\": \"\"\n          }\n        ]\n      }\n    }\n  ],\n  \"creditUnit\": {\n    \"id\": \"\",\n    \"shortName\": \"\",\n    \"name\": \"\",\n    \"ratioToCurrency\": 0,\n    \"description\": \"\",\n    \"active\": false,\n    \"lastUpdateTimeInMillis\": \"\"\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid customer ID or malformed wallet request parameters\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Insufficient permissions to access customer prepaid wallet data\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Customer not found or no prepaid wallet configured\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal server error occurred while retrieving wallet information\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}