{"openapi":"3.0.0","info":{"title":"Topper REST API","version":"0.3.0"},"components":{"securitySchemes":{"apiKey":{"description":"Partner API key","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{}},"paths":{"/assets/crypto-onramp":{"get":{"summary":"Get supported assets for crypto-onramp","tags":["Assets"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"assets":{"properties":{"source":{"description":"List of assets that can be used as source","items":{"properties":{"code":{"description":"Asset code","example":"ETH","type":"string"},"name":{"description":"Asset name","example":"Ether","type":"string"},"networks":{"description":"List of networks where this asset is supported","items":{"properties":{"assetContractAddress":{"description":"Asset contract address for specified network","example":"4Yb7Ch8rXKWdXDTT9jdzgWXrYsLbL2XVxKeQSqfXn7bT","type":"string"},"assetType":{"description":"Asset type for specified network","enum":["coin","token"],"type":"string"},"code":{"description":"Network code","example":"ethereum","type":"string"},"name":{"description":"Network name","example":"Ethereum Network","type":"string"},"priorities":{"description":"Priorities supported for this network","items":{"enum":["normal","fast"],"example":"normal","type":"string"},"type":"array"},"tagTypes":{"description":"Tag types supported for this network","items":{"enum":["memo","destination-tag"],"example":"memo","type":"string"},"type":"array"}},"required":["code","priorities","tagTypes"],"type":"object"},"type":"array"},"symbol":{"description":"Asset symbol","example":"Ξ","type":"string"}},"required":["code","name"],"type":"object"},"type":"array"},"target":{"description":"List of assets that can be used as target","items":{"properties":{"code":{"description":"Asset code","example":"ETH","type":"string"},"name":{"description":"Asset name","example":"Ether","type":"string"},"networks":{"description":"List of networks where this asset is supported","items":{"properties":{"assetContractAddress":{"description":"Asset contract address for specified network","example":"4Yb7Ch8rXKWdXDTT9jdzgWXrYsLbL2XVxKeQSqfXn7bT","type":"string"},"assetType":{"description":"Asset type for specified network","enum":["coin","token"],"type":"string"},"code":{"description":"Network code","example":"ethereum","type":"string"},"name":{"description":"Network name","example":"Ethereum Network","type":"string"},"priorities":{"description":"Priorities supported for this network","items":{"enum":["normal","fast"],"example":"normal","type":"string"},"type":"array"},"tagTypes":{"description":"Tag types supported for this network","items":{"enum":["memo","destination-tag"],"example":"memo","type":"string"},"type":"array"}},"required":["code","priorities","tagTypes"],"type":"object"},"type":"array"},"symbol":{"description":"Asset symbol","example":"Ξ","type":"string"}},"required":["code","name"],"type":"object"},"type":"array"}},"required":["source","target"],"type":"object"}},"required":["assets"],"type":"object"}}}}}}},"/assets/crypto-offramp":{"get":{"summary":"Get supported assets for crypto-offramp","tags":["Assets"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"assets":{"properties":{"source":{"description":"List of assets that can be used as source","items":{"properties":{"code":{"description":"Asset code","example":"ETH","type":"string"},"name":{"description":"Asset name","example":"Ether","type":"string"},"networks":{"description":"List of networks where this asset is supported","items":{"properties":{"assetContractAddress":{"description":"Asset contract address for specified network","example":"4Yb7Ch8rXKWdXDTT9jdzgWXrYsLbL2XVxKeQSqfXn7bT","type":"string"},"assetType":{"description":"Asset type for specified network","enum":["coin","token"],"type":"string"},"code":{"description":"Network code","example":"ethereum","type":"string"},"name":{"description":"Network name","example":"Ethereum Network","type":"string"},"priorities":{"description":"Priorities supported for this network","items":{"enum":["normal","fast"],"example":"normal","type":"string"},"type":"array"},"tagTypes":{"description":"Tag types supported for this network","items":{"enum":["memo","destination-tag"],"example":"memo","type":"string"},"type":"array"}},"required":["code","priorities","tagTypes"],"type":"object"},"type":"array"},"symbol":{"description":"Asset symbol","example":"Ξ","type":"string"}},"required":["code","name"],"type":"object"},"type":"array"},"target":{"description":"List of assets that can be used as target","items":{"properties":{"code":{"description":"Asset code","example":"ETH","type":"string"},"name":{"description":"Asset name","example":"Ether","type":"string"},"networks":{"description":"List of networks where this asset is supported","items":{"properties":{"assetContractAddress":{"description":"Asset contract address for specified network","example":"4Yb7Ch8rXKWdXDTT9jdzgWXrYsLbL2XVxKeQSqfXn7bT","type":"string"},"assetType":{"description":"Asset type for specified network","enum":["coin","token"],"type":"string"},"code":{"description":"Network code","example":"ethereum","type":"string"},"name":{"description":"Network name","example":"Ethereum Network","type":"string"},"priorities":{"description":"Priorities supported for this network","items":{"enum":["normal","fast"],"example":"normal","type":"string"},"type":"array"},"tagTypes":{"description":"Tag types supported for this network","items":{"enum":["memo","destination-tag"],"example":"memo","type":"string"},"type":"array"}},"required":["code","priorities","tagTypes"],"type":"object"},"type":"array"},"symbol":{"description":"Asset symbol","example":"Ξ","type":"string"}},"required":["code","name"],"type":"object"},"type":"array"}},"required":["source","target"],"type":"object"}},"required":["assets"],"type":"object"}}}}}}},"/countries":{"get":{"summary":"Get supported countries","tags":["Countries"],"parameters":[{"schema":{"enum":["crypto_onramp","crypto_offramp"]},"in":"query","name":"flow","required":false,"description":"Widget flow"}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"countries":{"description":"List of supported countries","items":{"properties":{"alpha2":{"description":"Country alpha2 ISO 3166-1 code","example":"PT","type":"string"},"alpha3":{"description":"Country alpha3 ISO 3166-1 code","example":"PRT","type":"string"},"name":{"description":"Country name","example":"Portugal","type":"string"},"subdivisions":{"description":"List of supported subdivisions (states/provinces)","items":{"properties":{"code":{"description":"Subdivision ISO 3166-2 code","example":"US-CA","type":"string"},"name":{"description":"Subdivision name","example":"California","type":"string"}},"required":["code","name"],"type":"object"},"type":"array"}},"required":["alpha2","alpha3","name","subdivisions"],"type":"object"},"type":"array"}},"required":["countries"],"type":"object"}}}}}}},"/partner/crypto-currencies":{"get":{"summary":"Get supported cryptocurrencies","tags":["Partner sell"],"security":[{"apiKey":[]}],"x-required-api-key-scopes":["currencies:read"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}}}}},"/partner/capabilities":{"get":{"summary":"Get capabilities","tags":["Partner sell"],"security":[{"apiKey":[]}],"x-required-api-key-scopes":["capabilities:read"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"countriesCapabilities":{"items":{"additionalProperties":false,"properties":{"country":{"type":"string"},"paymentMethods":{"items":{"additionalProperties":false,"properties":{"minMaxRestrictions":{"items":{"additionalProperties":false,"properties":{"fiat":{"type":"string"},"maxAmount":{"type":"number"},"minAmount":{"type":"number"}},"required":["fiat","minAmount","maxAmount"],"type":"object"},"type":"array"},"name":{"type":"string"}},"required":["name","minMaxRestrictions"],"type":"object"},"type":"array"}},"required":["country","paymentMethods"],"type":"object"},"type":"array"},"cryptoCurrencyCapabilities":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string"},"maxAmount":{"type":"number"},"minAmount":{"type":"number"}},"required":["id","minAmount","maxAmount"],"type":"object"},"type":"array"},"fiatCurrencyCapabilities":{"items":{"additionalProperties":false,"properties":{"fiat":{"type":"string"}},"required":["fiat"],"type":"object"},"type":"array"}},"required":["fiatCurrencyCapabilities","cryptoCurrencyCapabilities","countriesCapabilities"],"type":"object"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}}}}},"/partner/quote":{"get":{"summary":"Create quote","tags":["Partner sell"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"amount","required":true},{"schema":{"type":"string"},"in":"query","name":"from","required":true},{"schema":{"type":"string"},"in":"query","name":"payment-method","required":true},{"schema":{"type":"string"},"in":"query","name":"to","required":true}],"security":[{"apiKey":[]}],"x-required-api-key-scopes":["quotes:read"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amountFrom":{"type":"string"},"amountTo":{"type":"string"},"expiry":{"format":"date-time","type":"string"},"providerFees":{"type":"string"},"quoteId":{"description":"Sell quote ID, also used as the Topper order ID","format":"uuid","type":"string"},"referralFees":{"type":"string"}},"required":["amountFrom","amountTo","expiry","providerFees","quoteId","referralFees"],"type":"object"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}}}}},"/partner/sell-redirect":{"get":{"summary":"Generate widget URL","tags":["Partner sell"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"accountId","required":true},{"schema":{"maxLength":2,"minLength":2,"type":"string"},"in":"query","name":"bankResidency","required":true},{"schema":{"type":"string"},"in":"query","name":"cryptoAmount","required":true},{"schema":{"type":"string"},"in":"query","name":"cryptoCurrency","required":true},{"schema":{"type":"string"},"in":"query","name":"customParameters","required":false,"description":"URL-encoded query parameters merged into the widget URL, for example `widgetid=247312&ledgerlive=true`"},{"schema":{"format":"uri","type":"string"},"in":"query","name":"deeplinkUrl","required":false},{"schema":{"type":"string"},"in":"query","name":"fiatCurrency","required":true},{"schema":{"type":"string"},"in":"query","name":"language","required":false},{"schema":{"type":"string"},"in":"query","name":"ledgerTransactionId","required":false},{"schema":{"enum":["sell"],"type":"string"},"in":"query","name":"mode","required":true},{"schema":{"type":"string"},"in":"query","name":"paymentMethod","required":true},{"schema":{"format":"uuid","type":"string"},"in":"query","name":"quoteId","required":true,"description":"Sell quote ID returned by GET /partner/quote"},{"schema":{"enum":["light","dark"],"type":"string"},"in":"query","name":"theme","required":false}],"security":[{"apiKey":[]}],"x-required-api-key-scopes":["quotes:read"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rampRedirectUrl":{"format":"uri","type":"string"}},"required":["rampRedirectUrl"],"type":"object"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"type":"object"}]}}}}}}},"/partner/sell":{"post":{"summary":"Sign order","tags":["Partner sell"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"fromCryptoCurrency":{"type":"string"},"nonce":{"description":"Transaction nonce encoded as 32-byte hexadecimal","maxLength":64,"minLength":64,"pattern":"^[0-9a-fA-F]+$","type":"string"},"payloadCryptoCurrency":{"type":"string"},"quoteId":{"description":"Sell quote ID, also used as the Topper order ID","format":"uuid","type":"string"},"refundAddress":{"type":"string"},"slippage":{"type":"string"},"toFiatCurrency":{"type":"string"}},"required":["quoteId","amount","refundAddress","fromCryptoCurrency","toFiatCurrency","payloadCryptoCurrency","nonce"],"type":"object"}}}},"security":[{"apiKey":[]}],"x-required-api-key-scopes":["sell:write"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"payinAddress":{"type":"string"},"payoutNetworkFees":{"type":"string"},"providerFees":{"type":"string"},"providerSig":{"additionalProperties":false,"properties":{"payload":{"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"signature":{"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"required":["payload","signature"],"type":"object"},"referralFees":{"type":"string"},"sellId":{"format":"uuid","type":"string"}},"required":["amount","createdAt","payinAddress","payoutNetworkFees","providerFees","providerSig","referralFees","sellId"],"type":"object"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}}}}}},"/payment-methods/crypto-onramp":{"get":{"summary":"Get supported payment methods for crypto-onramp","tags":["Payment methods"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"paymentMethods":{"example":[{"billingAsset":"EUR","countries":["PT"],"limits":[{"asset":"USD","maximum":"2500","minimum":"10"}],"network":"card","periodicities":[{"applicableCountries":["PT"],"availablePeriodicities":["once","weekly","monthly"]}],"type":"credit-card"},{"billingAsset":"EUR","countries":["PT"],"limits":[{"asset":"USD","maximum":"2500","minimum":"10"}],"network":"apple-pay","periodicities":[{"applicableCountries":["PT"],"availablePeriodicities":["once"]}],"type":"apple-pay"}],"items":{"properties":{"billingAsset":{"description":"Asset in which the user will be billed","example":"EUR","type":"string"},"countries":{"description":"List of countries alpha 2 codes in which this payment method is supported","items":{"example":"PT","type":"string"},"type":"array"},"limits":{"items":{"properties":{"asset":{"description":"Asset code","example":"USD","type":"string"},"maximum":{"description":"Maximum amount allowed to transact","example":"2500","type":"string"},"minimum":{"description":"Minimum amount allowed to transact","example":"10","type":"string"}},"required":["minimum","asset","maximum"],"type":"object"},"type":"array"},"network":{"description":"Network associated with the payment method","type":"string"},"periodicities":{"description":"List of periodicities available for the payment method per countries","items":{"properties":{"applicableCountries":{"description":"List of countries alpha 2 codes in which the periodicity is supported","items":{"example":"PT","type":"string"},"type":"array"},"availablePeriodicities":{"description":"List of available periodicities for the payment method","items":{"example":"once","type":"string"},"type":"array"}},"required":["applicableCountries","availablePeriodicities"],"type":"object"},"type":"array"},"type":{"description":"The payment method type","type":"string"}},"required":["billingAsset","countries","type"],"type":"object"},"type":"array"}},"required":["paymentMethods"],"type":"object"}}}}}}},"/payment-methods/crypto-offramp":{"get":{"summary":"Get supported payment methods for crypto-offramp","tags":["Payment methods"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"paymentMethods":{"example":[{"billingAsset":"EUR","countries":["PT"],"limits":[{"asset":"USD","maximum":"2500","minimum":"10"}],"network":"card","type":"debit-card"}],"items":{"properties":{"billingAsset":{"description":"Asset in which the user will be billed","example":"EUR","type":"string"},"countries":{"description":"List of countries alpha 2 codes in which this payment method is supported","items":{"example":"PT","type":"string"},"type":"array"},"limits":{"items":{"properties":{"asset":{"description":"Asset code","example":"USD","type":"string"},"maximum":{"description":"Maximum amount allowed to transact","example":"2500","type":"string"},"minimum":{"description":"Minimum amount allowed to transact","example":"10","type":"string"}},"required":["minimum","asset","maximum"],"type":"object"},"type":"array"},"network":{"description":"Network associated with the payment method","type":"string"},"periodicities":{"description":"List of periodicities available for the payment method per countries","items":{"properties":{"applicableCountries":{"description":"List of countries alpha 2 codes in which the periodicity is supported","items":{"example":"PT","type":"string"},"type":"array"},"availablePeriodicities":{"description":"List of available periodicities for the payment method","items":{"example":"once","type":"string"},"type":"array"}},"required":["applicableCountries","availablePeriodicities"],"type":"object"},"type":"array"},"type":{"description":"The payment method type","type":"string"}},"required":["billingAsset","countries","type"],"type":"object"},"type":"array"}},"required":["paymentMethods"],"type":"object"}}}}}}},"/simulations":{"post":{"summary":"Create simulation","tags":["Simulations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bootstrapToken":{"description":"Bootstrap token, similar to one you would use to open Topper widget","type":"string"}},"required":["bootstrapToken"],"type":"object"}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"simulation":{"properties":{"destination":{"properties":{"amount":{"description":"Amount to be received","example":"0.007889375921831504","type":"string"},"asset":{"description":"Asset code","example":"ETH","type":"string"},"rate":{"description":"Exchange rate to the origin","example":"0.00054522293862000722","type":"string"}},"required":["amount","asset","rate"],"type":"object"},"fees":{"items":{"properties":{"amount":{"description":"Fee amount","example":"1.62","type":"string"},"asset":{"description":"Asset code","example":"USD","type":"string"},"type":{"description":"Fee type","example":"network","type":"string"}},"required":["amount","asset","type"],"type":"object"},"type":"array"},"origin":{"properties":{"amount":{"description":"Amount to pay","example":"16.09","type":"string"},"asset":{"description":"Asset code","example":"USD","type":"string"},"rate":{"description":"Exchange rate to the destination","example":"1834.1121203210222296873","type":"string"}},"required":["amount","asset","rate"],"type":"object"}},"required":["destination","fees","origin"],"type":"object"}},"required":["simulation"],"type":"object"}}}}}}},"/open-widget/multiple":{"get":{"summary":"Generate a URL to open a widget for each widget","tags":["Open multiple widgets"],"description":"This endpoint generates a URL to open a widget for each widget provided where Topper facilitates signing","parameters":[{"schema":{"enum":["crypto_onramp","crypto_offramp"]},"in":"query","name":"activeFlow","required":false,"description":"The flow on initialization"},{"schema":{"format":"email","type":"string"},"in":"query","name":"email","required":false,"description":"The user email to be used to prefill on the getting started page"},{"schema":{"type":"boolean"},"in":"query","name":"embed","required":false,"description":"Enable embed mode"},{"schema":{"enum":["en","en-US","pt","pt-BR","es","es-ES"]},"in":"query","name":"locale","required":false,"description":"The locale to set the widget"},{"schema":{"type":"boolean"},"in":"query","name":"redirect","required":false,"description":"Redirect instead of responding with the URL"},{"schema":{"items":{"format":"uuid","type":"string"},"type":"array"},"in":"query","name":"widgetIds","required":true,"description":"The widget ids to open"}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"bootstrapTokens":{"additionalProperties":{"type":"string"},"description":"The bootstrap tokens for each widget in case you want to open the widget using our SDK","type":"object"},"url":{"description":"The URL to open up the widget","type":"string"}},"required":["url"],"type":"object"}}}}}},"post":{"summary":"Generate a URL to open a widget for each widget","tags":["Open multiple widgets"],"description":"This endpoint generates a URL to open a widget for each widget provided where Topper facilitates signing","requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":{"properties":{"campaignIds":{"description":"Public campaigns to be added to the widget session, it overrides any private campaign that would be applied to the session. Only one id can be provided for now. If they cannot be attributed to the session they will be silently ignored.","items":{"format":"uuid","type":"string"},"maxItems":1,"minItems":0,"type":"array"},"partner":{"description":"Partner configurations","properties":{"continueUrl":{"description":"URL to redirect the user to after the order is placed and the funds were received.","type":"string"},"continueUrlTarget":{"description":"In which tab should the `continueUrl` be opened.","enum":["new-tab","same-tab","parent-tab"],"type":"string"},"displayName":{"description":"Partner name to be displayed to the user.","type":"string"},"fee":{"description":"An object configuring the partner fee to be charged","properties":{"percentage":{"description":"Percentage of the total source amount (the maximum allowed value is \"5\").","type":"string"}},"required":["percentage"],"type":"object"},"validation":{"description":"Partner validation configuration.","properties":{"device":{"description":"Partner validation configuration for the device.","properties":{"alg":{"description":"Hashing algorithm to use for the validation","enum":["sha256"],"type":"string"},"fields":{"description":"Fields to be used for the validation","items":{"enum":["ip","userAgent"],"type":"string"},"minItems":1,"type":"array"},"hash":{"description":"Hash to be used for the validation","type":"string"},"ip":{"description":"IP address to be used for the validation.","type":"string"},"ipVersion":{"description":"IP version to be used for the validation. If not provided, it will default to \"4\".","enum":["4","4_cidr_16","6","6_cidr_64"],"type":"string"},"userAgent":{"description":"User agent to be used for the validation.","type":"string"}}}},"required":[],"type":"object"}},"type":"object"},"partnerSellParams":{"description":"Partner sell quote","properties":{"quoteId":{"description":"Sell quote ID","format":"uuid","type":"string"}},"required":["quoteId"],"type":"object"},"periodicity":{"description":"The order periodicity","enum":["once","weekly","monthly"],"type":"string"},"refund":{"description":"Configurations for the refund crypto wallet address","properties":{"address":{"description":"The refund crypto wallet address","type":"string"},"priority":{"description":"Priority of the crypto transaction (only usable for dash network)","enum":["fast","normal"],"type":"string"},"tag":{"description":"The refund crypto wallet address memo / destination tag","type":"string"}},"type":"object"},"reusableKyc":{"description":"Configurations for the reusable KYC session","properties":{"provider":{"description":"The reusable KYC session provider","type":"string"},"token":{"description":"The reusable KYC token given by the provider","type":"string"}},"type":"object"},"simulation":{"description":"Configuration for the simulation","properties":{"country":{"description":"Country to use during simulations, in alpha-2 code format","type":"string"}},"type":"object"},"source":{"description":"Configurations for the asset and amount to be paid","properties":{"allowedAssets":{"description":"Set of assets that the user can choose as target asset","items":{"properties":{"asset":{"description":"Asset that the user can choose as a target asset","type":"string"},"networks":{"description":"Set of networks that the user can choose for this target asset","items":{"type":"string"},"type":"array"}},"required":["asset"],"type":["object","string"]},"type":"array"},"amount":{"description":"Amount to be paid from the source","type":"string"},"asset":{"description":"Currency code in ISO 4217 format or Cryptoasset used to make the payment","type":"string"},"editMode":{"description":"Controls if the user can change asset and network on the widget. Values \"all-editable\" and \"only-amount\" are deprecated.","enum":["all-editable","not-editable","only-amount","only-asset-and-network"],"type":"string"},"label":{"description":"A label used for display purposes to name the recipient wallet","type":"string"},"network":{"description":"Network of the receiving asset","type":"string"},"paymentMethod":{"description":"Configurations for the payment method","properties":{"network":{"description":"Network to be used for the payment","enum":["apple-pay","google-pay","pix","card","sepa","paypal","venmo"],"type":"string"}},"type":"object"},"recipientEditMode":{"description":"Controls if the user can change asset, network, address, and tag on the widget","enum":["not-editable","only-address-and-tag","all-editable","only-asset-same-network"],"type":"string"},"walletSendUrl":{"description":"URL to redirect the user to send the crypto from their wallet.","type":"string"},"walletSendUrlMode":{"description":"In what mode should the `walletSendUrl` should be interpreted to","enum":["button","redirect"],"type":"string"},"walletSendUrlTarget":{"description":"In which tab should the `walletSendUrl` be opened.","enum":["new-tab","same-tab","parent-tab"],"type":"string"}},"type":"object"},"target":{"description":"Configurations for the recipient wallet","properties":{"address":{"description":"Recipient wallet address","type":"string"},"allowedAssets":{"description":"Set of assets that the user can choose as target asset","items":{"properties":{"asset":{"description":"Asset that the user can choose as a target asset","type":"string"},"networks":{"description":"Set of networks that the user can choose for this target asset","items":{"type":"string"},"type":"array"}},"required":["asset"],"type":["object","string"]},"type":"array"},"amount":{"description":"Amount the user will receive","type":"string"},"asset":{"description":"Currency code in ISO 4217 format or Cryptoasset the user will receive","type":"string"},"label":{"description":"A label used for display purposes to name the recipient wallet","type":"string"},"network":{"description":"Network of the receiving asset","type":"string"},"paymentMethod":{"description":"Configurations for the payment method","properties":{"network":{"description":"Network to be used for the payment","enum":["card"],"type":"string"}},"type":"object"},"priority":{"description":"Priority of the crypto transaction (only usable for dash network)","enum":["fast","normal"],"type":"string"},"recipientEditMode":{"description":"Controls if the user can change asset, network, address, and tag on the widget","enum":["not-editable","only-address-and-tag","all-editable","only-asset-same-network"],"type":"string"},"tag":{"description":"The recipient crypto wallet address memo / destination tag","type":"string"}},"type":"object"}},"type":"object"},"nullable":true,"type":"object"}}}},"parameters":[{"schema":{"enum":["crypto_onramp","crypto_offramp"]},"in":"query","name":"activeFlow","required":false,"description":"The flow on initialization"},{"schema":{"format":"email","type":"string"},"in":"query","name":"email","required":false,"description":"The user email to be used to prefill on the getting started page"},{"schema":{"type":"boolean"},"in":"query","name":"embed","required":false,"description":"Enable embed mode"},{"schema":{"enum":["en","en-US","pt","pt-BR","es","es-ES"]},"in":"query","name":"locale","required":false,"description":"The locale to set the widget"},{"schema":{"type":"boolean"},"in":"query","name":"redirect","required":false,"description":"Redirect instead of responding with the URL"},{"schema":{"items":{"format":"uuid","type":"string"},"type":"array"},"in":"query","name":"widgetIds","required":true,"description":"The widget ids to open"}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"bootstrapTokens":{"additionalProperties":{"type":"string"},"description":"The bootstrap tokens for each widget in case you want to open the widget using our SDK","type":"object"},"url":{"description":"The URL to open up the widget","type":"string"}},"required":["url"],"type":"object"}}}}}}},"/open-widget/{widgetId}":{"get":{"summary":"Generate a URL to open a widget","tags":["Open widgets"],"description":"This endpoint generates a URL to open a widget where Topper facilitates signing","parameters":[{"schema":{"items":{"format":"uuid","type":"string"},"maxItems":1,"minItems":0,"type":"array"},"in":"query","name":"campaign_ids","required":false,"description":"Public campaigns to be added to the widget session, it overrides any private campaign that would be applied to the session. Only one id can be provided for now. If they cannot be attributed to the session they will be silently ignored."},{"schema":{"format":"email","type":"string"},"in":"query","name":"email","required":false,"description":"The user email to be used to prefill on the getting started page"},{"schema":{"type":"boolean"},"in":"query","name":"embed","required":false,"description":"Enable embed mode"},{"schema":{"enum":["en","en-US","pt","pt-BR","es","es-ES"]},"in":"query","name":"locale","required":false,"description":"The locale to set the widget"},{"schema":{"type":"boolean"},"in":"query","name":"redirect","required":false,"description":"Redirect instead of responding with the URL"},{"schema":{"type":"string"},"in":"query","name":"source_amount","required":false,"description":"Amount to be paid from the source."},{"schema":{"type":"string"},"in":"query","name":"source_asset","required":false,"description":"Currency code in ISO 4217 format or Cryptoasset used to make the payment."},{"schema":{"format":"uuid","type":"string"},"in":"path","name":"widgetId","required":true,"description":"The widget id to open"}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"bootstrapToken":{"description":"The bootstrap token in case you want to open the widget using our SDK","type":"string"},"url":{"description":"The URL to open up the widget","type":"string"}},"required":["url"],"type":"object"}}}}}},"post":{"summary":"Generate a URL to open a widget","tags":["Open widgets"],"description":"This endpoint generates a URL to open a widget where Topper facilitates signing","requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":true,"properties":{"campaignIds":{"description":"Public campaigns to be added to the widget session, it overrides any private campaign that would be applied to the session. Only one id can be provided for now. If they cannot be attributed to the session they will be silently ignored.","items":{"format":"uuid","type":"string"},"maxItems":1,"minItems":0,"type":"array"},"partner":{"description":"Partner configurations","properties":{"continueUrl":{"description":"URL to redirect the user to after the order is placed and the funds were received.","type":"string"},"continueUrlTarget":{"description":"In which tab should the `continueUrl` be opened.","enum":["new-tab","same-tab","parent-tab"],"type":"string"},"displayName":{"description":"Partner name to be displayed to the user.","type":"string"},"fee":{"description":"An object configuring the partner fee to be charged","properties":{"percentage":{"description":"Percentage of the total source amount (the maximum allowed value is \"5\").","type":"string"}},"required":["percentage"],"type":"object"},"validation":{"description":"Partner validation configuration.","properties":{"device":{"description":"Partner validation configuration for the device.","properties":{"alg":{"description":"Hashing algorithm to use for the validation","enum":["sha256"],"type":"string"},"fields":{"description":"Fields to be used for the validation","items":{"enum":["ip","userAgent"],"type":"string"},"minItems":1,"type":"array"},"hash":{"description":"Hash to be used for the validation","type":"string"},"ip":{"description":"IP address to be used for the validation.","type":"string"},"ipVersion":{"description":"IP version to be used for the validation. If not provided, it will default to \"4\".","enum":["4","4_cidr_16","6","6_cidr_64"],"type":"string"},"userAgent":{"description":"User agent to be used for the validation.","type":"string"}}}},"required":[],"type":"object"}},"type":"object"},"partnerSellParams":{"description":"Partner sell quote","properties":{"quoteId":{"description":"Sell quote ID","format":"uuid","type":"string"}},"required":["quoteId"],"type":"object"},"periodicity":{"description":"The order periodicity","enum":["once","weekly","monthly"],"type":"string"},"refund":{"description":"Configurations for the refund crypto wallet address","properties":{"address":{"description":"The refund crypto wallet address","type":"string"},"priority":{"description":"Priority of the crypto transaction (only usable for dash network)","enum":["fast","normal"],"type":"string"},"tag":{"description":"The refund crypto wallet address memo / destination tag","type":"string"}},"type":"object"},"reusableKyc":{"description":"Configurations for the reusable KYC session","properties":{"provider":{"description":"The reusable KYC session provider","type":"string"},"token":{"description":"The reusable KYC token given by the provider","type":"string"}},"type":"object"},"simulation":{"description":"Configuration for the simulation","properties":{"country":{"description":"Country to use during simulations, in alpha-2 code format","type":"string"}},"type":"object"},"source":{"description":"Configurations for the asset and amount to be paid","properties":{"allowedAssets":{"description":"Set of assets that the user can choose as target asset","items":{"properties":{"asset":{"description":"Asset that the user can choose as a target asset","type":"string"},"networks":{"description":"Set of networks that the user can choose for this target asset","items":{"type":"string"},"type":"array"}},"required":["asset"],"type":["object","string"]},"type":"array"},"amount":{"description":"Amount to be paid from the source","type":"string"},"asset":{"description":"Currency code in ISO 4217 format or Cryptoasset used to make the payment","type":"string"},"editMode":{"description":"Controls if the user can change asset and network on the widget. Values \"all-editable\" and \"only-amount\" are deprecated.","enum":["all-editable","not-editable","only-amount","only-asset-and-network"],"type":"string"},"label":{"description":"A label used for display purposes to name the recipient wallet","type":"string"},"network":{"description":"Network of the receiving asset","type":"string"},"paymentMethod":{"description":"Configurations for the payment method","properties":{"network":{"description":"Network to be used for the payment","enum":["apple-pay","google-pay","pix","card","sepa","paypal","venmo"],"type":"string"}},"type":"object"},"recipientEditMode":{"description":"Controls if the user can change asset, network, address, and tag on the widget","enum":["not-editable","only-address-and-tag","all-editable","only-asset-same-network"],"type":"string"},"walletSendUrl":{"description":"URL to redirect the user to send the crypto from their wallet.","type":"string"},"walletSendUrlMode":{"description":"In what mode should the `walletSendUrl` should be interpreted to","enum":["button","redirect"],"type":"string"},"walletSendUrlTarget":{"description":"In which tab should the `walletSendUrl` be opened.","enum":["new-tab","same-tab","parent-tab"],"type":"string"}},"type":"object"},"target":{"description":"Configurations for the recipient wallet","properties":{"address":{"description":"Recipient wallet address","type":"string"},"allowedAssets":{"description":"Set of assets that the user can choose as target asset","items":{"properties":{"asset":{"description":"Asset that the user can choose as a target asset","type":"string"},"networks":{"description":"Set of networks that the user can choose for this target asset","items":{"type":"string"},"type":"array"}},"required":["asset"],"type":["object","string"]},"type":"array"},"amount":{"description":"Amount the user will receive","type":"string"},"asset":{"description":"Currency code in ISO 4217 format or Cryptoasset the user will receive","type":"string"},"label":{"description":"A label used for display purposes to name the recipient wallet","type":"string"},"network":{"description":"Network of the receiving asset","type":"string"},"paymentMethod":{"description":"Configurations for the payment method","properties":{"network":{"description":"Network to be used for the payment","enum":["card"],"type":"string"}},"type":"object"},"priority":{"description":"Priority of the crypto transaction (only usable for dash network)","enum":["fast","normal"],"type":"string"},"recipientEditMode":{"description":"Controls if the user can change asset, network, address, and tag on the widget","enum":["not-editable","only-address-and-tag","all-editable","only-asset-same-network"],"type":"string"},"tag":{"description":"The recipient crypto wallet address memo / destination tag","type":"string"}},"type":"object"}},"type":"object"}}}},"parameters":[{"schema":{"items":{"format":"uuid","type":"string"},"maxItems":1,"minItems":0,"type":"array"},"in":"query","name":"campaign_ids","required":false,"description":"Public campaigns to be added to the widget session, it overrides any private campaign that would be applied to the session. Only one id can be provided for now. If they cannot be attributed to the session they will be silently ignored."},{"schema":{"format":"email","type":"string"},"in":"query","name":"email","required":false,"description":"The user email to be used to prefill on the getting started page"},{"schema":{"type":"boolean"},"in":"query","name":"embed","required":false,"description":"Enable embed mode"},{"schema":{"enum":["en","en-US","pt","pt-BR","es","es-ES"]},"in":"query","name":"locale","required":false,"description":"The locale to set the widget"},{"schema":{"type":"boolean"},"in":"query","name":"redirect","required":false,"description":"Redirect instead of responding with the URL"},{"schema":{"type":"string"},"in":"query","name":"source_amount","required":false,"description":"Amount to be paid from the source."},{"schema":{"type":"string"},"in":"query","name":"source_asset","required":false,"description":"Currency code in ISO 4217 format or Cryptoasset used to make the payment."},{"schema":{"format":"uuid","type":"string"},"in":"path","name":"widgetId","required":true,"description":"The widget id to open"}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"description":"Success response","properties":{"bootstrapToken":{"description":"The bootstrap token in case you want to open the widget using our SDK","type":"string"},"url":{"description":"The URL to open up the widget","type":"string"}},"required":["url"],"type":"object"}}}}}}}},"tags":[{"description":"Country related end-points","name":"Countries"},{"description":"Asset related end-points","name":"Assets"},{"description":"Payment methods related end-points","name":"Payment methods"},{"description":"Simulation related end-points","name":"Simulations"},{"description":"Open widget related end-points","name":"Open widgets"},{"description":"Partner sell endpoints","name":"Partner sell"}]}