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
  • Subscribe Webhook
  • JSON Payload

Was this helpful?

  1. Data Subscriptions

Subscribe Webhook

This creates a new webhook subscription. Once created, Wyre will notify the target URL using HTTP(s) with a JSON payload that indicates the object has been updated. Payloads are lightweight with only two identifiers, see below.

You may subscribe to Accounts, Transfers, and Payment Methods by using the appropriate SRN. In some cases, a subscription may be created automatically. If you pass a callback URI to the Create Transfer API, for example, the callback will be implicitly created when the transfer is initiated.

All updates will eventually result in callbacks. However, the number of callbacks may be less than the number of individual updates, as we debounce the outbound requests for protection.

Subscribe Webhook

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

Request Body

Name
Type
Description

subscribeTo

string

The SRN for the object being subscribed/listened to. Whenever this referenced object is updated, the callback will get triggered

notifyTarget

string

The HTTP callback URI to notify when the subscribed object has been updated

{
  "id": "JF4DQ2NE1",
  "subscribed": "account:AC-F930QD8A2RRR",
  "notifyTarget": "https://www.potatoes.com/webhook1",
  "createdAt": 1548368619000,
  "failure": null,
  "failCount": 0
}

JSON Payload

When the callback is triggered, the payload will contain a JSON object with 2 fields:

subscriptionId

The same ID returned when the subscription was created

trigger

The SRN of the object which triggered the callback (the same SRN assigned via subscribeTo)

{
  "subscriptionId": "JF4DQ2NE1",
  "trigger": "account:AC-AAABBCC22"
}

It is your responsibility to reach back out to the Wyre API with your credentials to retrieve the updated object.

For example, once you receive a callback to your specified endpoint that you've added when creating a new webhook, to get any updates to your account in this particular example (or whatever resource you subscribed to), you'll then need to hit the GET /v3/accounts/AC_XXXXXX endpoint to receive the newly updated object. If you are subscribing to transfers or payment methods, you'll need to hit those specific endpoints to retrieve the updated objects.

At any time if you would like to halt the webhooks, you may delete the subscription.

PreviousData SubscriptionsNextGet Subscriptions

Last updated 4 years ago

Was this helpful?