ACH_DIRECT) and push-to-card (PUSH_TO_CARD, debit cards only).
Note for partners using the form
Note for partners using the form
If you are integrating as a partner, use a Firm API token (
f_…) for the Firm whose stored disbursement method you are creating. A Partner API token cannot mint an SDM token or create an SDM.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:
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))where branding is{ backgroundColor, centerColor, footerText, headerImg, headerName, partnerImg }(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(required) — valid email for the payeeclientIdorvendorId(required) — exactly onenickname(optional)
stored_disbursement_method.created.
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. Remint and reload the iframe if staging reports an expiry.
- 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.