Handling Redeliveries

If a delivery fails or needs to be cancelled, you can cancel it and request a redelivery. Redeliveries follow the same two-step flow as a new delivery -- get a redelivery fee first, then request the redelivery using the returned fee ID. The fee is charged from your relay wallet.

Cancelling a delivery

To cancel an active delivery, pass the delivery reference and a reason.

curl --request POST \
  --url https://api.relay.chowdeck.com/relay/delivery/{reference}/cancel \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "reason": "Customer is no longer available"
  }'

Request body:

FieldTypeRequiredDescription
reasonstringNoThe reason for cancelling the delivery

A successful response confirms the cancellation and returns the refund amount:

{
  "status": "success",
  "message": "Delivery cancelled successfully",
  "data": {
    "id": 98765,
    "reference": "my-delivery-ref-001",
    "status": "cancelled",
    "refund_amount": 80000,
    "currency": "NGN"
  }
}

refund_amount is in the smallest currency unit and reflects what was returned to your wallet.

Not all deliveries can be cancelled depending on their current status. If a rider has already picked up the package, cancellation may not be possible.


Requesting a redelivery

Step 1 -- Get a redelivery fee

Pass the reference of the original delivery to get a fee quote for the redelivery.

curl --request POST \
  --url https://api.relay.chowdeck.com/relay/redelivery/fee \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "reference": "my-delivery-ref-001"
  }'

A successful response returns a fee ID to use in the next step.

{
  "status": "success",
  "message": "Redelivery fee calculated successfully",
  "data": {
    "reference": "my-delivery-ref-001",
    "fee_id": 9021,
    "amount": 150000,
    "currency": "NGN"
  }
}

Step 2 -- Request the redelivery

curl --request POST \
  --url https://api.relay.chowdeck.com/relay/redelivery \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "reference": "my-delivery-ref-001",
    "fee_id": 9021
  }'

Request body:

FieldTypeRequiredDescription
referencestringYesReference of the original delivery
fee_idintegerYesThe fee_id from the Get Redelivery Fee response

A successful response confirms the redelivery request:

{
  "status": "success",
  "message": "Redelivery requested successfully",
  "data": {
    "id": 98765,
    "reference": "my-delivery-ref-001",
    "redelivery_amount": 150000,
    "currency": "NGN"
  }
}

The redelivery fee is deducted directly from your relay wallet. Make sure your wallet has sufficient balance before requesting a redelivery.


Error responses

All failed requests return this shape:

{
  "status": "failed",
  "message": "..."
}