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.

📘

Content

1. Create a User

User request may be blank, as we will collect the information via our hosted pages.

{
    "blockchains":["ALL"]
}
{
    "id": "US_PMJV6AZJBAD",
    "status": "OPEN",
    "partnerId": "PT_UUEJLH74VEN",
    "type": "INDIVIDUAL",
    "createdAt": 1639440252047,
    "depositAddresses": {
        "BTC": "n1L8wPMbw5snWDQV4XVvgt9bT5eCjcnnn3",
        "MATIC": "0xc703525015a3f4e0e88172415507f12adab65347",
        "AVAX": "X-fuji1nndwj25duc9mrqpunxv78rdjfxszmlweyrlfk3",
        "ETH": "0x08fa5de4dc641b2d849b8ba77ff38a0b5ef73ce4",
        "XLM": "GD7WXI7AOAK2CIPZVBEFYLS2NQZI2J4WN4HFYQQ4A2OMFVWGWAL3IW7K:ELWXW4F8GME"
    },
    "totalBalances": {},
    "availableBalances": {},
    "fields": {
        "legalName": {
            "value": null,
            "error": "Missing legalName",
            "status": "OPEN"
        },
        "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"
}