Skip to main content
GET
/
api
/
v1
/
credits
/
auto-recharge
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1.events.credits.getAutoRecharge({
  currencyId: 'currencyId',
  customerId: 'customerId',
});

console.log(response.data);
{
  "data": {
    "id": null,
    "customerId": "customer-123",
    "currencyId": "credits",
    "isEnabled": false,
    "thresholdType": "CREDIT_AMOUNT",
    "thresholdValue": 0,
    "targetBalance": 0,
    "maxSpendLimit": null,
    "grantExpirationPeriod": "1_YEAR",
    "createdAt": null,
    "updatedAt": null
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Query Parameters

customerId
string
required

Filter by customer ID (required)

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
currencyId
string
required

Filter by currency ID (required)

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$

Response

The automatic recharge configuration object.

Response object

data
AutoRechargeSettings · object
required

Automatic recharge configuration for a customer and currency