Customers

Get customer credit balance

Returns the credit balance for a customer identified by reference.

get/v1/sdk/customers/{reference}/balance

Path parameters

referencestring required
Example:cus_3c4d5e6f7g8h

Customer reference identifier

Response

Customer balance retrieved successfully

creditsnumber required

Raw credit balance in credits (100 credits = 1 minor currency unit)

creditsPerMinorUnitnumber required

Number of credits per minor currency unit

customerRefstring required

Customer reference identifier

displayCurrencystring required

ISO 4217 display currency code

displayExchangeRatenumber required

Exchange rate from USD to the display currency

Example response

{
  "credits": 4200,
  "creditsPerMinorUnit": 100,
  "customerRef": "cus_3c4d5e6f7g8h",
  "display": {
    "amountMajor": 42,
    "currency": "USD",
    "exchangeRate": 1,
    "formatted": "$42.00",
    "rateSource": "parity"
  },
  "displayCurrency": "USD",
  "displayExchangeRate": 1
}

Changes

Changed in 5 of the 27 revisions of this API.517

    • the response's body type changed from no type to object for status

      response-body-type-changed

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response's body type changed from object to no type for status

      response-body-type-changed

    • the response's body type changed from object to no type for status

      response-body-type-changed

    This revision also has 192 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response's body type changed from no type to object for status

      response-body-type-changed

    • the response's body type changed from no type to object for status

      response-body-type-changed

    • deleted the query request parameter currency

      request-parameter-removed

    • endpoint added

      endpoint-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog