credit-packs

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

GET /v1/credit-packs #

The credit packs the tenant sells

Not paged: the response is the complete list.

Parameters

NameInTypeDescription
activequerybooleantrue leaves out packs withdrawn from sale

Responses

StatusMeaningBody
200OKCreditPackList
Example response
{
  "packs": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "name": "string",
      "credits": "string",
      "price_minor": "string",
      "currency": "string",
      "active": false,
      "create_time": "2026-11-03T10:15:00Z",
      "validity_days": 1
    }
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/credit-packs \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/credit-packs #

Add a credit pack

A pack is a number of credits for a price in one currency. A customer buys it through a payment link; the credits are granted when the payment is confirmed.

Request body

FieldTypeDescription
name requiredstring
credits requiredstring · int64int64, above zero (a number is accepted too)
price_minor requiredstring · int64int64 minor units of the currency, above zero
currency requiredstring
validity_daysintegerThe credits bought expire after this many days; 0 or absent: they never expire
Example
{
  "name": "string",
  "credits": "string",
  "price_minor": "string",
  "currency": "string"
}

Responses

StatusMeaningBody
201CreatedCreditPack
400Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "name": "string",
  "credits": "string",
  "price_minor": "string",
  "currency": "string",
  "active": false,
  "create_time": "2026-11-03T10:15:00Z",
  "validity_days": 1
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/credit-packs \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","credits":"string","price_minor":"string","currency":"string"}'

POST /v1/credit-packs/{id}/activate #

Put a credit pack back on sale

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Responses

StatusMeaningBody
200OKEmptyObject
404Error envelopeError
Example response
{}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/credit-packs/<id>/activate \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/credit-packs/{id}/deactivate #

Withdraw a credit pack from sale

Credits already sold are not touched.

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Responses

StatusMeaningBody
200OKEmptyObject
404Error envelopeError
Example response
{}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/credit-packs/<id>/deactivate \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

Models

CreditPack

FieldTypeDescription
id requiredstring · uuid
name requiredstring
credits requiredstring · int64
price_minor requiredstring · int64
currency requiredstring
active requiredboolean
create_time requiredstring · date-time
validity_days requiredinteger0: the credits bought never expire

CreditPackInput

FieldTypeDescription
name requiredstring
credits requiredstring · int64int64, above zero (a number is accepted too)
price_minor requiredstring · int64int64 minor units of the currency, above zero
currency requiredstring
validity_daysintegerThe credits bought expire after this many days; 0 or absent: they never expire

CreditPackList

FieldTypeDescription
packs requiredarray of CreditPack

EmptyObject

object

Error

FieldTypeDescription
error requiredobject