API Reference

Swaps

Quote, create, sign and submit same-chain swaps: Stellar path payments by default, Solana's and Monad's own markets with `chain`.

POST
/v1/swaps/quote

Prices amount of the source asset on the chain's own venue: the Stellar DEX (a Horizon strict-send path search on the key's network) when chain is omitted or stellar, the Solana swap route for solana and the Monad swap route for monad, both mainnet only. The answer carries the plan commission (fee: taken from the source amount on Stellar, from the output on Solana and Monad), any merchantFee, the estimated output and the minimum after slippage. slippageBps defaults to 50 and a value above the cap (500) is slippage_exceeded, unless the deployment configures other values.

Requires the swaps:read scope. The shared public key may call it.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

application/json
  1. body

A same-chain swap quote request: sell amount of the source asset for the destination asset on one chain (Stellar when chain is omitted).

chain?string

The chain to swap on. Omitted means Stellar. solana → the Solana swap route, monad → the Monad swap route; both mainnet only. Swaps between chains are /v1/cross-chain-swaps.

Default"stellar"
Value in"stellar""solana""monad"
sourceAssetCode?string

The asset being sold. Stellar: an asset code (native if omitted). Solana / Monad: SOL / MON, "native", or the mint / ERC-20 address.

sourceAssetIssuer?string

Stellar only: issuer account for a non-native source asset.

amount*string

Gross amount of the source asset to swap, in its own units (decimal; at most 7 places on Stellar, the token decimals elsewhere). Stellar deducts the platform fee from it; Solana and Monad take it from the output.

destAssetCode*string

The asset being bought, spelled as for sourceAssetCode.

destAssetIssuer?string

Stellar only: issuer account for the destination asset (required unless it is native).

slippageBps?number

Slippage tolerance in basis points (50 = 0.5%) used to derive the on-chain minimum received. Defaults to the service setting; capped by it.

merchantFee?

Your own fee on this swap, paid in the source asset to wallet out of the source wallet, in the same transaction, beside the plan commission. Stellar: its own payment (the wallet must trust the asset). Solana: a transfer appended to the Solana swap route's transaction (a SOL fee goes to an existing account). paidBy: recipient takes it from amount (the swap routes less); payer adds it on top (the source sends amount plus the fee). Monad: through the deployment’s merchant fee router, which the wallet sends or approves the input plus the fee; without one configured, merchant_fee_unsupported.

OK

network_unsupported: chain: solana | monad with a dev (testnet) key: the Solana swap route and the Monad swap route run on mainnet only. asset_unsupported: not an SPL mint / ERC-20 on that chain. provider_error: the aggregator found no route or refused the amount. merchant_fee_unsupported: a merchantFee on a Monad swap where no merchant fee router is configured on this deployment.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

The budget in x-cosmos-rate-limit is spent for this caller. Honour Retry-After.

The ratelimit-* triple rides along on successful responses too, so a client can pace itself instead of being refused. If the counter store itself is unreachable the guard fails closed and answers 503 provider_unavailable.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

The provider named in x-cosmos-upstream refused the request (provider_error) or could not be reached at all (provider_unavailable). Nothing was charged; retry is safe with the same Idempotency-Key.

misconfigured: the plan charges a commission and the chain has no fee wallet configured (STELLAR_SWAP_FEE_WALLET, SOLANA_SWAP_FEE_WALLET, MONAD_SWAP_FEE_WALLET), or the deployment’s merchant fee router is not the expected contract.

The provider in x-cosmos-upstream did not answer in time. Whether it acted on the request is unknown. Retry with the same Idempotency-Key, never with a fresh one.

Example Request
curl -X POST 'https://api.cosmospay.lat/cosmos-api/v1/swaps/quote' \  -H 'Content-Type: application/json' \  -d '{  "amount": "100",  "destAssetCode": "USDC"}'
Example Response
{  "network": "testnet",  "chain": "solana",  "provider": "jupiter",  "source": {    "asset": "native",    "issuer": null,    "amount": "100"  },  "fee": {    "asset": "native",    "issuer": null,    "amount": "0.5",    "bps": 50,    "wallet": "GBFEE...WALLET",    "label": "Cosmos Swap Commission"  },  "swap": {    "asset": "native",    "issuer": null,    "amount": "100"  },  "merchantFee": {    "bps": 150,    "fixed": "0.25",    "amount": "1.75",    "asset": "XLM",    "wallet": "GBDHAQXQQ75WVBUZ2IX3O7ME7JOKJUOUPUXRNDCORUJODWQCTVUEQ62R",    "paidBy": "recipient"  },  "destination": {    "asset": "USDC",    "issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTR6F3DSZL5A3W4G4M4N4A5U4QY3T6",    "estimated": "24.81",    "minimum": "24.68595",    "slippageBps": 50  },  "path": [    {      "code": "yXLM",      "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"    }  ]}
GET
/v1/swaps

Stellar swaps when chain is omitted, otherwise those of the chain named, newest first and optionally filtered by status. Paginated with take (default 20, max 100) and skip; the answer is { data, total, take, skip }. Only swaps on the key's network are listed (a prod key sees mainnet, a dev key testnet), and Solana and Monad swaps are mainnet only, so a dev key lists none of them.

Requires the swaps:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

chain?string

Which chain to list. Omitted means Stellar.

Default"stellar"
Value in"stellar""solana""monad"
status?string

Only swaps in this status.

Value in"PENDING""SUBMITTED""SUCCEEDED""FAILED""EXPIRED"
take?number

How many swaps to return per page (1 to 100).

Rangevalue <= 100
Default20
skip?number

How many swaps to skip before this page, for pagination.

Default0

Stellar swaps (no chain), or those of the chain named.

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/swaps'
Example Response
{  "data": [    {      "id": "clx9z8a1b0000abcd1234efgh",      "status": "PENDING",      "network": "testnet",      "source": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",      "destination": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",      "sendAsset": "native",      "sendAssetIssuer": null,      "sendAmount": "100",      "feeAmount": "0.5",      "feeBps": 50,      "swapAmount": "99.5",      "merchantFee": {        "bps": 150,        "fixed": "0.25",        "amount": "1.75",        "asset": "XLM",        "wallet": "GBDHAQXQQ75WVBUZ2IX3O7ME7JOKJUOUPUXRNDCORUJODWQCTVUEQ62R",        "paidBy": "recipient"      },      "destAsset": "USDC",      "destAssetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTR6F3DSZL5A3W4G4M4N4A5U4QY3T6",      "destEstimated": "24.81",      "destMin": "24.68595",      "slippageBps": 50,      "path": [        {          "code": "yXLM",          "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"        }      ],      "memo": null,      "idempotencyKey": "swap-retry-2026-08-23-001",      "xdr": "AAAAAgAAAABx…(base64 XDR)…AAAAAAAAAAA=",      "uri": "web+stellar:tx?xdr=AAAAAgAAAABx…",      "txHash": "3389e9f0...64hex",      "expiresAt": "2026-06-29T12:39:56.000Z",      "createdAt": "2026-06-29T12:34:56.000Z",      "updatedAt": "2026-06-29T12:34:56.000Z"    }  ],  "total": 1,  "take": 20,  "skip": 0}
POST
/v1/swaps

Prices the swap as the quote does, builds the transaction source signs, stores it as PENDING and emits SWAP_CREATED. Stellar: the XDR with a SEP-7 uri and QR, valid for the network timeout (300 s by default); when the swap pays source itself (no destination, or the same account) and it does not trust the bought asset yet, the transaction adds that trustline first. Solana and Monad (mainnet only): the aggregator’s transaction, valid for one minute on Solana and two on Monad, where an ERC-20 sale may also carry an approval to send first. Send the signed transaction to POST /v1/swaps/{id}/submit; an Idempotency-Key (header or body) makes a retry return the same swap.

Requires the swaps:write scope. The shared public key may call it.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

Idempotency-Key?string

Optional idempotency key. A retry with the same key and the same request returns the existing swap (same id and txHash); the same key with a different request is 409 idempotency_conflict. Takes precedence over body.idempotencyKey.

application/json
  1. body

A same-chain swap request: the quote fields plus the account that signs (source). The answer is the unsigned transaction for that account to sign.

chain?string

The chain to swap on. Omitted means Stellar. solana → the Solana swap route, monad → the Monad swap route; both mainnet only. Swaps between chains are /v1/cross-chain-swaps.

Default"stellar"
Value in"stellar""solana""monad"
sourceAssetCode?string

The asset being sold. Stellar: an asset code (native if omitted). Solana / Monad: SOL / MON, "native", or the mint / ERC-20 address.

sourceAssetIssuer?string

Stellar only: issuer account for a non-native source asset.

amount*string

Gross amount of the source asset to swap, in its own units (decimal; at most 7 places on Stellar, the token decimals elsewhere). Stellar deducts the platform fee from it; Solana and Monad take it from the output.

destAssetCode*string

The asset being bought, spelled as for sourceAssetCode.

destAssetIssuer?string

Stellar only: issuer account for the destination asset (required unless it is native).

slippageBps?number

Slippage tolerance in basis points (50 = 0.5%) used to derive the on-chain minimum received. Defaults to the service setting; capped by it.

merchantFee?

Your own fee on this swap, paid in the source asset to wallet out of the source wallet, in the same transaction, beside the plan commission. Stellar: its own payment (the wallet must trust the asset). Solana: a transfer appended to the Solana swap route's transaction (a SOL fee goes to an existing account). paidBy: recipient takes it from amount (the swap routes less); payer adds it on top (the source sends amount plus the fee). Monad: through the deployment’s merchant fee router, which the wallet sends or approves the input plus the fee; without one configured, merchant_fee_unsupported.

source*string

Account paying for (and signing) the swap (the tx source) on chain.

destination?string

Account credited the destination asset. Defaults to source (a self-swap). On Stellar, when it is source and does not trust a non-native destination asset yet, the transaction adds that trustline first (see trustline on the response); any other account must already trust the asset, because only it can add the trustline. Stellar only: on Solana and Monad the output always goes to source.

memo?string

Stellar only: optional MEMO_ID (numeric uint64) echoed on-chain for reconciliation.

idempotencyKey?string

Optional idempotency key. Prefer the Idempotency-Key request header; when both are set, the header wins. A retry with the same key and the same request returns the existing swap instead of building another transaction; the same key with a different request is 409 idempotency_conflict.

A Stellar swap (no chain, or stellar), or a Solana / Monad swap. With the shared public key it carries publicToken: send it as X-Record-Token to read the swap or submit it.

Stellar: trustline_missing (the destination is another account that does not trust the bought asset, and only it can add the trustline; a source that receives the swap gets the trustline in the same transaction instead), insufficient_balance (the source cannot keep the 0.5 XLM reserve that trustline locks, after what the transaction sends and its fee), no_path_found. Solana / Monad: network_unsupported (a dev key), asset_unsupported, provider_error (no route, or the aggregator simulated a failure, usually a wallet that cannot cover the amount plus fees). Monad: merchant_fee_unsupported (a merchantFee and no merchant fee router configured on this deployment).

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

idempotency_conflict: this Idempotency-Key was already used for a different request, or an identical swap was already built without a key (retry with an Idempotency-Key, or wait for the prior swap to settle or expire). operation_in_flight: STELLAR_SWAP_SINGLE_INFLIGHT is on and this source account already has a PENDING swap.

The budget in x-cosmos-rate-limit is spent for this caller. Honour Retry-After.

The ratelimit-* triple rides along on successful responses too, so a client can pace itself instead of being refused. If the counter store itself is unreachable the guard fails closed and answers 503 provider_unavailable.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

The provider named in x-cosmos-upstream refused the request (provider_error) or could not be reached at all (provider_unavailable). Nothing was charged; retry is safe with the same Idempotency-Key.

misconfigured: the plan charges a commission and the chain has no fee wallet (or, on Solana, the fee wallet has no token account for the output mint yet), or, for a Monad swap with a merchant fee, the deployment’s merchant fee router is not the expected contract, or the Monad swap route moved to another router than the one it was built for.

The provider in x-cosmos-upstream did not answer in time. Whether it acted on the request is unknown. Retry with the same Idempotency-Key, never with a fresh one.

Example Request
curl -X POST 'https://api.cosmospay.lat/cosmos-api/v1/swaps' \  -H 'Content-Type: application/json' \  -d '{  "amount": "100",  "destAssetCode": "USDC",  "source": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ"}'
Example Response
{  "id": "clx9z8a1b0000abcd1234efgh",  "status": "PENDING",  "network": "testnet",  "source": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",  "destination": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",  "sendAsset": "native",  "sendAssetIssuer": null,  "sendAmount": "100",  "feeAmount": "0.5",  "feeBps": 50,  "swapAmount": "99.5",  "merchantFee": {    "bps": 150,    "fixed": "0.25",    "amount": "1.75",    "asset": "XLM",    "wallet": "GBDHAQXQQ75WVBUZ2IX3O7ME7JOKJUOUPUXRNDCORUJODWQCTVUEQ62R",    "paidBy": "recipient"  },  "destAsset": "USDC",  "destAssetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTR6F3DSZL5A3W4G4M4N4A5U4QY3T6",  "destEstimated": "24.81",  "destMin": "24.68595",  "slippageBps": 50,  "path": [    {      "code": "yXLM",      "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"    }  ],  "memo": null,  "idempotencyKey": "swap-retry-2026-08-23-001",  "commissionMemo": "Cosmos Swap Commission",  "trustline": null,  "xdr": "AAAAAgAAAABx…(base64 XDR)…AAAAAAAAAAA=",  "uri": "web+stellar:tx?xdr=AAAAAgAAAABx…",  "txHash": "3389e9f0...64hex",  "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…",  "expiresAt": "2026-06-29T12:39:56.000Z",  "createdAt": "2026-06-29T12:34:56.000Z",  "updatedAt": "2026-06-29T12:34:56.000Z",  "publicToken": "q3Zx0r8vH6c1yJ2bN5mT4kW9sD7fL0aE1gP3uR6iO2w"}
GET
/v1/swaps/{id}

The shared public key may call it, so a swap made without an account can follow its own status, but only with the swap’s publicToken in X-Record-Token: without it, or with another swap’s, the answer is 404. Every other key reads its own swaps as before. Listing swaps stays closed to the public key.

Requires the swaps:read scope. The shared public key may call it.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

id*string
X-Record-Token?string

Required with the shared public key: the publicToken the create response returned for this record. Without it, or with the token of another record, the answer is 404, as for a record that does not exist. Ignored for every other API key.

OK

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

No such resource, or it exists and belongs to another consumer. The two are deliberately the same answer: "exists but not yours" is an ownership oracle.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/swaps/string'
Example Response
{  "id": "clx9z8a1b0000abcd1234efgh",  "status": "PENDING",  "network": "testnet",  "source": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",  "destination": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",  "sendAsset": "native",  "sendAssetIssuer": null,  "sendAmount": "100",  "feeAmount": "0.5",  "feeBps": 50,  "swapAmount": "99.5",  "merchantFee": {    "bps": 150,    "fixed": "0.25",    "amount": "1.75",    "asset": "XLM",    "wallet": "GBDHAQXQQ75WVBUZ2IX3O7ME7JOKJUOUPUXRNDCORUJODWQCTVUEQ62R",    "paidBy": "recipient"  },  "destAsset": "USDC",  "destAssetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTR6F3DSZL5A3W4G4M4N4A5U4QY3T6",  "destEstimated": "24.81",  "destMin": "24.68595",  "slippageBps": 50,  "path": [    {      "code": "yXLM",      "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"    }  ],  "memo": null,  "idempotencyKey": "swap-retry-2026-08-23-001",  "commissionMemo": "Cosmos Swap Commission",  "trustline": null,  "xdr": "AAAAAgAAAABx…(base64 XDR)…AAAAAAAAAAA=",  "uri": "web+stellar:tx?xdr=AAAAAgAAAABx…",  "txHash": "3389e9f0...64hex",  "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…",  "expiresAt": "2026-06-29T12:39:56.000Z",  "createdAt": "2026-06-29T12:34:56.000Z",  "updatedAt": "2026-06-29T12:34:56.000Z"}
POST
/v1/swaps/{id}/submit

signedXdr (Stellar) or signedTransaction (Solana, Monad) must be the transaction built for this swap and carry its source's signature, checked before anything about the swap is answered. Stellar: broadcast through Horizon, the answer is SUCCEEDED or submitted: false with the result codes (a FAILED swap can be resubmitted up to 3 times while its envelope is valid). Solana and Monad: broadcast through this service's RPC, the swap is SUBMITTED until the observer sees it settle. A Monad wallet that sends the transaction itself (eth_sendTransaction) submits its txHash instead: the transaction is read from the network and checked the same way, then recorded as SUBMITTED; not on the network yet is transaction_not_found, retry in a few seconds, and the same hash again answers the swap as it is. Emits SWAP_SUBMITTED, then SWAP_SUCCEEDED or SWAP_FAILED; with the shared public key, send the swap's publicToken in X-Record-Token.

Requires the swaps:write scope. The shared public key may call it.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

id*string
X-Record-Token?string

With the shared public key, send the publicToken the create response returned for this record. A wrong token is 404, as for a record that does not exist. A missing one is still accepted for now (and logged as deprecated) so wallets that do not send it yet keep working; it becomes required here when the deployment sets PUBLIC_RECORD_TOKEN_REQUIRED_ON_LEGACY=true. Ignored for every other API key.

application/json
  1. body

The swap transaction: signedXdr for a Stellar swap, signedTransaction for a Solana swap, and for a Monad swap either signedTransaction (this service broadcasts it) or txHash (the wallet already broadcast it). Whichever is sent, it must be the transaction built for this swap.

signedXdr?string

Stellar swaps: the signed transaction envelope (base64 XDR). Required unless signedTransaction or txHash is sent.

signedTransaction?string

Solana and Monad swaps: the signed transaction, which this service broadcasts. Solana: base64 wire bytes of the VersionedTransaction; Monad: the 0x-hex raw EIP-1559 transaction (the eth_sendRawTransaction input). On Monad, send this or txHash, not both.

txHash?string

Monad swaps only: the hash of the swap transaction the wallet already broadcast, for wallets that send a transaction but never hand over its signed bytes (EVM browser wallets answer eth_sendTransaction with the hash alone). The service reads it from its Monad node and checks it is the call built for this swap (to, input, value), sent from the swap's source on chain 143, before anything about the swap is answered; it then records it and the swap is SUBMITTED until the observer sees it settle. Not on the node yet: 400 transaction_not_found, nothing recorded, retry in a few seconds. The same hash again answers the swap as it is. The approval transaction is sent by the wallet first and never submitted here. A Solana swap takes signedTransaction.

Match^0x[0-9a-fA-F]{64}$

OK

validation_failed: signedXdr (Stellar) / signedTransaction (Solana, Monad) is not a transaction, is not the one built for this swap, or carries no signature of its source; or txHash (Monad) names another transaction (the message names the field: to, input, value, from or chainId), the approval, or one recorded on another swap; or the body sends a field the swap does not take. transaction_not_found: the network does not have that txHash yet; nothing was recorded, retry in a few seconds. transaction_rejected: the Solana or Monad node refused the broadcast; the swap stays PENDING. invalid_state_transition: the swap can no longer be submitted, because it is EXPIRED, its transaction's validity window has passed, it was already submitted with another txHash, or it was already resubmitted the maximum number of times after a rejection. Build a new swap.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

No such resource, or it exists and belongs to another consumer. The two are deliberately the same answer: "exists but not yours" is an ownership oracle.

Rate limited (rate_limited), per consumer and client address. Honour Retry-After: the window is shorter than the envelope lifetime, so a retry after it still lands in time.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

The provider named in x-cosmos-upstream refused the request (provider_error) or could not be reached at all (provider_unavailable). Nothing was charged; retry is safe with the same Idempotency-Key.

provider_unavailable: the provider in x-cosmos-upstream is down or unreachable; the message names it. Retry.

misconfigured: this deployment is missing configuration the route needs (a provider instance, a fee wallet, the plan header the gateway must forward). Retrying will not help; it is an operator problem.

The provider in x-cosmos-upstream did not answer in time. Whether it acted on the request is unknown. Retry with the same Idempotency-Key, never with a fresh one.

Example Request
curl -X POST 'https://api.cosmospay.lat/cosmos-api/v1/swaps/string/submit' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "submitted": true,  "status": "SUCCEEDED",  "txHash": "3389e9f0...64hex",  "reason": null,  "resultCodes": [    "op_under_dest_min"  ],  "swap": {    "id": "clx9z8a1b0000abcd1234efgh",    "status": "PENDING",    "network": "testnet",    "source": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",    "destination": "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",    "sendAsset": "native",    "sendAssetIssuer": null,    "sendAmount": "100",    "feeAmount": "0.5",    "feeBps": 50,    "swapAmount": "99.5",    "merchantFee": {      "bps": 150,      "fixed": "0.25",      "amount": "1.75",      "asset": "XLM",      "wallet": "GBDHAQXQQ75WVBUZ2IX3O7ME7JOKJUOUPUXRNDCORUJODWQCTVUEQ62R",      "paidBy": "recipient"    },    "destAsset": "USDC",    "destAssetIssuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTR6F3DSZL5A3W4G4M4N4A5U4QY3T6",    "destEstimated": "24.81",    "destMin": "24.68595",    "slippageBps": 50,    "path": [      {        "code": "yXLM",        "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"      }    ],    "memo": null,    "idempotencyKey": "swap-retry-2026-08-23-001",    "commissionMemo": "Cosmos Swap Commission",    "trustline": null,    "xdr": "AAAAAgAAAABx…(base64 XDR)…AAAAAAAAAAA=",    "uri": "web+stellar:tx?xdr=AAAAAgAAAABx…",    "txHash": "3389e9f0...64hex",    "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…",    "expiresAt": "2026-06-29T12:39:56.000Z",    "createdAt": "2026-06-29T12:34:56.000Z",    "updatedAt": "2026-06-29T12:34:56.000Z"  }}