Sync a liability's data
โจ Method Sync allows you to retrieve real-time enhanced data for any liability created in Method. Method Sync is available
for a fast growing list of merchants
.
With Sync, you can fetch key liability details such as interest_rate_percentage
, payoff_amount
, balance
and much more
in real-time directly from the financial institution or loan servicer. โก๏ธ See all available data fields per liability type.
Stepsโ
- Create an individual entity to represent your end-user.
- Create a liability account which we'll fetch enhanced data for.
- Initiate an account sync with the previously created liability account.
- Handle the sync events generated by the syncing process.
- Retrieve the liability data returned live from the financial institution.
1. Create an individual entityโ
First we'll create an individual entity. An entity is a representation of your end-user. To initiate a data sync
for an account you'll need to provide, at a minimum, the end-user's first_name
, last_name
and a verified phone
number.
Primer on capabilitiesโ
Capabilities are an indicator of an entities' status. For this flow we are interested in the data:sync
capability.
The location of data:sync
in an entities' capability fields indicates the next steps.
tip
Entities should only be created once per end-user. Entities can be re-used across all of Method's products.
Field | Meaning | Next Steps |
---|---|---|
pending_capability | We were unable to find the individual using the provided data. | Provide more data using Entity Update endpoint. |
capability | Entity successfully matched using the provided data. | Sync a liability's data using Account Sync endpoint (this guide!). |
caution
For building / testing in Method's dev
environment, see Auth Element simulate requirements
to determine what information should be submitted for an entity.
Requestโ
- cURL
- Node.js
- Python
/entities
curl https://production.methodfi.com/entities \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"individual": {
"first_name": "Kevin",
"last_name": "Doyle",
"phone": "+15121231111",
}
}'
/entities
const entity = await method.entities.create({
type: 'individual',
individual: {
first_name: 'Kevin',
last_name: 'Doyle',
phone: '+15121231111',
},
});
/entities
entity = method.entities.create({
'type': 'individual',
'individual': {
'first_name': 'Kevin',
'last_name': 'Doyle',
'phone': '+15121231111'
}
})
{
"id": "ent_au22b1fbFJbp8",
"type": "individual",
"individual": {
"first_name": "Kevin",
"last_name": "Doyle",
"phone": "+15121231111",
"dob": null,
"email": null
},
"capabilities": [
"payments:receive",
"payments:send"
],
"available_capabilities": [
"data:retrieve"
],
"pending_capabilities": [],
...
}
2. Create a liability accountโ
Next we'll create liability
account we want to retrieve data for. A liability
account is any type of liability
(personal loans, credit cards, student loans, bills, etc.)
Method Sync is available for a fast growing list of merchants
. A liability
account with data:sync
in available_capabilities
indicates that institution participates in Method Sync. For a full list of eligible merchants
contact Method Support.
Using Method Dataโ
๐ก You can automatically retrieve all of an entity's liabilities using Method Data. See the retrieve an entity's debts guide to learn more.
Demoโ
Using APIโ
info
To use the direct API method on a live environment you need to be PCI Compliant. Please contact us for more info.
โน๏ธ See create an account to learn more
Requestโ
- cURL
- Node.js
- Python
/accounts
curl https://dev.methodfi.com/accounts \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"holder_id": "ent_au22b1fbFJbp8",
"liability": {
"mch_id": "mch_183",
"account_number": "4147201234561580"
}
}'
/accounts
const account = await method.accounts.create({
holder_id: 'ent_au22b1fbFJbp8',
liability: {
mch_id: 'mch_183',
account_number: '4147201234561580',
}
});
/accounts
account = method.accounts.create({
'holder_id': 'ent_au22b1fbFJbp8',
'liability': {
'mch_id': 'mch_183',
'account_number': '4147201234561580'
}
})
{
"id": "acc_Zc4F2aTLt8CBt",
"holder_id": "ent_au22b1fbFJbp8",
"type": "liability",
"liability": {
"mch_id": "mch_183",
"mask": "1580",
"type": "credit_card",
"data_status": "pending",
"data_last_successful_sync": null,
"credit_card": {
"name": "Chase Sapphire Reserve",
"balance": null,
"opened_at": null,
"last_payment_date": null,
"last_payment_amount": null,
"next_payment_due_date": null,
"next_payment_minimum_amount": null,
"last_statement_balance": null,
"remaining_statement_balance": null,
"available_credit": null,
"pending_purchase_authorization_amount": null,
"pending_credit_authorization_amount": null,
"interest_saving_balance": null,
"interest_rate_percentage": null,
"interest_rate_type": null
}
},
"status": "active",
"capabilities": [
"payments:receive"
],
"available_capabilities": [
"data:sync"
],
"error": null,
"created_at": "2022-02-16T02:56:19.548Z",
"updated_at": "2022-02-16T02:56:19.548Z"
}
3. Initiate an account syncโ
Once the account
and the entity
both have the data:sync
capability you can initiate a sync for a specific liability.
A successful sync will enroll the liability in nightly data updates directly from the financial institution. (more on that below! โคต๏ธ)
๐ก To check the status of a sync use the data_status
and data_last_successful_sync
in the account.liability
response.
Requestโ
- cURL
- Node.js
- Python
/accounts/:account_id/syncs
curl https://production.methodfi.com/accounts/acc_Zc4F2aTLt8CBt/syncs \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc"
/accounts/:account_id/syncs
const account = await method.accounts('acc_Zc4F2aTLt8CBt').syncs.create();
/accounts/:account_id/syncs
account = method.accounts('acc_Zc4F2aTLt8CBt').syncs.create()
{
"data": {
"id": "acc_sync_6d94yUUMjbcXL",
"acc_id": "acc_Zc4F2aTLt8CBt",
"status": "in_progress",
"error": null,
"created_at": "2022-06-14T15:10:28.213Z",
"updated_at": "2022-06-14T15:10:28.213Z"
}
}
4. Handle the sync eventsโ
Sync is optimized for speed, and will eagerly save / notify of new updates to a liability (even if the sync is still in_progress and incomplete) In practice, this means that some fields might temporarily return null while we wait for data to be received from the financial institution.
Method Sync interfaces directly with financial institutions, as a result, syncs in average take <60 seconds to complete, but in rare-cases can take up to 180 seconds.
๐ก To check the status of a sync use the data_status
and data_last_successful_sync
in the account.liability
response.
Subscribe to the account:update
webhook to be notified of all data changes / updates.
- cURL
- Node.js
- Python
/webhooks
curl https://production.methodfi.com/webhooks \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "account.update",
"url": "https://api.example.app/webhook",
"auth_token": "md7UqcTSmvXCBzPORDwOkE"
}'
/webhooks
const webhook = await method.webhooks.create({
type: 'account.update',
url: 'https://api.example.app/webhook',
auth_token: 'md7UqcTSmvXCBzPORDwOkE',
});
/webhooks
webhook = method.webhooks.create({
'type': 'account.update',
'url': 'https://api.example.app/webhook',
'auth_token': 'md7UqcTSmvXCBzPORDwOkE'
})
5. Retrieve the liability dataโ
Once the sync is complete you will receive an account:update
webhook and the data_status
field in the liability
will
show the status of active
.
All the data is immediately available in the liability object. After the initial sync is complete, the liability will be
enrolled in nightly data updates. The liability account will update all data on a nightly basis and you'll be notified via
the account:update
webhook.
Requestโ
- cURL
- Node.js
- Python
/accounts/:account_id
curl https://production.methodfi.com/accounts/acc_Zc4F2aTLt8CBt \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc"
/accounts/:account_id
const account = await method.accounts.get('acc_Zc4F2aTLt8CBt');
/accounts/:account_id
account = method.accounts.get('acc_Zc4F2aTLt8CBt')
{
"id": "acc_Zc4F2aTLt8CBt",
"holder_id": "ent_au22b1fbFJbp8",
"type": "liability",
"liability": {
"mch_id": "mch_183",
"mask": "1580",
"type": "credit_card",
"payment_status": "active",
"data_status": "active",
"data_status_error": null,
"data_last_successful_sync": "2023-01-22T01:23:36.047Z",
"data_source": "financial_institution",
"data_updated_at": "2023-01-22T01:23:36.047Z",
"ownership": "authorized",
"credit_card": {
"name": "Chase Sapphire Reserve",
"balance": 750014,
"opened_at": "2016-11-25",
"last_payment_date": "2022-12-28",
"last_payment_amount": 451757,
"next_payment_due_date": "2023-01-27",
"next_payment_minimum_amount": 6500,
"last_statement_balance": 650043,
"remaining_statement_balance": 0,
"available_credit": 1530000,
"interest_rate_percentage": 23.5,
"interest_rate_type": "variable",
"interest_rate_source": "financial_institution",
"past_due_status": "unknown",
"past_due_balance": null,
"past_due_date": null,
"auto_pay_status": "unknown",
"auto_pay_amount": null,
"auto_pay_date": null,
"sub_type": "flexible_spending",
"term_length": null,
"closed_at": null,
"credit_limit": 2380000,
"next_statement_date": "2022-12-02",
"delinquent_status": null,
"delinquent_amount": null,
"delinquent_period": null,
"delinquent_action": null,
"delinquent_start_date": null,
"delinquent_major_start_date": null,
"delinquent_status_updated_at": null,
"delinquent_history": []
}
},
"status": "active",
"capabilities": [
"payments:receive",
"data:sync"
],
"available_capabilities": [],
"error": null,
"created_at": "2022-02-16T02:56:19.548Z",
"updated_at": "2022-06-14T15:13:09.520Z"
}