API reference · Testing
Sandbox
Simulate a customer paying, collecting and returning a car, with a test key.
/sandbox/bookings/{reference}/{step}Move a test booking forward
With a test key, simulate what happens in real life so you can watch your webhooks and your own code react: pay (the customer pays → confirmed), activate (the customer collects the car → active) and complete (the car is back → completed). Only test bookings made with test keys of your own business.
Path parameters
referencestringrequiredThe booking reference.
Example:
WC-7KQ2M9XAstepstringrequiredpay, activate or complete.
payactivatecompleteExample:
pay
Response 200
In data:
referencestringrequirede.g. WC-7KQ2M9XA. Show it to your customer.
statusenumrequiredpending_paymentconfirmedactivecompletedcancelledexpiredtestbooleanTrue for a sandbox booking.
fromdate-timerequiredISO 8601 date-time.
todate-timerequiredISO 8601 date-time.
vehicleVehiclerequiredShow 15 fields
idintegerrequiredtitlestringrequirede.g. “2021 Toyota Camry”.
makestringmodelstringyearintegerclassenumrequiredeconomysedansuvvanluxurytransmissionenumautomaticmanualfuelenumpetroldieselhybridelectricseatsintegercolourstring · nullablephotosarray of stringdailyRateintegerrequiredPrice per 24 hours.
depositintegerRefundable deposit.
locationobjectrequiredShow 4 fields
idintegercodestringrequirednamestringcitystring
ratingobject · nullableShow 2 fields
averagenumberAverage of 1 to 5 stars, one decimal.
countintegerPublished reviews of this car.
pickupobjectShow 3 fields
codestringnamestringinstructionsstring · nullable
dropoffobjectShow 2 fields
codestringnamestring
customerCustomerShow 3 fields
namestringrequiredemailstringrequiredphonestringrequiredInternational format preferred, e.g. +2348031234567.
priceobjectrequiredShow 9 fields
currencystringdaysintegerlinesarray of QuoteLineShow 6 fields
codestringrequiredrental, an extra’s code, one_way or discount.
labelstringrequiredquantityintegerunitAmountintegerAmount in kobo (₦1 = 100 kobo).
amountintegerrequiredNegative for a discount.
pricingenumper_dayflatdiscount
listSubtotalintegerAmount in kobo (₦1 = 100 kobo).
discountobject · nullableShow 2 fields
codestring · nullableamountintegerAmount in kobo (₦1 = 100 kobo).
subtotalintegerAmount in kobo (₦1 = 100 kobo).
depositintegerAmount in kobo (₦1 = 100 kobo).
totalintegerAmount in kobo (₦1 = 100 kobo).
refundedintegerAmount in kobo (₦1 = 100 kobo).
commissionintegerYour commission on this booking (businesses only).
flightNumberstring · nullablecheckedInAtdate-time · nullableISO 8601 date-time.
arrivalNotestring · nullablemetadataobjectYour own key/value pairs.
createdAtdate-timeISO 8601 date-time.
holdExpiresAtdate-time · nullableWhile unpaid: when the car is released.
checkoutUrlstringSend the customer here to pay (only while unpaid).
cancellationobjectShow 8 fields
allowedbooleanFalse once it is cancelled, collected or finished.
refundPercentintegerShare of the rental price refunded if cancelled right now: 100 (12 h or more before pick-up), 95 (6 to 12 h), 90 (under 6 h). The deposit always comes back in full.
rentalRefundintegerAmount in kobo (₦1 = 100 kobo).
feeintegerThe cancellation fee that would be kept.
depositReturnedintegerAmount in kobo (₦1 = 100 kobo).
refundTotalintegerWhat goes back to the customer in all.
changesAtdate-time · nullableWhen the refund drops to the next level.
nextPercentinteger · nullableThe refund percent from then on.
earlyReturnobject · nullableShow 7 fields
requestedAtdate-time · nullableWhen the customer asked to return early (the clock stops there if the car arrives within the grace period).
timeBasedPaidintegerThe part of the rental price that is for time (spread evenly over the booked period).
bookedSecondsintegerusedSecondsintegerunusedSecondsintegerrentalRefundintegerRefund for the unused time if the car is returned now.
depositReturnedintegerAmount in kobo (₦1 = 100 kobo).
overstayobject · nullableShow 5 fields
lateSecondsintegerSeconds past the return time.
graceSecondsintegerFree seconds after the return time.
billedSecondsintegerLate seconds that are charged (after the grace period).
ratePerHourintegerThe late rate per hour, frozen when the booking was made.
chargeSoFarintegerThe late charge if the car were handed back now (it runs to the second).
lateTermsobjectShow 2 fields
ratePerHourintegerWhat a late return costs per hour (to the second) once the grace period has passed. Frozen when the booking was made.
graceMinutesintegerFree minutes after the return time.
tripUpdatesobject · nullableShow 2 fields
whatsappbooleanTrue when the customer opted in to WhatsApp updates.
schedulearray of objectShow 4 fields
stagestringlabelstringatdate-timeISO 8601 date-time.
doneboolean
reviewobjectShow 2 fields
allowedbooleanTrue once the car is returned and no review has been left yet.
submittedAtdate-time · nullableISO 8601 date-time.
returnedAtdate-time · nullableWhen the car was handed back.
balanceobject · nullableShow 2 fields
dueintegerWhat the customer still owes after the car came back (a late charge larger than the deposit).
paidAtdate-time · nullableISO 8601 date-time.
settlementSettlement | nullThe closing statement, once the booking is cancelled or the car is back.
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).404not_found: no such thing, or it is not yours.409conflict or unavailable: not possible in the current state, or the car was just taken.
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/sandbox/bookings/WC-7KQ2M9XA/pay" \
-H "Authorization: Bearer wc_test_YOUR_KEY"/sandbox/orders/{reference}/{step}Move a test purchase forward
With a test key: pay-deposit (→ reserved), pay-balance (the transfer reaches escrow → paid) and complete (car and papers handed over → completed).
Path parameters
referencestringrequiredThe order reference.
Example:
WS-4HZ8P2LDstepstringrequiredpay-deposit, pay-balance or complete.
pay-depositpay-balancecompleteExample:
pay-deposit
Response 200
In data:
referencestringrequirede.g. WS-7KQ2M9XA.
statusenumrequiredpending_paymentreservedpaidcompletedcancelledexpiredtestbooleanvehicleVehiclerequiredShow 15 fields
idintegerrequiredtitlestringrequirede.g. “2021 Toyota Camry”.
makestringmodelstringyearintegerclassenumrequiredeconomysedansuvvanluxurytransmissionenumautomaticmanualfuelenumpetroldieselhybridelectricseatsintegercolourstring · nullablephotosarray of stringdailyRateintegerrequiredPrice per 24 hours.
depositintegerRefundable deposit.
locationobjectrequiredShow 4 fields
idintegercodestringrequirednamestringcitystring
ratingobject · nullableShow 2 fields
averagenumberAverage of 1 to 5 stars, one decimal.
countintegerPublished reviews of this car.
buyerCustomerShow 3 fields
namestringrequiredemailstringrequiredphonestringrequiredInternational format preferred, e.g. +2348031234567.
priceobjectrequiredShow 5 fields
currencystringtotalintegerAmount in kobo (₦1 = 100 kobo).
depositintegerAmount in kobo (₦1 = 100 kobo).
balanceDueintegerAmount in kobo (₦1 = 100 kobo).
refundedintegerAmount in kobo (₦1 = 100 kobo).
commissionintegerYour referral commission (businesses only).
holdExpiresAtdate-time · nullableISO 8601 date-time.
reservedUntildate-time · nullableWhile reserved: when the hold ends.
metadataobjectcreatedAtdate-timeISO 8601 date-time.
checkoutUrlstringThe deposit payment link (while unpaid).
Errors
401unauthorized: the API key is missing, wrong or revoked.403forbidden: this key may not do that (wrong plan, not a business, or the account is not approved).404not_found: no such thing, or it is not yours.409conflict or unavailable: not possible in the current state, or the car was just taken.
curl -X POST "https://engine-production-0004.up.railway.app/api/v1/sandbox/orders/WS-4HZ8P2LD/pay-deposit" \
-H "Authorization: Bearer wc_test_YOUR_KEY"