Skip to main content
This quickstart runs entirely in the sandbox. It takes about 15 minutes and uses curl and jq. Every request here is a real request against https://api.voucher-staging.allride.io; nothing you do affects production.
1

Get sandbox access and an API key

  1. Get a sandbox account. If you have no sandbox sign-in yet, send your AllRide account manager (or AllRide through the Support link at the top of this site) your company name and the email address of your first user. AllRide creates your consumer partner in the sandbox and sends that user an invitation.
  2. Sign in to the sandbox developer dashboard and request API access for your consumer partner. AllRide activates it; you get an email when it is active.
  3. Open API keys and create a key with these scopes:
    • view-consumer-catalog
    • create-consumer-redemptions
    • view-consumer-redemptions
    • manage-webhooks
  4. Copy the key now: it starts with vk_test_ and is shown only once.
Export the base URL and the key in your shell:
Check that the key works and has the scopes you expect:
environment is test in the sandbox. A 401 with errorCode api-key-invalid means the key is mistyped or belongs to production; a 403 with api-access-inactive means API access is not active yet.
2

List your catalog

Ask for the voucher sets that are active and switched on for your channels:
The sandbox seeds the provider sandbox-scooters with the voucher set Sandbox ride credit and switches that provider on for every new consumer. Note the set’s id:
Each entry carries priceAcceptance.status. A set is redeemable only after a user of your partner accepted its Price Terms. The sandbox sets show priceAcceptance.status: acceptance-required: they carry a €0 sandbox price that is never billed. Open Prices in the sandbox consumer dashboard and accept it once before you redeem (Prices and price acceptance).
3

Redeem a voucher

Redeem one voucher for a customer of yours. The inline redemptionEntity creates (or reuses) a redemption entity with your own reference, and the Idempotency-Key makes the request safe to retry:
The response is 201 Created with the issued voucher in issued:
The example is shortened; Create a redemption shows every field. The issued code is a secret for your customer: show it only to the customer it was issued to.A 409 price-acceptance-required here means the previous step was skipped: accept the sandbox price in Prices, then send the request again with a new Idempotency-Key.
4

Repeat the identical request

Send exactly the same request again, with the same Idempotency-Key:
You get the same 201 body, including the same issued code, and the header Idempotent-Replayed: true. No second voucher was redeemed. This is how you retry after a timeout or a network error without redeeming twice (Idempotency).
5

Receive and verify a webhook

Register a publicly reachable HTTPS endpoint you control (port 443 or 8443) for redemption-created:
Store firstSecret and secondSecret in your secret manager: they are shown only in this response. Then send a test event to the endpoint:
Your endpoint receives a webhook-endpoint-test event with the header x-signing-signature: t=…,s1=…,s2=…. Verify it as described in Verifying signatures and answer with any 2xx status within 15 seconds. From now on, every redemption of your partner also sends a signed redemption-created event to this endpoint.
6

Next steps