{"openapi":"3.0.0","info":{"title":"Universal Bridge","version":"0.6.0"},"components":{"securitySchemes":{"Secret Key":{"type":"apiKey","in":"header","name":"x-secret-key"},"Client ID":{"type":"apiKey","in":"header","name":"x-client-id"}},"schemas":{},"parameters":{}},"paths":{"/v1/routes":{"get":{"hide":true,"deprecated":true,"tags":["Deprecated"],"description":"Returns available routes based on the provided filters","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":100,"description":"Number of routes to return","title":"Limit","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Search for routes by token name or symbol","title":"Query","example":"ETH"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","description":"Search for routes by origin token name or symbol","title":"Origin Query","example":"ETH"},"required":false,"name":"originQuery","in":"query"},{"schema":{"type":"string","description":"Search for routes by destination token name or symbol","title":"Destination Query","example":"ETH"},"required":false,"name":"destinationQuery","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"originChainId","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"destinationChainId","in":"query"},{"schema":{"type":"array","items":{"type":"number","nullable":true},"description":"Array of chain IDs to filter routes by (applies to both origin and destination chains)","title":"Chain IDs","example":[1,10,137]},"required":false,"name":"chainIds","in":"query"},{"schema":{"type":"string"},"required":false,"name":"originTokenAddress","in":"query"},{"schema":{"type":"string"},"required":false,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":3,"default":3,"description":"Maximum number of transactions involved in the route","title":"Max Steps","example":3},"required":false,"name":"maxSteps","in":"query"},{"schema":{"type":"string","enum":["popularity"],"description":"Deprecated. Will not work as expected.","title":"Sort By","example":"popularity","deprecated":true},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"boolean","nullable":true,"default":false,"description":"Whether to include token prices in the response. Routes without available prices will be excluded when true.","title":"Include Prices","example":true},"required":false,"name":"includePrices","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]}},"required":["originToken","destinationToken"]}},{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"number"},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"},"iconUri":{"type":"string"}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"number"},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"},"iconUri":{"type":"string"}},"required":["chainId","address","symbol","name","decimals"]}},"required":["originToken","destinationToken"]}}]},"meta":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of routes available. Omitted when it cannot be computed.","example":1000},"filteredCount":{"type":"number","description":"Total number of routes matching the filters","example":100}},"required":["filteredCount"]}},"required":["data","meta"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when any of the input parameters are invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"429":{"description":"Too many search or unfiltered route requests for this client. Retry after the number of seconds in the Retry-After header.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[429]},"code":{"type":"string","enum":["RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/routes/search":{"get":{"hide":true,"deprecated":true,"tags":["Deprecated"],"description":"Search for available routes based on the provided filters with text search capabilities","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"number","minimum":1,"default":100,"description":"Number of routes to return","title":"Limit","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Search for routes by token name or symbol","title":"Query","example":"ETH"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","description":"Search for routes by origin token name or symbol","title":"Origin Query","example":"ETH"},"required":false,"name":"originQuery","in":"query"},{"schema":{"type":"string","description":"Search for routes by destination token name or symbol","title":"Destination Query","example":"ETH"},"required":false,"name":"destinationQuery","in":"query"},{"schema":{"type":"number","minimum":1,"description":"Maximum number of transactions involved in the route","title":"Max Steps","example":1},"required":false,"name":"maxSteps","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"number"},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"},"iconUri":{"type":"string"}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"number"},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"},"iconUri":{"type":"string"}},"required":["chainId","address","symbol","name","decimals"]}},"required":["originToken","destinationToken"]}},"meta":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of routes available","example":1000},"filteredCount":{"type":"number","description":"Total number of routes matching the filters","example":100}},"required":["totalCount","filteredCount"]}},"required":["data","meta"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when any of the input parameters are invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/tokens":{"get":{"tags":["Tokens"],"description":"Returns tokens based on the provided filters","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"chainId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tokenAddress","in":"query"},{"schema":{"type":"string"},"required":false,"name":"symbol","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"number","minimum":1,"default":10,"description":"Number of tokens to return","title":"Limit","maximum":200,"example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"includePrices","in":"query"},{"schema":{"type":"string","enum":["newest","oldest","volume","market_cap"]},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]}}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when any of the input parameters are invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"post":{"tags":["Tokens"],"description":"Creates or updates a token","security":[{"Secret Key":[],"Client ID":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"tokenAddress":{"type":"string"},"pairedChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"pairedTokenAddress":{"type":"string","description":"The token this token is paired with in a Uniswap pool or similar. This will expedite route discovery."}},"required":["chainId","tokenAddress"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","TOKEN_NOT_FOUND"],"description":"Type of error that occurred","title":"Error Code"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/chains":{"get":{"tags":["Chains"],"description":"Returns supported chains with optional filtering.\n\n- No params: Returns all supported chains\n- type=origin: Returns all chains that can be used as origin\n- type=destination: Returns all chains that can be used as destination\n- originChainId=X: Returns destination chains reachable from chain X\n- destinationChainId=X: Returns origin chains that can reach chain X","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"If true, returns only testnet chains. Defaults to false.","example":"false"},"required":false,"name":"testnet","in":"query"},{"schema":{"type":"string","enum":["origin","destination"],"description":"Filter by chain type. 'origin' returns chains that can be used as source, 'destination' returns chains that can be used as target.","example":"origin"},"required":false,"name":"type","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Filter by origin chain ID. Returns destination chains reachable from this origin.","example":1},"required":false,"name":"originChainId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Filter by destination chain ID. Returns origin chains that can reach this destination.","example":137},"required":false,"name":"destinationChainId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Chain ID","example":1},"name":{"type":"string","description":"Chain name","example":"Ethereum"},"icon":{"type":"string","description":"Chain icon URL","example":"https://assets.thirdweb.com/chains/1.png"},"nativeCurrency":{"type":"object","properties":{"name":{"type":"string","description":"Native currency name","example":"Ether"},"symbol":{"type":"string","description":"Native currency symbol","example":"ETH"},"decimals":{"type":"number","description":"Native currency decimals","example":18}},"required":["name","symbol","decimals"],"description":"Native currency information"}},"required":["chainId","name","nativeCurrency"]}}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when any of the input parameters are invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/quote":{"get":{"tags":["Buy"],"description":"Returns an estimated quote for a given intent. The quote is subject to change, use `/prepare` to get the transaction to execute with a quote.","deprecated":true,"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string"},"required":false,"name":"buyAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"nativeFee":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"inputAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"}},"required":["originAmount","destinationAmount","timestamp","blockNumber","intent","steps","inputAmount"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/links/:id":{"get":{"tags":["Links"],"description":"Get a payment link by ID","parameters":[{"schema":{"type":"string","format":"uuid","description":"Payment Link ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"link":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"clientId":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"receiver":{"type":"string"},"amount":{"type":"string","pattern":"^d+$"},"purchaseData":{"nullable":true}},"required":["link","clientId","destinationToken","receiver"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/sell/quote":{"get":{"tags":["Sell"],"description":"Returns an estimated quote for a given intent to sell a token (the origin token). The quote is subject to change, use `/sell/prepare` to get the transaction to execute with a quote.","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string","description":"The input amount in wei","example":"1000000000000000000"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string","description":"Deprecated, use `amount` instead.","deprecated":true,"example":"1000000000000000000"},"required":false,"name":"sellAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"required":false,"name":"slippageToleranceBps","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"nativeFee":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","originAmount","destinationAmount","estimatedExecutionTimeMs"]}}},"required":["originAmount","destinationAmount","timestamp","blockNumber","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/prepare":{"get":{"tags":["Buy"],"description":"Returns a prepared quote with transaction data ready to be executed","deprecated":true,"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string"},"required":false,"name":"buyAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"},{"schema":{"type":"string","description":"The address that will send the input token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"sender","in":"query"},{"schema":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"receiver","in":"query"},{"schema":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"required":false,"name":"paymentLinkId","in":"query"},{"schema":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"required":false,"name":"slippageToleranceBps","in":"query"},{"schema":{"type":"string","description":"An optional product ID to associate with this transaction. If provided, the transaction's values will be verified against the configured product.","example":"1234-5678-9012-ABCD"},"required":false,"name":"productId","in":"query"},{"schema":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"required":false,"name":"purchaseData","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"A hex ID associated with the quoted payment.","example":"0x1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"Deprecated. Use `steps` instead.","deprecated":true},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"purchaseData":{"nullable":true},"inputAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps","inputAmount"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[500]},"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/onramp/prepare":{"get":{"tags":["Onramp"],"description":"Returns a link from the specified provider to onramp to the specified token (DEPRECATED: Use POST instead)","deprecated":true,"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"string","enum":["stripe","coinbase","transak","rampnow"],"description":"The onramp provider to use","example":"stripe"},"required":true,"name":"onramp","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":1},"required":true,"name":"chainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"tokenAddress","in":"query"},{"schema":{"type":"string","description":"The desired token amount in wei","example":"10000000","deprecated":true},"required":false,"name":"amount","in":"query"},{"schema":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"required":false,"name":"purchaseData","in":"query"},{"schema":{"type":"string","description":"An optional address to associate as the onramp sender.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":false,"name":"sender","in":"query"},{"schema":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"receiver","in":"query"},{"schema":{"type":"string","description":"The token to initially onramp to if the specified destination token is not supported by the onramp provider. This is useful if the wallet doesn't have funds to pay for gas and it must onramp to a native token first.","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":false,"name":"onrampTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain ID to initially onramp to if the specified destination chain is not supported by the onramp provider.","example":10},"required":false,"name":"onrampChainId","in":"query"},{"schema":{"type":"string","default":"USD","description":"The currency to use for the onramp. Defaults to the user's preferred currency.","example":"GBP"},"required":false,"name":"currency","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of post-onramp steps to allow for.","example":3},"required":false,"name":"maxSteps","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":"[]","description":"A list of chain IDs to exclude from the route. This is useful if there are certain chains your wallet doesn't support or to avoid more expensive chains.","example":"1,10"},"required":false,"name":"excludeChainIds","in":"query"},{"schema":{"type":"string","format":"uuid","description":"An optional payment link to associate with this onramp. If provided, the transaction's values will be verified against the configured payment link.","example":"123e4567-e89b-12d3-a456-426614174000"},"required":false,"name":"paymentLinkId","in":"query"},{"schema":{"type":"string","description":"An optional product ID to associate with this onramp. If provided, the transaction's values will be verified against the configured product.","example":"123e4567-e89b-12d3-a456-426614174000"},"required":false,"name":"productId","in":"query"},{"schema":{"type":"string","description":"Deprecated. Use `amount` instead.","example":"10000000","deprecated":true},"required":false,"name":"buyAmountWei","in":"query"},{"schema":{"type":"string","default":"US","description":"The user's location (ISO 3166-1 alpha-2). If not provided, will be detected from the client's IP address. Falls back to 'US'."},"required":false,"name":"country","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The onramp ID. Use this to query for the onramp status.","example":"123e4567-e89b-12d3-a456-426614174000"},"link":{"type":"string","description":"The link to the onramp session. This should be opened or redirected to from the UI.","example":"https://pay.coinbase.com/buy/select-asset?appId=41cbb2fb-8b35-45b9-949b-9672bc8edb78&addresses=%7B%220x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709%22%3A%5B%22avacchain%22%5D%7D&assets=%5B%22USDC%22%5D&defaultAsset=USDC&defaultNetwork=avacchain&presetCryptoAmount=5.584799&fiatCurrency=USD&partnerUserId=d62be530-2b04-4aab-8a55-e0d4894e37ec"},"currency":{"type":"string","description":"The currency to use for the onramp.","example":"USD"},"currencyAmount":{"type":"number","description":"The onramp cost in the requested currency.","example":10.52},"destinationAmount":{"type":"string","description":"The amount of the destination token to be received (in wei).","example":"1000000000000000000"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]},"timestamp":{"type":"number","nullable":true,"description":"The timestamp this quote was generated at.","example":1689812800},"expiration":{"type":"number","nullable":true,"description":"The timestamp at which this onramp session will expire, if applicable.","example":1689842800},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]},"description":"The route of tokens after the onramp to reach the final destination token. In the event of quote expirations, you can fetch a new quote for each token pair individually rather than executing the pre-assembled transactions array.","example":[{"transactions":[{"id":"0x1234567890abcdef1234567890abcdef","from":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x","chainId":1,"type":"eip1559","action":"approval"},{"id":"0x1234567890abcdef1234567890abcdef","from":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x","value":"1000000000000000000","chainId":1,"type":"eip1559","action":"buy"}],"originAmount":"100000","originToken":{"chainId":1,"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","iconUri":"https://example.com/token.png","symbol":"USDC","name":"USD Coin","decimals":6,"priceUsd":1,"prices":{"USD":1,"EUR":0.9}},"destinationAmount":"1000000000000000000","destinationToken":{"chainId":8453,"address":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","iconUri":"https://example.com/token.png","symbol":"ETH","name":"Ether","decimals":18,"priceUsd":2000,"prices":{"USD":2000,"EUR":1500}},"estimatedExecutionTimeMs":5000}]},"intent":{"type":"object","properties":{"onramp":{"type":"string","enum":["stripe","coinbase","transak","rampnow"],"description":"The onramp provider to use","example":"stripe"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":1},"tokenAddress":{"type":"string","description":"The destination token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"amount":{"type":"string","description":"The desired token amount in wei","example":"10000000"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"sender":{"type":"string","description":"An optional address to associate as the onramp sender.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"onrampTokenAddress":{"type":"string","description":"The token to initially onramp to if the specified destination token is not supported by the onramp provider. This is useful if the wallet doesn't have funds to pay for gas and it must onramp to a native token first.","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"onrampChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain ID to initially onramp to if the specified destination chain is not supported by the onramp provider.","example":10},"currency":{"type":"string","default":"USD","description":"The currency to use for the onramp. Defaults to the user's preferred currency.","example":"GBP"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of post-onramp steps to allow for.","example":3},"excludeChainIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":"[]","description":"A list of chain IDs to exclude from the route. This is useful if there are certain chains your wallet doesn't support or to avoid more expensive chains.","example":"1,10"},"paymentLinkId":{"type":"string","format":"uuid","description":"An optional payment link to associate with this onramp. If provided, the transaction's values will be verified against the configured payment link.","example":"123e4567-e89b-12d3-a456-426614174000"},"productId":{"type":"string","description":"An optional product ID to associate with this onramp. If provided, the transaction's values will be verified against the configured product.","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["onramp","chainId","tokenAddress","amount","receiver"],"description":"The intent that was used to prepare the onramp.","example":{"chainId":1,"tokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amount":"1000000000000000000","receiver":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","onramp":"stripe","onrampTokenAddress":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","onrampChainId":1}}},"required":["id","link","currency","currencyAmount","destinationAmount","destinationToken","timestamp","steps","intent"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[403]},"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}},"post":{"tags":["Onramp"],"description":"Returns a link from the specified provider to onramp to the specified token","security":[{"Secret Key":[],"Client ID":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"onramp":{"type":"string","enum":["stripe","coinbase","transak","rampnow"],"description":"The onramp provider to use","example":"stripe"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":1},"tokenAddress":{"type":"string","description":"The destination token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"amount":{"type":"string","description":"The desired token amount in wei","example":"10000000","deprecated":true},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"sender":{"type":"string","description":"An optional address to associate as the onramp sender.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"onrampTokenAddress":{"type":"string","description":"The token to initially onramp to if the specified destination token is not supported by the onramp provider. This is useful if the wallet doesn't have funds to pay for gas and it must onramp to a native token first.","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"onrampChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain ID to initially onramp to if the specified destination chain is not supported by the onramp provider.","example":10},"currency":{"type":"string","default":"USD","description":"The currency to use for the onramp. Defaults to the user's preferred currency.","example":"GBP"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of post-onramp steps to allow for.","example":3},"excludeChainIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":"[]","description":"A list of chain IDs to exclude from the route. This is useful if there are certain chains your wallet doesn't support or to avoid more expensive chains.","example":"1,10"},"paymentLinkId":{"type":"string","format":"uuid","description":"An optional payment link to associate with this onramp. If provided, the transaction's values will be verified against the configured payment link.","example":"123e4567-e89b-12d3-a456-426614174000"},"productId":{"type":"string","description":"An optional product ID to associate with this onramp. If provided, the transaction's values will be verified against the configured product.","example":"123e4567-e89b-12d3-a456-426614174000"},"buyAmountWei":{"type":"string","description":"Deprecated. Use `amount` instead.","example":"10000000","deprecated":true},"country":{"type":"string","default":"US","description":"The user's location (ISO 3166-1 alpha-2). If not provided, will be detected from the client's IP address. Falls back to 'US'."}},"required":["onramp","chainId","tokenAddress","receiver"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The onramp ID. Use this to query for the onramp status.","example":"123e4567-e89b-12d3-a456-426614174000"},"link":{"type":"string","description":"The link to the onramp session. This should be opened or redirected to from the UI.","example":"https://pay.coinbase.com/buy/select-asset?appId=41cbb2fb-8b35-45b9-949b-9672bc8edb78&addresses=%7B%220x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709%22%3A%5B%22avacchain%22%5D%7D&assets=%5B%22USDC%22%5D&defaultAsset=USDC&defaultNetwork=avacchain&presetCryptoAmount=5.584799&fiatCurrency=USD&partnerUserId=d62be530-2b04-4aab-8a55-e0d4894e37ec"},"currency":{"type":"string","description":"The currency to use for the onramp.","example":"USD"},"currencyAmount":{"type":"number","description":"The onramp cost in the requested currency.","example":10.52},"destinationAmount":{"type":"string","description":"The amount of the destination token to be received (in wei).","example":"1000000000000000000"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]},"timestamp":{"type":"number","nullable":true,"description":"The timestamp this quote was generated at.","example":1689812800},"expiration":{"type":"number","nullable":true,"description":"The timestamp at which this onramp session will expire, if applicable.","example":1689842800},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]},"description":"The route of tokens after the onramp to reach the final destination token. In the event of quote expirations, you can fetch a new quote for each token pair individually rather than executing the pre-assembled transactions array.","example":[{"transactions":[{"id":"0x1234567890abcdef1234567890abcdef","from":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x","chainId":1,"type":"eip1559","action":"approval"},{"id":"0x1234567890abcdef1234567890abcdef","from":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x","value":"1000000000000000000","chainId":1,"type":"eip1559","action":"buy"}],"originAmount":"100000","originToken":{"chainId":1,"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","iconUri":"https://example.com/token.png","symbol":"USDC","name":"USD Coin","decimals":6,"priceUsd":1,"prices":{"USD":1,"EUR":0.9}},"destinationAmount":"1000000000000000000","destinationToken":{"chainId":8453,"address":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","iconUri":"https://example.com/token.png","symbol":"ETH","name":"Ether","decimals":18,"priceUsd":2000,"prices":{"USD":2000,"EUR":1500}},"estimatedExecutionTimeMs":5000}]},"intent":{"type":"object","properties":{"onramp":{"type":"string","enum":["stripe","coinbase","transak","rampnow"],"description":"The onramp provider to use","example":"stripe"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":1},"tokenAddress":{"type":"string","description":"The destination token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"amount":{"type":"string","description":"The desired token amount in wei","example":"10000000"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"sender":{"type":"string","description":"An optional address to associate as the onramp sender.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"onrampTokenAddress":{"type":"string","description":"The token to initially onramp to if the specified destination token is not supported by the onramp provider. This is useful if the wallet doesn't have funds to pay for gas and it must onramp to a native token first.","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"onrampChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain ID to initially onramp to if the specified destination chain is not supported by the onramp provider.","example":10},"currency":{"type":"string","default":"USD","description":"The currency to use for the onramp. Defaults to the user's preferred currency.","example":"GBP"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of post-onramp steps to allow for.","example":3},"excludeChainIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":"[]","description":"A list of chain IDs to exclude from the route. This is useful if there are certain chains your wallet doesn't support or to avoid more expensive chains.","example":"1,10"},"paymentLinkId":{"type":"string","format":"uuid","description":"An optional payment link to associate with this onramp. If provided, the transaction's values will be verified against the configured payment link.","example":"123e4567-e89b-12d3-a456-426614174000"},"productId":{"type":"string","description":"An optional product ID to associate with this onramp. If provided, the transaction's values will be verified against the configured product.","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["onramp","chainId","tokenAddress","amount","receiver"],"description":"The intent that was used to prepare the onramp.","example":{"chainId":1,"tokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amount":"1000000000000000000","receiver":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","onramp":"stripe","onrampTokenAddress":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","onrampChainId":1}}},"required":["id","link","currency","currencyAmount","destinationAmount","destinationToken","timestamp","steps","intent"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[403]},"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/onramp/status":{"get":{"tags":["Onramp"],"description":"Gets the status of an onramp transaction","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The onramp ID, provided when the onramp link was created","example":"6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"},"required":true,"name":"id","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"The onramp has failed in some way."},{"type":"object","properties":{"status":{"type":"string","enum":["CREATED"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"The onramp link has been created but the user has not begun the payment process yet."},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"The user has started the onramp flow but has not completed it yet."},{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"Funds have been received and assets have been transferred."}],"description":"The status of an onramp transaction.","example":{"status":"COMPLETED","transactions":[{"chainId":1,"transactionHash":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"}]}}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[500]},"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/sell/prepare":{"get":{"tags":["Sell"],"description":"Returns a prepared sell quote with transaction data ready to be executed (DEPRECATED: Use POST instead)","deprecated":true,"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string","description":"The input amount in wei","example":"1000000000000000000"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string","description":"Deprecated, use `amount` instead.","deprecated":true,"example":"1000000000000000000"},"required":false,"name":"sellAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"required":false,"name":"slippageToleranceBps","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"},{"schema":{"type":"string","description":"The address that will send the input token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"sender","in":"query"},{"schema":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"receiver","in":"query"},{"schema":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"required":false,"name":"paymentLinkId","in":"query"},{"schema":{"type":"string","description":"An optional product ID to associate with this transaction. If provided, the transaction's values will be verified against the configured product.","example":"1234-5678-9012-ABCD"},"required":false,"name":"productId","in":"query"},{"schema":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"required":false,"name":"purchaseData","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"A hex ID associated with the quoted payment.","example":"0x1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"Deprecated. Use `steps` instead.","deprecated":true},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"purchaseData":{"nullable":true}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}},"post":{"tags":["Sell"],"description":"Returns a prepared sell quote with transaction data ready to be executed","security":[{"Secret Key":[],"Client ID":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The input amount in wei","example":"1000000000000000000"},"sellAmountWei":{"type":"string","description":"Deprecated, use `amount` instead.","deprecated":true,"example":"1000000000000000000"},"slippageToleranceBps":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"sender":{"type":"string","description":"The address that will send the input token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"paymentLinkId":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"productId":{"type":"string","description":"An optional product ID to associate with this transaction. If provided, the transaction's values will be verified against the configured product.","example":"1234-5678-9012-ABCD"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","sender","receiver"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"A hex ID associated with the quoted payment.","example":"0x1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"Deprecated. Use `steps` instead.","deprecated":true},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"purchaseData":{"nullable":true}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/transfer/prepare":{"post":{"tags":["Transfer"],"description":"Returns a prepared transfer with transaction data ready to be executed","security":[{"Secret Key":[],"Client ID":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain the transfer will take place on","example":10},"tokenAddress":{"type":"string","description":"The token to transfer. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for the chain's native token","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The amount to transfer in wei","example":"1000000000000000000"},"transferAmountWei":{"type":"string","description":"Deprecated, use `amount` instead.","deprecated":true,"example":"1000000000000000000"},"sender":{"type":"string","description":"The address the tokens will be transferred from.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the transfer.","example":"0xD78403A2B3f4c2Ce21f20787ae95A4b52CA88731"},"feePayer":{"anyOf":[{"type":"string","enum":["sender"]},{"type":"string","enum":["receiver"]}],"description":"The address that will pay the fees for the transfer. If not specified, the sender will be used.","example":"sender"},"paymentLinkId":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}}},"required":["chainId","tokenAddress","sender","receiver"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"The payment ID, which is unique to all transactions involved in this quoted payment.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"An array of transactions to be executed to fulfill this quote (in order)."},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain the transfer will take place on","example":10},"tokenAddress":{"type":"string","description":"The token to transfer. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for the chain's native token","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The amount to transfer in wei","example":"1000000000000000000"},"transferAmountWei":{"type":"string","description":"Deprecated, use `amount` instead.","deprecated":true,"example":"1000000000000000000"},"sender":{"type":"string","description":"The address the tokens will be transferred from.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the transfer.","example":"0xD78403A2B3f4c2Ce21f20787ae95A4b52CA88731"},"feePayer":{"anyOf":[{"type":"string","enum":["sender"]},{"type":"string","enum":["receiver"]}],"description":"The address that will pay the fees for the transfer. If not specified, the sender will be used.","example":"sender"},"paymentLinkId":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}}},"required":["chainId","tokenAddress","sender","receiver"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when any of the input parameters are invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/status":{"get":{"tags":["Status"],"description":"Gets the status of a generated and submitted transaction","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"string","description":"The origin transaction hash","example":"0x1b8e5d25aa3505982cdc4339222890f5f2cffc9ddf93aa90d735c5a54d176469"},"required":true,"name":"transactionHash","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The chain ID of the transaction","example":466},"required":true,"name":"chainId","in":"query"},{"schema":{"type":"string","description":"The quoted transaction ID (included in the /prepare response object)","example":"0x1b8e5d25aa3505982cdc4339222890f5f2cffc9ddf93aa90d735c5a54d176469"},"required":false,"name":"transactionId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"paymentId":{"type":"string","description":"The payment ID, which is unique to all transactions involved in this quoted payment.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactionId":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"The transaction has failed and was refunded if applicable."},{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"paymentId":{"type":"string","description":"The payment ID, which is unique to all transactions involved in this quoted payment.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactionId":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"originTokenAddress":{"type":"string"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destinationTokenAddress":{"type":"string"},"sender":{"type":"string"},"receiver":{"type":"string"},"originAmount":{"type":"string","pattern":"^d+$","description":"The origin token amount in wei","example":"10000000"},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"At least one transaction has been confirmed onchain."},{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"paymentId":{"type":"string","description":"The payment ID, which is unique to all transactions involved in this quoted payment.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactionId":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"originTokenAddress":{"type":"string"},"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destinationTokenAddress":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Use prices record instead","deprecated":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals"]},"sender":{"type":"string"},"receiver":{"type":"string"},"originAmount":{"type":"string","pattern":"^d+$","description":"The origin token amount in wei","example":"10000000"},"destinationAmount":{"type":"string","pattern":"^d+$","description":"The destination token amount in wei","example":"10000000"},"purchaseData":{"nullable":true}},"required":["status","transactions","originChainId","originTokenAddress","originToken","destinationChainId","destinationTokenAddress","destinationToken","sender","receiver","originAmount","destinationAmount"],"description":"All transactions have been confirmed onchain."},{"type":"object","properties":{"status":{"type":"string","enum":["NOT_FOUND"]},"paymentId":{"type":"string","description":"The payment ID, which is unique to all transactions involved in this quoted payment.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactionId":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"purchaseData":{"nullable":true}},"required":["status","transactions"],"description":"No transactions have been found onchain."}]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","UNKNOWN_TRANSACTION_STATUS","TRANSACTION_NOT_FOUND","TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["TRANSACTION_NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/developer/fees":{"get":{"tags":["Developer"],"summary":"Get developer fee","description":"Gets the configured developer fee for the authenticated project.","security":[{"Secret Key":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Address that will receive all fees for this client ID","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"feeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fee in basis points (100 = 1%)","example":100},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was last updated","example":"2023-01-01T00:00:00.000Z"}},"required":["feeRecipient","feeBps","createdAt","updatedAt"],"description":"Developer fee for the requested project"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"post":{"tags":["Developer"],"summary":"Set developer fee","description":"Set developer fees for the authenticated project. This endpoint behaves like an upsert and will replace any existing fees.","security":[{"Secret Key":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Address that will receive all fees for this client ID","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"feeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fee in basis points (100 = 1%)","example":100}},"required":["feeRecipient","feeBps"],"description":"Developer fees to set"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Address that will receive all fees for this client ID","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"feeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fee in basis points (100 = 1%)","example":100},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was last updated","example":"2023-01-01T00:00:00.000Z"}},"required":["feeRecipient","feeBps","createdAt","updatedAt"],"description":"Created developer fee"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"put":{"tags":["Developer"],"summary":"Update developer fee","description":"Updates the configured developer fee for the authenticated project. This endpoint behaves like an upsert and will replace any existing fees.","security":[{"Secret Key":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Address that will receive all fees for this client ID","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"feeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fee in basis points (100 = 1%)","example":100}},"description":"Developer fee updates"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Address that will receive all fees for this client ID","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"feeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fee in basis points (100 = 1%)","example":100},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the fee was last updated","example":"2023-01-01T00:00:00.000Z"}},"required":["feeRecipient","feeBps","createdAt","updatedAt"],"description":"Updated developer fee"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/links":{"get":{"tags":["Developer"],"summary":"Get all payment links","description":"Returns all payment links for the authenticated project. Useful when listing all active payment links and their properties.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Number of payment links to return","title":"Limit","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0,"description":"Number of payment links to skip","title":"Offset","example":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of payment links","title":"Total Count","example":10}},"required":["totalCount"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"clientId":{"type":"string","minLength":1},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"receiver":{"type":"string"},"amount":{"type":"string","pattern":"^d+$"},"purchaseData":{"nullable":true}},"required":["id","link","clientId","createdAt","updatedAt","destinationToken","receiver"]},"description":"List of payment links for the client"}},"required":["meta","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"post":{"tags":["Developer"],"summary":"Create a payment link","description":"Creates a new payment link for the authenticated project. The payment link can be used at the returned `link`, and will trigger configured webhooks with verified payment data for the project. Requires a secret key.","security":[{"Secret Key":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":256,"description":"Optional title for the payment link. This will be displayed on the payment page.","example":"Product purchase"},"description":{"type":"string","maxLength":2000,"description":"Optional description for the payment link. This will be displayed on the payment page.","example":"Purchase 100 ETH from the Ethereum mainnet"},"imageUrl":{"type":"string","maxLength":2048,"description":"Optional image URL for the payment link. This will be displayed on the payment page. Must be an https, http or ipfs URL.","example":"https://example.com/image.png"},"intent":{"type":"object","properties":{"destinationChainId":{"type":"number","description":"The chain ID to receive payment on","example":1},"destinationTokenAddress":{"type":"string","description":"The address of the destination token to receive payment on"},"receiver":{"type":"string","description":"The address to receive payment on"},"amount":{"type":"string","description":"The expected amount to be paid (in wei). If the amount is variable, you can exclude this field.","example":"1000000000000000000"},"purchaseData":{"nullable":true,"description":"The purchase data for this payment link"}},"required":["destinationChainId","destinationTokenAddress","receiver"],"description":"The intent configuration for this payment link"}},"required":["intent"],"description":"Payment link to create"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"clientId":{"type":"string","minLength":1},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"receiver":{"type":"string"},"amount":{"type":"string","pattern":"^d+$"},"purchaseData":{"nullable":true}},"required":["id","link","clientId","createdAt","updatedAt","destinationToken","receiver"],"description":"Created payment link"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/links/:id":{"get":{"tags":["Developer"],"summary":"Get a payment link","description":"Gets a specific payment link that belongs to the authenticated project. To get a payment link without authentication, use `/v1/links/:id`.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Payment Link ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"clientId":{"type":"string","minLength":1},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"receiver":{"type":"string"},"amount":{"type":"string","pattern":"^d+$"},"purchaseData":{"nullable":true}},"required":["id","link","clientId","createdAt","updatedAt","destinationToken","receiver"],"description":"Payment link details"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"put":{"tags":["Developer"],"summary":"Update a payment link","description":"Updates an existing payment link for the authenticated project.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Payment Link ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":256,"description":"Optional title for the payment link. This will be displayed on the payment link page.","example":"Product purchase"},"description":{"type":"string","maxLength":2000,"description":"Optional description for the payment link. This will be displayed on the payment page.","example":"Purchase 100 ETH from the Ethereum mainnet"},"imageUrl":{"type":"string","maxLength":2048,"description":"Optional image URL for the payment link. This will be displayed on the payment link page. Must be an https, http or ipfs URL.","example":"https://example.com/image.png"},"intent":{"type":"object","properties":{"destinationChainId":{"type":"number","description":"The chain ID to receive payment on","example":1},"destinationTokenAddress":{"type":"string","description":"The address of the destination token to receive payment on"},"receiver":{"type":"string","description":"The address to receive payment on"},"amount":{"type":"string","description":"The expected amount to be paid. If the amount is variable, you can exclude this field.","example":"1000000000000000000"},"purchaseData":{"nullable":true,"description":"The purchase data for this payment link"}},"required":["destinationChainId","destinationTokenAddress","receiver"],"description":"The intent configuration for this payment link"}},"required":["intent"],"description":"Payment link updates"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"clientId":{"type":"string","minLength":1},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"receiver":{"type":"string"},"amount":{"type":"string","pattern":"^d+$"},"purchaseData":{"nullable":true}},"required":["id","link","clientId","createdAt","updatedAt","destinationToken","receiver"],"description":"Updated payment link"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"delete":{"tags":["Developer"],"summary":"Delete a payment link","description":"Deletes a specific payment link by ID.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Payment Link ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/payments":{"get":{"tags":["Developer"],"summary":"Get payment history","description":"Returns a list of payments for the authenticated project. With a client ID instead of a secret key, `paymentLinkId` is required and only that payment link's payments are returned.","security":[{"Secret Key":[]},{"Client ID":[]}],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Number of payments to return","title":"Limit","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0,"description":"Number of payments to skip","title":"Offset","example":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["PENDING","COMPLETED","FAILED"],"description":"Filter by payment status","title":"Status","example":"COMPLETED"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by payment link ID. Required when authenticating with a client ID.","title":"Payment Link ID","example":"payment-link-id"},"required":false,"name":"paymentLinkId","in":"query"},{"schema":{"type":"string","description":"Filter by sender","title":"Sender","example":"0x1234567890123456789012345678901234567890"},"required":false,"name":"sender","in":"query"},{"schema":{"type":"string","description":"Filter by receiver","title":"Receiver","example":"0x1234567890123456789012345678901234567890"},"required":false,"name":"receiver","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Filter payments created after this date (ISO-8601)","title":"From Date","example":"2023-01-01T00:00:00Z"},"required":false,"name":"fromDate","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Filter payments created before this date (ISO-8601)","title":"To Date","example":"2023-12-31T23:59:59Z"},"required":false,"name":"toDate","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of payments","title":"Total Count","example":100}},"required":["totalCount"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"blockNumber":{"type":"string","pattern":"^d+$"},"transactionId":{"type":"string"},"clientId":{"type":"string"},"sender":{"type":"string"},"receiver":{"type":"string"},"protocolFee":{"type":"string","pattern":"^d+$"},"developerFeeRecipient":{"type":"string"},"developerFeeBps":{"type":"number"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transactionHash":{"type":"string"}},"required":["chainId","transactionHash"]}},"status":{"anyOf":[{"type":"string","enum":["PENDING"]},{"type":"string","enum":["COMPLETED"]},{"type":"string","enum":["FAILED"]},{"type":"string","enum":["NOT_FOUND"]}]},"type":{"type":"string","enum":["buy","sell","transfer","onramp"],"description":"Type of payment","title":"Type","example":"buy"},"originAmount":{"type":"string","pattern":"^d+$"},"destinationAmount":{"type":"string","pattern":"^d+$"},"paymentLinkId":{"type":"string"},"purchaseData":{"nullable":true},"onrampId":{"type":"string"},"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"createdAt":{"type":"string","format":"date-time","description":"Date and time the payment was created","title":"Created At","example":"2023-01-01T00:00:00Z"}},"required":["id","clientId","receiver","transactions","status","type","destinationAmount","destinationToken","createdAt"]},"description":"List of payments for the client"}},"required":["meta","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/webhook-sends":{"get":{"tags":["Developer"],"summary":"Get all webhook sends","description":"Returns all webhook send attempts for the authenticated project.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":50,"description":"Number of webhook sends to return","example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0,"description":"Number of webhook sends to skip","example":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Filter by webhook configuration ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"webhookId","in":"query"},{"schema":{"type":"boolean","nullable":true,"description":"Filter by success status","example":true},"required":false,"name":"success","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook send","example":"550e8400-e29b-41d4-a716-446655440000"},"webhookId":{"type":"string","format":"uuid","description":"ID of the webhook configuration","example":"660e8400-e29b-41d4-a716-446655440000"},"webhookUrl":{"type":"string","format":"uri","description":"URL the webhook was sent to","example":"https://api.example.com/webhook"},"paymentId":{"type":"string","nullable":true,"description":"ID of the payment if this is a payment webhook","example":"pay_123456"},"onrampId":{"type":"string","nullable":true,"format":"uuid","description":"ID of the onramp if this is an onramp webhook","example":"770e8400-e29b-41d4-a716-446655440000"},"transactionId":{"type":"string","nullable":true,"description":"Transaction ID if applicable","example":"tx_123456"},"status":{"type":"string","enum":["PENDING","COMPLETED","FAILED","ALL"],"description":"Status of the event that triggered the webhook","example":"COMPLETED"},"body":{"nullable":true,"description":"The webhook payload that was sent"},"success":{"type":"boolean","description":"Whether the webhook was delivered successfully","example":true},"responseStatus":{"type":"number","description":"HTTP response status code from the webhook endpoint","example":200},"response":{"type":"string","nullable":true,"description":"Response body from the webhook endpoint","example":"{\"status\":\"received\"}"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was sent","example":"2023-01-01T00:00:00.000Z"}},"required":["id","webhookId","webhookUrl","paymentId","onrampId","transactionId","status","success","responseStatus","response","createdAt"]},"description":"List of webhook sends for the client"},"pagination":{"type":"object","properties":{"limit":{"type":"number"},"offset":{"type":"number"},"total":{"type":"number"}},"required":["limit","offset","total"]}},"required":["data","pagination"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/webhook-sends/:id":{"get":{"tags":["Developer"],"summary":"Get webhook send by ID","description":"Returns details of a specific webhook send attempt.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Webhook send ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook send","example":"550e8400-e29b-41d4-a716-446655440000"},"webhookId":{"type":"string","format":"uuid","description":"ID of the webhook configuration","example":"660e8400-e29b-41d4-a716-446655440000"},"webhookUrl":{"type":"string","format":"uri","description":"URL the webhook was sent to","example":"https://api.example.com/webhook"},"paymentId":{"type":"string","nullable":true,"description":"ID of the payment if this is a payment webhook","example":"pay_123456"},"onrampId":{"type":"string","nullable":true,"format":"uuid","description":"ID of the onramp if this is an onramp webhook","example":"770e8400-e29b-41d4-a716-446655440000"},"transactionId":{"type":"string","nullable":true,"description":"Transaction ID if applicable","example":"tx_123456"},"status":{"type":"string","enum":["PENDING","COMPLETED","FAILED","ALL"],"description":"Status of the event that triggered the webhook","example":"COMPLETED"},"body":{"nullable":true,"description":"The webhook payload that was sent"},"success":{"type":"boolean","description":"Whether the webhook was delivered successfully","example":true},"responseStatus":{"type":"number","description":"HTTP response status code from the webhook endpoint","example":200},"response":{"type":"string","nullable":true,"description":"Response body from the webhook endpoint","example":"{\"status\":\"received\"}"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was sent","example":"2023-01-01T00:00:00.000Z"}},"required":["id","webhookId","webhookUrl","paymentId","onrampId","transactionId","status","success","responseStatus","response","createdAt"]}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/webhooks":{"get":{"tags":["Developer"],"summary":"Get all webhooks","description":"Returns all webhooks for the authenticated project.","security":[{"Secret Key":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook","example":"550e8400-e29b-41d4-a716-446655440000"},"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"default":"ALL","description":"The action that triggers this webhook","example":"ONRAMP"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED","ALL"],"default":"ALL","description":"The status for which the webhook is triggered","example":"COMPLETED"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was last updated","example":"2023-01-01T00:00:00.000Z"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"description":"The webhook schema version","example":2}},"required":["id","url","action","status","createdAt","updatedAt","version"]},"description":"List of webhooks for the client"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"post":{"tags":["Developer"],"summary":"Create a webhook","description":"Creates a new webhook for the authenticated project. This webhook will be triggered for all payments that fit the configured filters.","security":[{"Secret Key":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"default":"ALL","description":"The action that triggers this webhook","example":"ONRAMP"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED","ALL"],"default":"ALL","description":"The status for which the webhook is triggered","example":"COMPLETED"},"secret":{"type":"string","minLength":8,"description":"Secret used to sign the webhook payload. When provided, all webhook payloads will include an 'x-payload-signature' header with HMAC-SHA256 signature for verification.","example":"mySecretKey123"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"default":2,"description":"The webhook schema version","example":2}},"required":["url"],"description":"Webhook to create"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook","example":"550e8400-e29b-41d4-a716-446655440000"},"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"default":"ALL","description":"The action that triggers this webhook","example":"ONRAMP"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED","ALL"],"default":"ALL","description":"The status for which the webhook is triggered","example":"COMPLETED"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was last updated","example":"2023-01-01T00:00:00.000Z"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"description":"The webhook schema version","example":2}},"required":["id","url","action","status","createdAt","updatedAt","version"],"description":"Created webhook"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/webhooks/:id":{"get":{"tags":["Developer"],"summary":"Get a webhook","description":"Retrieves an existing webhook's properties for the authenticated project.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Webhook ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook","example":"550e8400-e29b-41d4-a716-446655440000"},"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"default":"ALL","description":"The action that triggers this webhook","example":"ONRAMP"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED","ALL"],"default":"ALL","description":"The status for which the webhook is triggered","example":"COMPLETED"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was last updated","example":"2023-01-01T00:00:00.000Z"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"description":"The webhook schema version","example":2}},"required":["id","url","action","status","createdAt","updatedAt","version"],"description":"Updated webhook"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"put":{"tags":["Developer"],"summary":"Update a webhook","description":"Updates an existing webhook's properties for the authenticated project.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Webhook ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"description":"The action that triggers this webhook","example":"ONRAMP"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED"],"description":"The status for which the webhook is triggered","example":"COMPLETED"},"secret":{"type":"string","minLength":8,"description":"Secret used to sign the webhook payload. When provided, all webhook payloads will include an 'x-payload-signature' header with HMAC-SHA256 signature for verification.","example":"mySecretKey123"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"default":2,"description":"The webhook schema version","example":2}},"description":"Webhook updates"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the webhook","example":"550e8400-e29b-41d4-a716-446655440000"},"url":{"type":"string","format":"uri","description":"URL to send webhook notifications to","example":"https://api.example.com/webhook"},"label":{"type":"string","description":"An optional label for the webhook","example":"In-App Purchases"},"action":{"type":"string","enum":["ONRAMP","BUY","SELL","TRANSFER","ALL"],"default":"ALL","description":"The action that triggers this webhook","example":"ONRAMP"},"status":{"type":"string","enum":["COMPLETED","PENDING","FAILED","ALL"],"default":"ALL","description":"The status for which the webhook is triggered","example":"COMPLETED"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was created","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the webhook was last updated","example":"2023-01-01T00:00:00.000Z"},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"description":"The webhook schema version","example":2}},"required":["id","url","action","status","createdAt","updatedAt","version"],"description":"Updated webhook"}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"],"description":"Returned when the input is invalid","title":"INVALID_INPUT"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}},"delete":{"tags":["Developer"],"summary":"Delete a webhook","description":"Deletes a specific webhook by ID.","security":[{"Secret Key":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Webhook ID","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/developer/webhooks/retry":{"post":{"tags":["Developer"],"summary":"Retry webhooks for a transaction","description":"Retries all webhooks for a specific payment or onramp transaction.","security":[{"Secret Key":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionHash":{"type":"string","description":"The transaction hash","example":"0x556f634ca981a3a086731d987470dd688f289279e688f4ffb568f41398125bc7"},"paymentId":{"type":"string","description":"The payment ID","example":"0x8e0a0d9c0254a75a3004a28e0fb69bae7f2d659938ddd461753627270930db60"},"chainId":{"type":"number","nullable":true,"description":"The chain ID","example":1},"onrampId":{"type":"string","format":"uuid","description":"The onramp transaction ID","example":"550e8400-e29b-41d4-a716-446655440000"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string"},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[401]},"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[404]},"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/buy/quote/:wallet":{"get":{"description":"Get quotes for a specific wallet address based on its current token holdings.","tags":["Buy"],"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string","description":"The desired output amount in wei.","example":"1000000000000000000"},"required":true,"name":"amount","in":"query"},{"schema":{"type":"boolean","nullable":true,"default":true,"description":"Whether to include quotes in the response. If false, only the token and balance will be included which speeds up the response. Defaults to true.","example":true},"required":false,"name":"includeQuotes","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"quote":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"nativeFee":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","originAmount","destinationAmount","estimatedExecutionTimeMs"]}}},"required":["originAmount","destinationAmount","timestamp","blockNumber","intent","steps"]},"balance":{"type":"string","pattern":"^d+$"},"token":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]}},"required":["balance","token"]}}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}}}}},"/v1/buy/quote":{"get":{"tags":["Buy"],"description":"Returns an estimated quote for a given intent to purchase a token (the destination token). The quote is subject to change, use `/buy/prepare` to get the transaction to execute with a quote.","security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string","description":"The desired output amount in wei.","example":"1000000000000000000"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string","description":"Deprecated, use `amount` instead.","example":"1000000000000000000","deprecated":true},"required":false,"name":"buyAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0}},"required":["chainId","address","symbol","name","decimals"]},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"nativeFee":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","originAmount","destinationAmount","estimatedExecutionTimeMs"]}}},"required":["originAmount","destinationAmount","timestamp","blockNumber","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}},"/v1/buy/prepare":{"get":{"tags":["Buy"],"description":"Returns a prepared quote with transaction data ready to be executed (DEPRECATED: Use POST instead)","deprecated":true,"security":[{"Secret Key":[],"Client ID":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"required":true,"name":"originChainId","in":"query"},{"schema":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"required":true,"name":"originTokenAddress","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"required":true,"name":"destinationChainId","in":"query"},{"schema":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"required":true,"name":"destinationTokenAddress","in":"query"},{"schema":{"type":"string","description":"The desired output amount in wei.","example":"1000000000000000000"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string","description":"Deprecated, use `amount` instead.","example":"1000000000000000000","deprecated":true},"required":false,"name":"buyAmountWei","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"required":false,"name":"maxSteps","in":"query"},{"schema":{"type":"string","description":"The address that will send the input token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"sender","in":"query"},{"schema":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"required":true,"name":"receiver","in":"query"},{"schema":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"required":false,"name":"paymentLinkId","in":"query"},{"schema":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"required":false,"name":"slippageToleranceBps","in":"query"},{"schema":{"type":"string","description":"An optional product ID to associate with this transaction. If provided, the transaction's values will be verified against the configured product.","example":"1234-5678-9012-ABCD"},"required":false,"name":"productId","in":"query"},{"schema":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}},"required":false,"name":"purchaseData","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"A hex ID associated with the quoted payment.","example":"0x1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"Deprecated. Use `steps` instead.","deprecated":true},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"purchaseData":{"nullable":true}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}},"post":{"tags":["Buy"],"description":"Returns a prepared quote with transaction data ready to be executed","security":[{"Secret Key":[],"Client ID":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired output amount in wei.","example":"1000000000000000000"},"buyAmountWei":{"type":"string","description":"Deprecated, use `amount` instead.","example":"1000000000000000000","deprecated":true},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2},"sender":{"type":"string","description":"The address that will send the input token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"receiver":{"type":"string","description":"The address that will receive the output token.","example":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709"},"paymentLinkId":{"type":"string","description":"An optional payment link to associate with this transaction. If provided, the transaction's values will be verified against the configured payment link.","example":"1234-5678-9012-ABCD"},"slippageToleranceBps":{"type":"number","nullable":true,"description":"The slippage tolerance in basis points. Will be automatically calculated by default.","example":50},"productId":{"type":"string","description":"An optional product ID to associate with this transaction. If provided, the transaction's values will be verified against the configured product.","example":"1234-5678-9012-ABCD"},"purchaseData":{"nullable":true,"description":"Arbitrary purchase data to be included with the payment and returned with all webhooks and status checks.","example":{"size":"Medium","color":"Red"}}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","sender","receiver"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"originAmount":{"type":"string","description":"The amount (in wei) of the input token that must be paid to receive the desired amount (specified in the intent).","example":"156145571625871"},"destinationAmount":{"type":"string","description":"The amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"minDestinationAmount":{"type":"string","description":"The minimum amount (in wei) of the output token to be received by the receiver address.","example":"156145571625871"},"timestamp":{"type":"number","description":"The timestamp this quote was generated at.","example":1689812800},"blockNumber":{"type":"string","description":"The block number this quote was generated at.","example":"1689812800"},"estimatedExecutionTimeMs":{"type":"number","description":"The estimated execution time in milliseconds. This includes all transactions involved in filling this quote.","example":4000},"id":{"type":"string","description":"A hex ID associated with the quoted payment.","example":"0x1234567890abcdef1234567890abcdef"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}},"description":"Deprecated. Use `steps` instead.","deprecated":true},"expiration":{"type":"number","nullable":true,"description":"The expiration timestamp for this prepared quote and its transactions (if applicable).","example":1689812800},"intent":{"type":"object","properties":{"originChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The origin chain ID","example":1},"originTokenAddress":{"type":"string","description":"The origin token address","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The destination chain ID","example":324},"destinationTokenAddress":{"type":"string","description":"The destination token address","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"amount":{"type":"string","description":"The desired amount in wei","example":"1000000000000000000"},"maxSteps":{"type":"number","nullable":true,"default":3,"description":"The maximum number of steps in the returned route.","example":2}},"required":["originChainId","originTokenAddress","destinationChainId","destinationTokenAddress","amount"]},"steps":{"type":"array","items":{"type":"object","properties":{"originToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"destinationToken":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"iconUri":{"type":"string"},"priceUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"volume24hUsd":{"type":"number","minimum":0},"marketCapUsd":{"type":"number","minimum":0},"prices":{"type":"object","additionalProperties":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["chainId","address","symbol","name","decimals","priceUsd","prices"]},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The transaction ID, each step in a quoted payment will have a unique transaction ID.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"chainId":{"type":"number"},"maxPriorityFeePerGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"to":{"type":"string"},"from":{"type":"string","nullable":true},"value":{"type":"string"},"gas":{"type":"string"},"data":{"type":"string"},"type":{"type":"string","enum":["eip1559"]},"action":{"type":"string","enum":["approval","transfer","buy","sell","fee"],"description":"The action that the transaction is performing. `approval` is an ERC-20 approval to execute the subsequent transaction. `transfer` is a transfer of a token from one address to another. `buy` acquires a set amount of an output token in exchange for a variable input amount. `sell` sells a set amount of an input token in exchange for a variable output amount. `fee` is a swap to acquire necessary fee tokens for the subsequent transaction.","example":"buy"}},"required":["id","chainId","to","type","action"],"example":{"id":"0x1234567890abcdef1234567890abcdef","chainId":10,"to":"0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709","value":"1000000000000000000","data":"0x","type":"eip1559","action":"buy"}}},"originAmount":{"type":"string"},"destinationAmount":{"type":"string"},"minDestinationAmount":{"type":"string"},"estimatedExecutionTimeMs":{"type":"number"}},"required":["originToken","destinationToken","transactions","originAmount","destinationAmount","estimatedExecutionTimeMs"]}},"purchaseData":{"nullable":true}},"required":["originAmount","destinationAmount","timestamp","blockNumber","id","transactions","intent","steps"]}},"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[400]},"code":{"type":"string","enum":["INVALID_INPUT","ROUTE_NOT_FOUND","CHAIN_NOT_FOUND","AMOUNT_TOO_LOW","AMOUNT_TOO_HIGH"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"]}}}},"504":{"description":"Timeout","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[504]},"code":{"type":"string","enum":["TIMEOUT_ERROR"]},"message":{"type":"string"},"correlationId":{"type":"string"}},"required":["status","code","message","correlationId"],"description":"Returned when the service timed out while processing the request","title":"TIMEOUT_ERROR"}}}}}}}}}