Element tokens are used as the starting point and authentication key to instantiate Method’s embeddable UI components within your experience.
For security purposes, element tokens are for one-time use only, and expire after 30 minutes.
Body
The structure of the request body differs slightly depending on the type of Element you are trying to use. See the Elements Guide for more information about specific flows.
Either entity_id
or connect.entity
is required.
The name of the element type you want to generate the token for. One of connect
or balance_transfer
An existing entity id that the Element session will initiate for.
The name of the team that will be displayed in the Element.
A URL to an image that will be used as the logo in the Element.
Information needed if creating a Connect Element token.
The account products that you want to Connect this entity's accounts with. One of balance
, sensitive
, payoff
, transactions
, update
or payment
A list of accounts associated with the entity that you want to Connect (note entity_id
must also be provided).
Information about the entity that the Element session will initiate for. See the Individual Entity page for information about fields in the individual object.
Optional filters to restrict which liability types are shown or to restrict how many accounts the user can select.
A list of liability types that should be shown for the user. One of auto_loan
, mortgage
, credit_card
, loan
, student_loan
or personal_loan
Indicates whether the user should be able to only select one or multiple accounts. One of single
or multiple
Information needed if creating a Balance Transfer Element token.
The minimum amount that needs to be paid out per creditor.
The minimum loan amount that should be requested.
payout_residual_amount_max
The maximum residual amount that can be paid out, after payments to creditors.
loan_details_requested_amount
The amount of the loan that is requested.
loan_details_requested_rate
The interest rate of the loan that is requested.
loan_details_requested_term
The term of the loan that is requested.
loan_details_requested_monthly_payment
The monthly payment of the loan that is requested.
Returns
The element token that was created.
curl https://production.methodfi.com/elements/token \
-X POST \
-H "Method-Version: 2024-04-04" \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type" : "connect" ,
"connect" : {
"products" : [ "balance" ] ,
"entity" : {
"type" : "individual" ,
"individual" : {
"first_name" : "Kevin" ,
"last_name" : "Doyle"
}
}
}
} '
{
"element_token" : "pk_elem_qPmypE9wwphr3WL3yTj7JhxjrPzAmK8G"
}