The ID of a customer object is the same as the ID you have given through your application.
The customer object is read only.
Name | Type | Description |
---|---|---|
id | string | |
object | string | Is "customer". |
created | integer | |
balances | list | A list of the customer's balances separated into currencies. |
metadata | object |
{
"id": "cu4321",
"object": "customer",
"created": 1375217068,
"balances": {
"USD": 5612
},
"metadata": {}
}
Returns a list of all customers.
Name | Required | Description |
---|---|---|
count | optional | |
offset | optional |
curl https://secure.peakium.com/api/v1/customers/?count=2 \
-u pk_gEVUPX6FwObZSgg3v0BjkVxmdzatPyV9:
{
"object": "list",
"count": 2,
"data": [
{
"id": "cu4321",
"object": "customer",
"created": 1375217068,
"balances": {
"USD": 5612
},
"metadata": {}
},
{...}
]
}
Name | Required/Optional | Description |
---|---|---|
id | required | The unique customer ID. |
metadata | optional | An array. |
$ curl https://secure.peakium.com/api/v1/customers/ \
-u pk_gEVUPX6FwObZSgg3v0BjkVxmdzatPyV9: \
-d id="UNIQUE_ID"
$ curl https://secure.peakium.com/api/v1/customers/UNIQUE_ID/ \
-u pk_gEVUPX6FwObZSgg3v0BjkVxmdzatPyV9: \
-d metadata[name]="Customer Name"
Will respond with 200 OK
status, and the full customer object if valid, or fail with failure HTTP status code.