Browser Dialog (Popup) Operation
Last updated
Was this helpful?
Last updated
Was this helpful?
Parameter
Description
Values
env
Defines which Wyre environment the widget operates against
Optional, defaults to "prod"
accountId
Your Wyre Account ID. This associates accounts created inside the widget with you, though it does not give you access to their details
Required
You'll have a different ID in each Wyre environment
Example: "AC-FD239aR29"
operation
Defines the user operation to perform after on-boarding/compliance requirements have been achieved
Required
See "Operation Values" below for details.
Example:
{
"type": "onramp",
"destCurrency": "BTC",
...
}
auth
(onramp
only)
The authorization object that defines how the widget connects to a Wyre account
Required
Type
Description
Value
type
The type of payment flow the user will go through.
Required
debitcard-hosted-dialog
: Users will go through a completely full-featured, Wyre-branded debit card payment flow in a separate popup window. This is the fastest way to integrate Wyre's widget.
debitcard-hosted
: Users will go through full-featured, Wyre-branded debit card payment flow hosted by Wyre. Your application will be redirected to Wyre Widget website to finish the payment flow. Once done, you can check callbacks to redirect it back to your applicatio
destCurrency
Specifies the currency to present for purchase to the user
Required
"DAI"
or "ETH"
or "BTC"
or "USDC"
dest
An ETH or BTC address based on the destCurrency
Optional
Example ETH Address:
ethereum: "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413"
Example BTC Address:
bitcoin: "1MkMmko5WQVboafwLEGgtfT7Jxj6AEbK5S"
sourceAmount
The amount to withdrawal from the source, in units of sourceCurrency
Optional
Debit Cards - Limits TBD
The widget will emit several different events at various points throughout its lifecycle. You can register an event handler like this:
Event Name
Event Properties
Description
paymentSuccess
{ paymentObject }
This event is emitted once a Wyre has initiated sending destCurrency to the user.
You can retrieve additional information for a new purchase, including the blockchain transaction hash, by submitting a GET request to the following URL:
https://api.sendwyre.com/v2/[transferId]/track
You can have a pop-up version of the Wyre widget displayed on your website or app by using the Widget in Browser Dialog mode. Below you can see the HTML code that was used in example on the main Widget page of the documentation. This code example shows how to create a "buy" button which you could place on part of your page. Once the user clicks on the "buy" button a popup window containing the widget will appear with the prefilled parameters defined by the code. We hope to see some more creative ways of re-creating the "buy" button in partners' apps and web pages. What will you do!?
prod
: Our real environment, live at
test
: Our partner testing environment, available at