MMelo Developers
Api reference

Cancel a transfer

POST
/transfer/{transferId}/cancel

Cancels a transfer before shipping starts. A transfer can be cancelled only while it is at the created or payed step; once a courier has picked up the parcel it can no longer be cancelled.

The first pending step is marked failed (for a paid transfer, that is shipped) and the transfer state becomes failed. If the transfer was paid, its price is refunded to the merchant balance. Webhooks fire with the same payload as any other step change.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token returned by POST /auth/token.

In: header

Path Parameters

transferId*string

Melo transfer UUID returned by POST /transfer.

Formatuuid

Request Body

application/json

An empty JSON object.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/transfer/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "3f1c2a8e-5b7d-4e0a-9c6f-1a2b3c4d5e6f",  "state": "failed",  "steps": [    {      "step": "created",      "order": 0,      "status": "completed",      "occuredAt": "2026-09-23T10:00:00.000Z"    },    {      "step": "payed",      "order": 1,      "status": "completed",      "occuredAt": "2026-09-23T10:00:00.000Z"    },    {      "step": "shipped",      "order": 2,      "status": "failed",      "occuredAt": "2026-09-23T10:15:00.000Z"    },    {      "step": "delivered",      "order": 3,      "status": "pending",      "occuredAt": "2026-09-23T10:00:00.000Z"    }  ]}