ACH_DIRECT), push-to-card (PUSH_TO_CARD, debit cards only), and Mail Check (MAIL_CHECK). Mail Check destinations are available for vendors only; they cannot be saved for clients.
API token requirements
API token requirements
Use a Firm API token (
f_…) for the Firm whose stored disbursement method you are creating.You can obtain a Firm API token by:- Saving the
apiTokenreturned bycreateFirm - Exchanging a Connect code for a Firm API token
storedDisbursementMethodTokenCreate may be sent to the browser.Prerequisites
- The Firm is
ACTIVEand disbursements are enabled for that Firm - You have the Firm API token for the Firm on your server
- The Firm is configured to allow the disbursement method you intend to collect
- Register your application’s parent-page origin as a trusted domain. Required in sandbox and production.
createFirm(input: { mockOnboarding: true }) activates the Firm, enables disbursements, and returns a Firm API token you can use immediately. mockOnboarding is available in sandbox only.
High level flow
1
Mint a stored disbursement method token from your server
2
Embed the stored disbursement method form in an iframe
3
Submit the form from the parent and wait until the details are staged
4
Create the stored disbursement method from your server
1. Mint a token
CallstoredDisbursementMethodTokenCreate with the Firm API token and a required input containing exactly one of clientId or vendorId. Create the payee first, then bind the token before opening the iframe so the form can determine the required details and pricing.
clientId instead. Calls without an input, with neither ID, or with both IDs are rejected. Previously issued unbound tokens cannot load or stage payment details; create a new token bound to the intended payee.
Send the returned token to your frontend. Mint a fresh token when the form opens. SDM tokens expire after 30 minutes. If staging fails because the token expired, mint another and reload the iframe src.
2. Embed the form
Query parameters
token(required) — value fromstoredDisbursementMethodTokenCreateopts(optional) —encodeURIComponent(JSON.stringify(branding))wherebrandingcontains the payment page’s branding options, such asbackgroundColor,centerColor,footerText,headerImg, andheaderName(footerText/ image fields may benull)
confido:sdm_load_error.
3. Submit the form from the parent
The iframe has no Save button. Listen for its events, enable your application’s Save button when the form is valid, and postconfido:sdm_submit to the payment-page origin when the user clicks Save.
Check event.origin against the payment-page origin. Post confido:sdm_submit to that origin, not *.
Events from the iframe
Every message is{ type, ...payload }.
Command into the iframe
4. Create the stored disbursement method
After receivingconfido:sdm_staged, send the SDM token and your non-sensitive metadata to your backend. Call storedDisbursementMethodCreate there with the Firm API token.
token(required) — the same SDM token used in the iframepayeeEmail(optional) — valid email for the payee. The embedded form collects an email when the processor requires one and the vendor has no contact email. An email collected by the form takes precedence over this input; otherwise, the input or the vendor’s first contact email is used.clientIdorvendorId(required) — exactly one, matching the payee used to create the token. A token cannot be saved for a different payee. Mail Check requiresvendorId.nickname(optional)
payeeName and mailingAddress are collected in the iframe and staged with the token; they are not fields on StoredDisbursementMethodCreateInput. Query them from the returned SDM’s details field as shown above.
Staged payment details expire 120 seconds after each submission. Call storedDisbursementMethodCreate promptly after confido:sdm_staged, before either the details or the token expire. Each create attempt atomically retrieves and deletes its staged details before processing. A later submission is not deleted when an earlier attempt finishes.
Details expiry and failed create attempts do not invalidate the SDM token. It remains valid until a successful create or its original 30-minute expiry; submitting fresh details does not extend that expiry. Creating again without fresh staged details fails with Payment details have expired. Please re-enter them.
To retry after details expire or a processing attempt fails, have the user re-enter details as needed, post confido:sdm_submit to the existing iframe, and wait for a new confido:sdm_staged event before calling create again. Reuse the same token and iframe while the token is valid. Mint a new token and reload the iframe when the token expires or when collecting another method after a successful create.
A successful create invalidates the token and emits stored_disbursement_method.created. The token can no longer load the form, stage details, or create another SDM. If a create response is lost, check whether the SDM was created before retrying: the original request may still complete and invalidate the token even if you have already staged fresh details. Retrying does not return the original result.
Using a stored method
List methods for a client or vendor with the Firm API token:disbursementInitiateTxnToSdm with { disbursementId, sdmId } using the Firm API token.
Limits and errors
- Token TTL is 30 minutes from creation. Remint and reload the iframe if the token expires.
- Staged details TTL is 120 seconds per submission. If only the details expire, submit fresh details through the existing iframe with the same unexpired token.
- Firm must be active. Token create fails with
This firm is not active. - Method must be allowed on the Firm. Create fails with
{METHOD} is not allowed for this firm. - Parent has no Save control inside the iframe. If you never post
confido:sdm_submit, details are never staged.