Check A User's Transaction Limits

To quote current limits you should place a POST call with the target billing address that will be used in the order. a country must be a valid 2 characters ISO 3166-1 alpha-2 country code.

The limit check conditions are as follows: Daily limits, Weekly limits, Yearly limits

The parameter accountId is completely optional. For partners with custom limits, they must include their Wyre's accountId so users will inherit custom limits. If no specified will fall back to standard limits.

If the user exceeds the daily limit, but still has a weekly limit to spend they should wait until the next day. Any order above dailyRemaining, weeklyRemaining or yearlyRemaining will reject the order causing a failure.

POST https://api.sendwyre.com/v3/widget/limits/calculate

Request Body

Name
Type
Description

walletType

string

Wallet type, must be either APPLE_PAY or DEBIT_CARD

address

string

The address must include street1, city, state, postalCode, and country. See the example payload below

accountId

string

Partner account ID

{
    "dailyTotalSpent": 0.00,
    "weeklyTotalSpent": 2.00,
    "yearlyTotalSpent": 23.15,
    "dailyTotal": 260.00,
    "weeklyTotal": 1000.00,
    "yearlyTotal": 1500.00,
    "dailyRemaining": 260.00,
    "weeklyRemaining": 998.00,
    "yearlyRemaining": 1476.85
}

Example

curl -X POST \
  API_URL/v3/widget/limits/calculate \
  -H 'Content-Type: application/json' \
  -d '{
  "walletType": "DEBIT_CARD",
  "accountId": "AA_BBCCDDEEDD",
  "address": {
    "street1": "1550 Bryant Street",
    "city": "San Francisco",
    "state": "CA",
    "postalCode": "94103",
    "country": "US"
  }
}'

Last updated

Was this helpful?