Skip to main content
POST
/
raffles
/
checkout
Create checkout session
curl --request POST \
  --url https://api.sprucecollective.co.uk/raffles/checkout \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entries_count": 25,
  "raffle_id": "<string>",
  "payment_method": "<string>"
}
'
{
  "amount": 123,
  "checkout_url": "<string>",
  "currency": "<string>",
  "entries_count": 123,
  "order_id": "<string>",
  "signature": "<string>",
  "timestamp": 123
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Checkout request data

entries_count
integer
required
Required range: 1 <= x <= 50
raffle_id
string
required
payment_method
string

"apple_pay", "card", etc.

Response

OK

amount
integer
checkout_url
string
currency
string
entries_count
integer
order_id
string
signature
string

HMAC signature to prevent tampering

timestamp
integer

Unix timestamp for signature validation