Skip to content
Last updated

Sub-Accounts Webhooks

Overview

Ryft offers several webhook events specifically for Sub-Accounts. These events allow you to stay informed about important actions and changes related to your sub-accounts.

At a minimum, you should consider subscribing to the following webhook events for sub-accounts:

  • Account.created: Triggered when a new Sub-Account is created.
  • Account.updated: Triggered when an existing Sub-Account is updated via the API or internally by Ryft (e.g., changes to account status).
  • Person.created: Triggered when a new person is created and associated with a Sub-Account.
  • Person.updated: Triggered when an existing person is updated via the API or internally by Ryft (e.g., changes to verification status).

Overall, the created events will allow you to store the id of the newly created object in your database, while the updated events will allow you to monitor changes to the object over time.

Account Events

These events will be stored under the Main Account, so no account header is required when quering for these events using the Events API.

This event is triggered whenever a new Sub-Account is created using the subAccountCreate endpoint.

Account.created - Payload Example
{
    "id": "ev_XXXXXXXX",
    "eventType": "Account.created",
    "data": {
        "id": "ac_XXXXXXXX",
        "type": "Sub",
        "status": "ActionRequired",
        "actionsRequired": [
            {
                "action": "PayoutDetailsRequired",
                "description": "Head over to our portal in order to get setup for payouts",
            }
        ],
        "onboardingFlow": "Hosted",
        "entityType": "Business",
        "business": {
            "name": "Test Company Ltd",
            "type": "PublicCompany",
            "registrationNumber": "12345678",
            "registeredAddress": {
                "lineOne": "13 Downing Street",
                "city": "London",
                "postalCode": "SW1 1AA",
                "country": "GB",
            },
            "contactEmail": "test@email.com",
        },
        "verification": {"status": "NotRequired", "persons": {"status": "NotRequired"}},
        "frozen": false,
        "settings": {"payouts": {"schedule": {"type": "Automatic"}}},
        "capabilities": {
            "visaPayments": {
                "status": "Enabled",
                "available": true,
                "enabledTimestamp": 1758299895,
                "lastUpdatedTimestamp": 1758299895,
            },
            "mastercardPayments": {
                "status": "Enabled",
                "available": true,
                "enabledTimestamp": 1758299895,
                "lastUpdatedTimestamp": 1758299895,
            },
            "amexPayments": {
                "status": "NotRequested",
                "available": true,
                "requiredFields": [
                    {"name": "business.phoneNumber"},
                    {"name": "business.websiteUrl"},
                ],
                "lastUpdatedTimestamp": 1758299895,
            },
        },
        "createdTimestamp": 1758299895,
    },
    "createdTimestamp": 1758299898,
    "lastUpdatedTimestamp": 1758299898,
    "deliveryStatus": "None",
}

Person Events

These events will be stored under the Sub-Account, so the account header with the Sub-Account ID is required when quering for these events using the Events API.

This event is triggered whenever a new person is created and associated with a Sub-Account using the personCreate endpoint.

Person.created - Payload Example
{
    "id": "ev_XXXXXXXX",
    "eventType": "Person.created",
    "data": {
        "id": "per_XXXXXXXX",
        "firstName": "Test First Name",
        "lastName": "Test Last Name",
        "email": "test@example.com",
        "dateOfBirth": "1988-02-03",
        "gender": "Male",
        "nationalities": ["GB"],
        "address": {
            "lineOne": "88 Parker Street",
            "city": "Manchester",
            "region": "Greater Manchester",
            "postalCode": "SP4 7DE",
            "country": "GB",
        },
        "phoneNumber": "+441234567891",
        "businessRoles": ["BusinessContact"],
        "verification": {
            "status": "Required",
            "requiredDocuments": [
                {
                    "category": "ProofOfIdentity",
                    "types": ["DriversLicense", "NationalId", "Passport"],
                    "quantity": 1,
                },
                {
                    "category": "Authorization",
                    "types": ["LetterOfAuthorization"],
                    "quantity": 1,
                },
            ],
        },
        "createdTimestamp": 1700675280,
        "lastUpdatedTimestamp": 1700675284,
    },
    "accountId": "ac_XXXXXXXX",
    "createdTimestamp": 1700675296,
}

Payout Method Events

These events will be stored under the Sub-Account, so the account header with the Sub-Account ID is required when quering for these events using the Events API.

This event is triggered whenever a new payout method is created and associated with a Sub-Account using the payoutMethodCreate endpoint.

PayoutMethod.created - Payload Example
{
    "id": "ev_XXXXXXXX",
    "eventType": "PayoutMethod.created",
    "data": {
        "id": "pm_XXXXXXXX",
        "type": "BankAccount",
        "displayName": "My bank account",
        "status": "Valid",
        "currency": "GBP",
        "countryCode": "GB",
        "bankAccount": {
            "bankIdType": "SortCode",
            "bankId": "XXXXXX",
            "bankName": "My Bank",
            "accountNumberType": "UnitedKingdom",
            "last4": "XXXX",
        },
        "createdTimestamp": 1700675204,
        "lastUpdatedTimestamp": 1700675207,
    },
    "accountId": "ac_XXXXXXXX",
    "createdTimestamp": 1758627983,
    "lastUpdatedTimestamp": 1758627983,
    "deliveryStatus": "Success",
}

Payout Events

These events will be stored under the Sub-Account, so the account header with the Sub-Account ID is required when quering for these events using the Events API.

This event is triggered whenever a new payout is created and associated with a Sub-Account using the payoutCreate endpoint.

Payout.created - Payload Example
{
    "id": "ev_XXXXXXXX",
    "eventType": "Payout.created",
    "data": {
        "id": "po_XXXXXXXX",
        "paymentsTakenDate": "2023-11-21",
        "paymentsTakenDateFrom": "2023-11-21",
        "paymentsTakenDateTo": "2023-11-21",
        "amount": 10000,
        "currency": "GBP",
        "status": "InProgress",
        "scheduleType": "Manual",
        "payoutMethod": {"id": "pm_XXXXXXXX"},
        "payoutCalculation": {
            "paymentsCapturedAmount": 0,
            "paymentsRefundedAmount": 0,
            "paymentsSplitAmount": 0,
            "paymentsSplitRefundedAmount": 0,
            "splitPaymentsAmount": 0,
            "splitPaymentsRefundedAmount": 0,
            "platformFeesCollectedAmount": 0,
            "platformFeesRefundedAmount": 0,
            "platformFeesPaidAmount": 0,
            "processingFeesPaidAmount": 0,
            "payoutAmount": 10000,
            "currency": "GBP",
            "numberOfPaymentsCaptured": 0,
            "numberOfPaymentsRefunded": 0,
            "numberOfPaymentsSplit": 0,
            "numberOfPaymentsSplitRefunded": 0,
            "numberOfSplitPayments": 0,
            "numberOfSplitPaymentsRefunded": 0,
            "numberOfPlatformFeesCollected": 0,
            "numberOfPlatformFeesRefunded": 0,
            "numberOfCustomers": 0,
            "numberOfNewCustomers": 0,
            "feeAmount": 0,
        },
        "createdTimestamp": 1700675210,
        "scheduledTimestamp": 1700675210,
    },
    "accountId": "ac_XXXXXXXX",
    "createdTimestamp": 1700675210,
}