> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getsinbad.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getsinbad.com/_mcp/server.

# Cancel before payment

> Prepare the cancelPrePaid transaction for the customer's wallet to sign.

```http
POST /v1/trades/{tradeId}/actions/cancelPrePaid/execution
Authorization: Bearer <sessionToken>
```

## Before you call

* A customer session for the same partner, integration, customer, wallet and chain.
* Customer BUY; funded escrow still in CREATED, before marking payment sent.

Send no request body. Every call returns a new prepared transaction, and no `Idempotency-Key` is needed.

## Response: unsigned prepared transaction

```json
{
  "chainId": 80002,
  "from": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a",
  "call": {
    "to": "0x3333333333333333333333333333333333333333",
    "data": "0x6097985e000000000000000000000000000000000000000000000000000000000000002a",
    "value": "0"
  },
  "escrowId": "42",
  "action": "cancelPrePaid",
  "transaction": {
    "preparationId": "preparation_cancelPrePaid",
    "purpose": "cancelPrePaid",
    "chainId": 80002,
    "from": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a",
    "to": "0x3333333333333333333333333333333333333333",
    "data": "0x6097985e000000000000000000000000000000000000000000000000000000000000002a",
    "value": "0",
    "expiresAt": null
  }
}
```

## Errors

**409: Action unavailable in the current state**

```json
{
  "error": {
    "code": "CONFLICT",
    "numericId": 1004,
    "message": "Action is unavailable for this role or trade state. Refresh the trade.",
    "requestId": "request_demo",
    "details": {
      "action": "cancelPrePaid",
      "chainStatus": 3,
      "reason": "INVALID_STATE"
    }
  }
}
```

## Sign, submit and confirm

1. Prepare the call shown above. Preparing does not execute the action.
2. Ask the customer's registered wallet to sign `transaction`, keeping its chain, sender, destination, data and value unchanged.
3. [Submit the signed transaction or its hash](https://docs.getsinbad.com/api-reference/transactions/submit-prepared-transaction) with the same `preparationId` and an `Idempotency-Key`.
4. [Poll the transaction status](https://docs.getsinbad.com/api-reference/transactions/get-prepared-transaction-status), then [read the trade](https://docs.getsinbad.com/api-reference/trades/get-partner-trade). The transaction can be confirmed before the trade shows the new status.

Trade actions have no signing deadline (`expiresAt` is `null`), but Sinbad checks the trade's current escrow state and timing when you prepare. If a send is pending or its outcome is unknown, keep tracking it and do not sign another transaction.

The shared route and schema are in the [API reference](https://docs.getsinbad.com/api-reference/trade-actions/prepare-partner-customer-action).