Skip to main content
POST
/
subscriptions
/
use-credits
Use credits
curl --request POST \
  --url https://api.sprucecollective.co.uk/subscriptions/use-credits \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credits_to_use": 2,
  "raffle_id": "<string>",
  "usage_type": "raffle_entry"
}
'
{
  "credits_remaining": 123,
  "credits_used": 123,
  "entries_created": 123,
  "message": "<string>",
  "payment_id": "<string>",
  "success": true,
  "usage_id": "<string>"
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Body

application/json

Credit usage request

credits_to_use
integer
required
Required range: x >= 1
raffle_id
string
required
usage_type
enum<string>
Available options:
raffle_entry,
bonus_draw,
other

Response

OK

credits_remaining
integer
credits_used
integer
entries_created
integer
message
string
payment_id
string

Payment transaction ID for tracking

success
boolean
usage_id
string