Skip to content

Commit

Permalink
Add documentation about allowed target assets
Browse files Browse the repository at this point in the history
  • Loading branch information
zangetsouu committed Jul 25, 2024
1 parent 0352b79 commit 4b10006
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/flows/crypto-onramp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The crypto on-ramp flow allows a user to add funds from a credit or debit card t
- `paymentMethod` (_optional_): An object configuring the pre-selected payment method.
- `network`: Payment method network (e.g.: `apple-pay`, `google-pay`, `pix` or `card`).
- `target` (_optional_): An object configuring recipient wallet.
- `allowedAssets` (_optional_): Set of cryptoassets that the user can set as target asset.
- `amount` (_optional_): Amount the user will receive.
- `asset`: Cryptoasset the user will receive.
- `network`: Network of the receiving asset.
Expand All @@ -44,6 +45,12 @@ At least one of `source.amount` or `target.amount` _must_ be provided, but not b
The supported values for `source.asset`, `target.asset`, `target.network`, `target.tag` and `target.priority` can be found using our [REST API](../rest-api.md), via the [assets endpoint](https://api.topperpay.com/assets/crypto-onramp).
:::

:::caution
If `target.allowedAssets` is set, and you define `target.asset` with an asset that is not allowed, the bootstrap will fail.

If `target.allowedAssets` is set and `target.asset` is not, the `target.asset` will default to the first asset on `target.allowedAssets`.
:::

:::caution
In the `sandbox` environment, Topper has limited funds on testnets. If you make an order using an asset we have no funds for, the order will be stuck indefinitely trying to create the blockchain transaction.
We recommend that you use `XRP` for testing purposes when integrating Topper since we have a larger quantity of them. If you prefer to test with another asset and network, please reach out to us beforehand so that we can guarantee funds on our pool and give you a smoother integration experience.
Expand Down Expand Up @@ -73,6 +80,7 @@ We recommend that you use `XRP` for testing purposes when integrating Topper sin
}
},
"target": {
"allowedAssets": ["BTC", "ETH", "XRP"]
"address": "0xb794f5ea0ba39494ce839613fffba74279579268",
"asset": "ETH",
"network": "ethereum",
Expand Down

0 comments on commit 4b10006

Please sign in to comment.