Skip to main content
GET
/
customers
/
{id}
/
wallets
Get wallets by customer ID
curl --request GET \
  --url https://us.api.flexprice.io/v1/customers/{id}/wallets \
  --header 'x-api-key: <api-key>'
import requests

url = "https://us.api.flexprice.io/v1/customers/{id}/wallets"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://us.api.flexprice.io/v1/customers/{id}/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://us.api.flexprice.io/v1/customers/{id}/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://us.api.flexprice.io/v1/customers/{id}/wallets"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://us.api.flexprice.io/v1/customers/{id}/wallets")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://us.api.flexprice.io/v1/customers/{id}/wallets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "alert_settings": {
      "alert_enabled": true,
      "critical": {
        "threshold": 123
      },
      "info": {
        "threshold": 123
      },
      "warning": {
        "threshold": 123
      }
    },
    "auto_topup": {
      "amount": 123,
      "enabled": true,
      "invoicing": true,
      "threshold": 123
    },
    "balance": "<string>",
    "config": {
      "allowed_price_types": []
    },
    "conversion_rate": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "credit_balance": "<string>",
    "credits_available_breakdown": {
      "free": "<string>",
      "purchased": "<string>"
    },
    "currency": "<string>",
    "customer_id": "<string>",
    "description": "<string>",
    "environment_id": "<string>",
    "id": "<string>",
    "metadata": {},
    "name": "<string>",
    "tenant_id": "<string>",
    "topup_conversion_rate": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "updated_by": "<string>"
  }
]
{
"http_status_code": 123,
"message": "<string>"
}
{
"http_status_code": 123,
"message": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Path Parameters

id
string
required

Customer ID

Response

OK

alert_settings
object
alert_state
enum<string>
Available options:
ok,
info,
warning,
in_alarm
auto_topup
object
balance
string
config
object
conversion_rate
string

amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits

created_at
string<date-time>
created_by
string
credit_balance
string
credits_available_breakdown
object
currency
string
customer_id
string
description
string
environment_id
string
id
string
metadata
object
name
string
status
enum<string>
Available options:
published,
deleted,
archived
tenant_id
string
topup_conversion_rate
string

topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

updated_at
string<date-time>
updated_by
string
wallet_status
enum<string>
Available options:
active,
frozen,
closed
wallet_type
enum<string>
Available options:
PRE_PAID,
POST_PAID