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
  • Constructing the Transfer Request
  • Source and destination
  • Movement VS Exchange
  • Totals
  • Transfer Fields
  • Create Transfer
  • Examples

Was this helpful?

  1. Transfers
  2. API Calls

Creating a Transfer

This endpoint is the starting point for initializing all Wyre transfers - moving and/or exchanging currency or tokens.

After you create the transfer it will be in an UNCONFIRMED state. You will have a limited window of time to review the transfer and confirm it before the quote expires. This window depends on the exact currency pair being exchanged, and the expiresAt attribute indicates the expiry time (epoch timestamp in milliseconds), based on this window. If the transfer expires you'll have to reissue the transfer request and confirm the new transfer.

You may also instead automatically confirm the transfer by supply autoConfirm=true to skip the followup price confirmation.

Constructing the Transfer Request

The Transfer API offers flexibility in the intents that it accepts. There are three primary constructs that together create this functionality:

Source and destination

The source of the transfer is the system from which funds are being pulled, while the dest is, somewhat unsurprisingly, the final destination of the funds. These parameters are SRNs and can be different types - accounts, payment methods, wallets, or blockchain addresses.

Eligibility varies across these types as well as between specific instances for usage as source or destination. e.g. a bitcoin address may be used (currently) only as a destination, while some payment methods may be able to be used for either source or destination.

Movement VS Exchange

The API offers two paramters, sourceCurrency and destCurrency, which collectively control the exchange behavior of the transfer.

If only sourceCurrency is supplied, or both are supplied and are identical, the transfer will perform no exchange and the currency will remain in its original form.

If the two are different, then an exchange is performed to convert the sourceCurrency taken from the source to the destCurrency.

Totals

There are three common ways to express the numeric totals involved in your Transfer:

Amount of money to process

You indicate the amount to move or convert. Fees are added on top of your indicated subtotal, and the resulting final total is withdrawn/requested from the source.

In this case, specify only sourceAmount, and amountIncludesFees will default to false.

Total to withdraw

You want to indicate the total amount that will be withdrawn/requested from the source, inclusive of fees.

In this case, specify sourceAmount and also specify amountIncludesFees=true.

Total to arrive

You want to indicate the total amount that will hit the destination. The system will compensate in fees and exchange rate to accomplish it.

In this case, specify only destAmount, and amountIncludesFees will default to false.

Transfer Fields

Field

Description

exchangeRate

The quoted exchange rate for the transfer expressed as a multiplier, such that:

sourceAmount * exchangeRate = destAmount

This rate may vary on shallow markets

totalFees

The total fees will always be represented in the source currency. To convert totalFees to the destination currency, multiply it by the exchange rate. Note that this object includes all Wyre fees and miner fees if applicable.

sourceAmount

the total amount of funds, incl. fees, used in processing this transfer

destAmount

the total amount of funds that should be received by the destination

Create Transfer

POST https://api.sendwyre.com/v3/transfers

Request Body

Name
Type
Description

source

string

An SRN representing an account that the funds will be retrieved from

sourceAmount

String

The amount to withdrawal from the source, in units of sourceCurrency. Only include sourceAmount OR destAmount, not both.

sourceCurrency

string

The currency (ISO 3166-1 alpha-3) to withdrawal from the source wallet

dest

string

An email address, cellphone number, digital currency address or bank account to send the digital currency to. For bitcoin address use "bitcoin:[address]". Note: cellphone numbers are assumed to be a US number, for international numbers include a '+' and the country code as the prefix.

destAmount

String

Specifies the total amount of currency to deposit (as defined in depositCurrency). Only include sourceAmount OR destAmount, not both.

destCurrency

string

The currency (ISO 3166-1 alpha-3) to deposit. if not provided, the deposit will be the same as the withdrawal currency (no exchange performed)

message

string

A user-visible message to be sent with the transaction.

notifyUrl

string

An optional URL that Wyre will POST a status callback

autoConfirm

boolean

automatically confirm the transfer order.

customId

string

An optional custom ID to tag the transfer

amountIncludesFees

boolean

When true, the amount indicated (source or dest) will be treated as already including the fees

preview

boolean

creates a quote transfer object, but does not execute a real transfer.

muteMessages

boolean

When true, disables outbound emails/messages to the destination

{
    "id": "TF-4F3HRUYPNFY",
    "sourceAmount": 5,
    "sourceCurrency": "USD",
    "destAmount": 0.01,
    "destCurrency": "BTC",
    "status": "PENDING",
    "message": "Payment for DorianNakamoto@sendwyre.com",
    "customId": null,
    "exchangeRate": 499.00,
    "createdAt": 1541552388000,
    "fees": {
        "USD": 0.1,
        "BTC": 0
    },
    "totalFees": 0.1,
    "completedAt": 1541552388000,
    "cancelledAt": null,
    "failureReason": null,
    "expiresAt": 1541553288000,
    "reversingSubStatus": null,
    "reversalReason": null,
    "pendingSubStatus": null,
    "dest": "bitcoin:14CriXWTRoJmQdBzdikw6tEmSuwxMozWWq",
    "blockchainTx": null,
    "statusHistories": [
        {
            "id": "N88AFATLRZY",
            "transferId": "TF-4F3HRUYPNFY",
            "createdAt": 1541552388000,
            "type": "OUTGOING",
            "statusOrder": 0,
            "statusDetail": "Initiating Transfer",
            "state": "INITIATED",
            "failedState": null
        },
        {
            "id": "PED3FNLNUV7",
            "transferId": "TF-4F3HRUYPNFY",
            "createdAt": 1541552388000,
            "type": "OUTGOING",
            "statusOrder": 200,
            "statusDetail": "Processing Exchange",
            "state": "PENDING",
            "failedState": null
        }
    ],
    "owner": "account:AC-WYUR7ZZ6UMU",
    "source": "account:AC-WYUR7ZZ6UMU"
}

Examples

 {  
     "source":"account:AC-WYUR7ZZ6UMU",
     "sourceCurrency":"USD",
     "sourceAmount":"5",
     "dest":"bitcoin:14CriXWTRoJmQdBzdikw6tEmSuwxMozWWq",
     "destCurrency":"BTC", 
     "message": "Payment for DorianNakamoto@sendwyre.com",
     "autoConfirm":true  
   }

PreviousAPI CallsNextConfirm a Transfer

Last updated 4 years ago

Was this helpful?