Wyre Documentation
  • ๐Ÿ“กWyre Documentation
  • Home
  • ๐Ÿ‘ฅAccount Onboarding
    • Account Overview
    • Use Cases
    • Pricing
    • API Calls
      • Create Account
      • Get Account
      • Update Account
      • Upload Document
  • ๐Ÿ”—Wallets
    • Use Cases
    • Managing Wallets
      • Creating a Wallet
      • Create Mulitple Wallets
      • Lookup Wallet
      • Edit Wallet
      • List Wallets
      • Delete Wallet
    • Wallet Callbacks
  • ๐Ÿ’ณPayments
    • Limits + Coverage
    • Pricing
    • Chargeback + Risk
    • Accepted Payment Methods
    • Global Card Processing
      • Hosted Redirect Operation
      • Browser Dialog (Popup) Operation
      • Understanding Transaction Statuses
        • Wallet Order Errors and Exceptions (Failure Reasons)
      • Additional Widget Functionality and Features
        • Checking Limits
        • Tracking Orders
      • Widget FAQs
      • โš ๏ธ Wallet Order Reservations | Required! โš ๏ธ
      • API Calls To Help Monitor Transactions
        • Track Widget Order
        • Check A User's Transaction Limits
        • Check Supported Countries
      • Client-Side Encryption ๐Ÿ‘ป
  • ๐ŸŒGlobal Payouts
    • Use Cases
    • Limits + Coverage
    • Pricing
    • Supported Countries
    • Country Requirements
    • ๐Ÿ”ฅBlockchain + Banks
    • ๐Ÿ”ฅInstant Payouts to Debit Card
  • ๐Ÿ’ฑForeign Exchange
    • Exchange Rates
  • Methodologies
  • Payment Methods
    • API Calls
      • Creating a Payment Method- ACH
      • List Payment Methods
      • Create a Payment Method- Wire Transfer
      • Get Payment Method
      • Attach Blockchain to Payment Method
  • Transfers
    • API Calls
      • Creating a Transfer
      • Confirm a Transfer
      • Get Transfer
      • Transfer History
  • Data Subscriptions
    • Subscribe Webhook
    • Get Subscriptions
    • Delete Webhook
  • Resources
  • โœ…Going Live
  • Testing Enviornment
  • Understanding API Errors
  • System Resource Name
  • Rate Limiting
  • Authentication & Key Management
    • Authorization Tokens
    • Create an API Key
    • Delete an API Key
    • Authentication Code Examples
  • Wyre Brand Assets
    • ๐ŸŽจColor Palette And Wyre Logos
  • Links
    • ๐ŸงชTest Wyre Dashboard
    • ๐Ÿ—ฃ๏ธ Wyre's Discord
Powered by GitBook
On this page
  • Understanding the Expected Flow: MetaMask
  • Wallet Order Webhook
  • Passing parameters in the Widget: Hosted Mode
  • Registering the Webhook

Was this helpful?

  1. Payments
  2. Global Card Processing

Hosted Redirect Operation

PreviousGlobal Card ProcessingNextBrowser Dialog (Popup) Operation

Last updated 4 years ago

Was this helpful?

Wyreโ€™s hosted redirect is a simple way to add fiat-to-crypto into your web or mobile application. Users can purchase using Apple Pay and debit card entry.

Understanding the Expected Flow: MetaMask

Query Parameter

Description

Value

dest

ethereum:0xYYYY bitcoin:1xxxxx

destCurrency

Specifies the currency to present for purchase to the user. This is present when a transfer is initiated.

ETH, BTC, DAI or USDC

sourceAmount

Currency amount to purchase.

destAmount is no longer supported in the hosted widget checkout.

0.5 10.13 125

paymentMethod

The id of the payment method type youโ€™d like the user to start off with. Generally you'll want to leave this blank. Wyre will determine what to display based on OS.

apple-pay or debit-card (Only specific if you have a specific use case)

redirectUrl

A url that the user will be sent to when they select any close button.

The following data will be passed to the redirectUrl as url query parameters: transferId, orderId, accountId, dest, fees, and destAmount

(iOS) myapp:// (Web) https://myapp.com/

accountId

Your Wyre Account ID. This associates accounts created inside the widget with you, though it does not give you access to their details

failureRedirectUrl

Url to get the user redirect in case order fails. You should handle error and display messages in your end when using this property.

Optional

After initiating a purchase, users will be taken to a processing view as the payment is being completed. This process takes on average 15-45 seconds. Once Wyre has initiated a blockchain transaction, the user will be taken to the Purchase Completed view which will display information about the completed transaction.

Here is an example URL that uses URL parameters to help improve UX:

https://pay.sendwyre.com/purchase?
destCurrency=BTC&sourceAmount=10&
dest=18XZiNoVAKx4NbppwNCuxiLw9wvTc3qzf6&
paymentMethod=apple-pay&accountId=AC_DW6V9VLY6EJ

Wallet Order Webhook

Rather than relying on redirectUrl for callbacks, this section covers how to receive wallet order webhook updates when Digital Wallet orders change status.

Passing parameters in the Widget: Hosted Mode

https://pay.testwyre.com/purchase?dest=ethereum%3A0x98B031783d0efb1E65C4072C6576BaCa0736A912&destCurrency=ETH&sourceAmount=10&paymentMethod=apple-pay&referenceId=your_own_id&accountId=YOUR_ACCOUNT

Parameter

Description

Required

referenceId

Your own internal reference id.

String, optional

accountId

Your Wyre account id.

String, required for the webhook to work.

Registering the Webhook

Ask a Wyre team member to register your webhook URL by providing them your accountId and the url where you host the widget. This configuration is per environment.

The webhook will be called for any state change in orders which were submitted with an accountId that has a webhook URL configured. A Webhook response looks like this. ๐Ÿ‘‡

 
{
  "referenceId":"your_reference_id", // your own id passed in the order creation
   "accountId":"AAAAAAAAAAA", // your Wyre account id
   "orderId":"WO_0000000001", // the wallet order id
   "orderStatus":"PROCESSING", // the order status {PROCESSING, COMPLETE, FAILED}]
   "transferId":"TF_000000001", // OPTIONAL, available when order was completed,  the transfer id
   "failedReason":" OPTIONAL,  some string with failed reason" // if failed, there should be a reason string when possible
}

Above is MetaMask's Wyre integration using the Hosted Redirect. A user opens their MetaMask wallet, clicks on "Deposit" and then selects "Continue to Wyre". Since MetaMask knows the address dest they use they use a parameter to pass that information in on behalf of the user. When the user arrives at the Wyre widget they already have that information prefilled. You can use all or some of the parameters to create a better checkout experience for you user like MetaMask did. Visiting starts the checkout. To help your users pay quicker, you can pass in some or all of the following query parameters which will auto-fill into the purchase form.

An which is where the funds will be sent after the completes

๐Ÿ’ณ
https://pay.sendwyre.com/
SRN
MetaMask's Hosted Redirect