---
title: "Retry on-ramp swap with permit"
method: POST
path: "/api/v1/onramp-swap-with-permit"
tags: ["External Wallet Access Mode"]
---

# Retry on-ramp swap with permit

`POST /api/v1/onramp-swap-with-permit`

Executes the destination-chain swap retry for a failed on-ramp. Requires a fresh quote with scene swap_retry; request fields must match the quote cache and the original retry record.

## Headers

- `tokenId` string, required
- `network` string, required
- `sign` string, required
- `hash` string, required
- `deadline` string, required

## Request body

- object
  - `quoteId` string, required — quoteId from a fresh quote with scene swap_retry.
  - `chainId` string, required — Destination chain ID (CAIP-2), from the pending retry.
  - `originalTxHash` string, required — Original on-ramp transaction hash, from the pending retry.
  - `usdcAmount` string, required — Stuck USDC amount in smallest units.
  - `tokenOut` string, required — Destination token address.
  - `minAmountOut` string, required — best.minAmountOut from the retry quote.
  - `aggregator` string, required — best.to from the retry quote.
  - `swapCalldata` string, required — best.swapCalldata from the retry quote.
  - `permitDeadline` integer, required — Unix seconds until which the permit is valid.
  - `permitV` integer, required — EIP-2612 signature component v.
  - `permitR` string, required — EIP-2612 signature component r.
  - `permitS` string, required — EIP-2612 signature component s.

## Response `200`

Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.

- EwaEnvelope — Standard response envelope for the user API (api.ur.app).
  - `retCode` integer, required — 0 on success; non-zero indicates failure.
  - `retMsg` string, required — Human-readable message; error details when retCode is non-zero.
  - `result` unknown
  - `timeNow` integer — Server timestamp in milliseconds.

---

[API](https://skmtc.net/ur/apis/ur-api.md) · [All operations](https://skmtc.net/ur/apis/ur-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ur/ur-api/revisions/087dcf516ce2/schema)
