credits
Stable. Describes behaviour that is built and covered by tests in this repository.
GET /v1/credits/settings #
The low-balance threshold of the credits.low event
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | CreditSettings |
Example response
{
"low_threshold": "string"
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/credits/settings \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"PUT /v1/credits/settings #
Set the low-balance threshold
A consume that takes a customer's balance from at least low_threshold credits to fewer announces credits.low once (the webhook event). 0, the default, turns it off.
Request body
| Field | Type | Description |
|---|---|---|
low_threshold | string · int64 | int64 credits; 0 turns credits.low off |
Example
{}Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | CreditSettings |
400 | Error envelope | Error |
Example response
{
"low_threshold": "string"
}curl
curl -X PUT https://YOUR-API-ADDRESS/v1/credits/settings \
-H "Authorization: Bearer $PAYRUDDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Models
CreditSettings
| Field | Type | Description |
|---|---|---|
low_threshold required | string · int64 | int64 credits; 0 turns credits.low off |
CreditSettingsInput
| Field | Type | Description |
|---|---|---|
low_threshold | string · int64 | int64 credits; 0 turns credits.low off |
Error
| Field | Type | Description |
|---|---|---|
error required | object |