Deliveries, wallet funding and the sandbox
How the delivery and money endpoints behave in v1, in Test and Live mode.
Deliveries
POST /deliveriesbooks from a quote (quote_id):201with statusscheduled, the tracking code and the wallet debited at once. A quote books one delivery: using it again is409 QUOTE_ALREADY_USEDwitherror.delivery_id, and an expired quote (or one whose address you deleted) is409 QUOTE_EXPIRED.- If the wallet doesn't cover it you get
402 INSUFFICIENT_BALANCE(402 CREDIT_LIMIT_REACHEDfor an invoice account): nothing is created and the quote stays unused. Fund the wallet and retry with the sameIdempotency-Key. - Leave out
quote_idto create a draft from two saved addresses in any status. A draft never gets a402: it waits withCONFIRM_PICKUP_ADDRESS,CONFIRM_DROPOFF_ADDRESS,AWAITING_PRICE,BOOKorFUND_WALLET. Withauto_book: trueit books itself once it is priced and the price is withinmax_total; abovemax_totalit waits withBOOK.max_totalnever limitsPOST /deliveries/{id}/book. pickup_instructionsanddropoff_instructions(up to 500 characters) are for that delivery only; the rider sees them before the address's own notes.PATCH /deliveries/{id}changes them,referenceandmetadata(nullclears a field): the pickup instructions until the parcel is collected, the drop-off instructions until it is delivered, and never on a cancelled delivery (409 ACTION_NOT_ALLOWED). Sending an address or the package is422.POST /deliveries/{id}/book(402when short,409 ACTION_NOT_ALLOWEDwhen not priced or already booked,503while live booking is paused),POST /deliveries/{id}/ready(409on a delivered or cancelled delivery) andPOST /deliveries/{id}/cancel(reasonbecomescancellation.note;409 CANCEL_NOT_ALLOWEDonce the rider has set off) answer.- A delivery booked as it is created sends
delivery.created(alreadyscheduled) thendelivery.booked. A fresh draft'seventsis empty: the timeline lists statuses the delivery moved to.
Idempotency
Requests that fail with 401, 402, 403, 409 or 429 release the Idempotency-Key, so retry with it once the cause is fixed. 400, 404 and 422 answers are saved and replayed with Idempotent-Replayed: true, like a success. A key you also used on the dashboard is 422 IDEMPOTENCY_KEY_REUSED.
Money
POST /wallet/fundreturns{ amount, currency, payment_url, reference }. Your credentials act for the account: any live credentials can start a top-up, and Paystack sends the receipt to the account Owner. A test token, or an invoice account, gets409 ACTION_NOT_ALLOWED.POST /sandbox/wallet/fundcredits the test wallet at once and books drafts waiting onFUND_WALLET. AnIdempotency-Keyis optional there: a retry with the same key never credits twice. Invoice accounts get409.POST /sandbox/deliveries/{id}/advancemoves a sandbox delivery and fires the real webhooks. Both sandbox endpoints answer403 TEST_MODE_ONLYto live credentials.
Nothing is removed or renamed. Clients that ignore unknown fields need no change.