Convert Wyre Checkout Users to Recurring Payments

Leverage Checkout to handle the UX of user KYC and Plaid connection, while generating a bank account token that can be used for recurring payments.

For partners that have added ACH to Wyre Checkout, use our webhooks to retrieve the Plaid payment method created. This payment method can then be used for any recurring type of payment, whether its a scheduled, fixed recurring payment or a variable, account-on-file purchase.

🚧

Requires 'User' webhooks

For this flow to work properly please contact Wyre technical support or your account manager to set this up.

1. Create a User (optional)

This is an optional step but recommended, in order to establish a clear, one to one, relationship between your user accounts and Wyre 'Users'. The request may be blank but we recommend first and last name.

{
    "fields": {
        "firstName": "Tim",
        "lastName": "Cook"
    },
    "blockchains": [
        "ALL"
    ],
    "immediate": false
}

Note, the User will have an initial, generic status of 'Approved', however, you should always check the User status by Scopes to be confirm the functionality available.

{
    "id": "US_QVPFLMNNL8D",
    "status": "APPROVED",
    "partnerId": "PT_6NU9NYY3XRU",
    "type": "INDIVIDUAL",
    "createdAt": 1654639090304,
    "depositAddresses": {
        "BTC": "msSiRkX3oerzfaxCzppK5CdpLoQV2ehv6A",
        "MATIC": "0x6c2f0ac0b7e4fb530d619c583c7baa5013b264e0",
        "AVAX": "X-fuji13sf6u4lyteermmhj5ankggqagf2n7p2lg442g4",
        "ETH": "0xad8a069622b1e8d9e8a9fa9c0ad7bed873db6ec8",
        "XLM": "GD7WXI7AOAK2CIPZVBEFYLS2NQZI2J4WN4HFYQQ4A2OMFVWGWAL3IW7K:UHUYMBX9BBL",
        "AVAXC": "0x0a2218df53b74ae29bbb98ef5405e2516d38b307"
    },
    "totalBalances": {},
    "availableBalances": {},
    "fields": {
        "legalName": {
            "value": null,
            "error": "Missing legalName",
            "status": "OPEN"
        },
        "firstName": {
            "value": "Tim",
            "error": null,
            "status": "SUBMITTED"
        },
        "lastName": {
            "value": "Cook",
            "error": null,
            "status": "SUBMITTED"
        },
        "cellphoneNumber": {
            "value": null,
            "error": "Missing cellphoneNumber",
            "status": "OPEN"
        },
        "email": {
            "value": null,
            "error": "Missing email",
            "status": "OPEN"
        },
        "residenceAddress": {
            "value": null,
            "error": "Missing residenceAddress",
            "status": "OPEN"
        },
        "ssn": {
            "value": "REDACTED",
            "error": "Missing ssn",
            "status": "OPEN"
        }
    }
}

2. Create a Checkout instance

Populate the user Id from step 1 as the owner of the reservation.

Example: "owner": "user:US_PMJV6AZJBAD"

{
     "referrerAccountId": "AC_YC3NT6GEZ8U",
     "owner": "user:US_PMJV6AZJBAD"
}

3. Receive User Webhook

{
"userId": "US_WLQLNDV97ZA",
"type": "USER_STATUS_UPDATED"
}

4. Query User Payment Method

Use Get Payment Method to check if the user attached their bank account with Plaid.

Make sure to use masquerading. Example:
https://api.testwyre.com/v2/paymentMethods?masqueradeAs=user:US_PMJV6AZJBAD

{
    "data": [
        {
            "id": "PA_JYGMRJ63WJ9",
            "owner": "user:US_PMJV6AZJBAD",
            "createdAt": 1639439939000,
            "name": "Plaid Checking 0000",
            "defaultCurrency": "USD",
            "fingerprint": "EH6HMC/UfK+45MdA9s+RlVE3mzbROARQiT5KGh26c94=",
            "status": "APPROVED",
            "statusMessage": null,
            "waitingPrompts": [],
            "linkType": "LOCAL_TRANSFER",
            "beneficiaryType": "UNKNOWN",
            "supportsDeposit": true,
            "nameOnMethod": null,
            "last4Digits": "0000",
            "brand": null,
            "expirationDisplay": null,
            "countryCode": "US",
            "nickname": null,
            "rejectionMessage": null,
            "disabled": false,
            "supportsPayment": true,
            "chargeableCurrencies": [
                "USD"
            ],
            "depositableCurrencies": [
                "USD"
            ],
            "chargeFeeSchedule": null,
            "depositFeeSchedule": null,
            "minCharge": null,
            "maxCharge": null,
            "minDeposit": null,
            "maxDeposit": null,
            "documents": [],
            "blockchains": {},
            "liquidationBalances": {},
            "srn": "paymentmethod:PA_JYGMRJ63WJ9"
        }
    ],
    "position": 0,
    "recordsTotal": 1,
    "recordsFiltered": 1
}

5. Create a Transfer from Payment Method

Use our Transfers service to initiate a recurring payment from the user's bank account.

{
    "source": "paymentmethod:PA_C3HYHFH4FFT:ACH",
    "sourceCurrency": "USD",
    "destAmount": "1000",
    "notifyUrl": "https://requestinspector.com/inspect/testwebhookUrl",
    "dest": "algorand:I36YZ5256NQQOJA23EWXX4JJVMD4L5HHTOXCTNY27LMW3OZITQ2EAV4JME",
    "autoConfirm": true,
    "destCurrency": "ALGO",
    "message": "test funds"
}