Funding disclosures
Before a user can fund with a debit card, a digital wallet, or ACH, they must have signed the funding disclosures that apply to that flow. Your integration resolves the right documents, shows each one, collects the signature, and confirms it was stored.
Prerequisites
Your integration needs:
- a bearer access token for the user;
- the user’s numeric user ID;
- the
clearingHouseIdof the account being funded, from the account record; - a PDF viewer in your client. The preview is returned as base64, not as a URL.
Decide which documents the flow needs
Two documents exist. Which ones apply depends on the funding flow and on whether the user is adding a payment method or funding with one already saved.
A previously signed document satisfies the requirement, with one exception: adding a payment method re-collects the payment processor authorization every time, even when the user signed it for an earlier method. The form of risk disclosure is collected once.
Resolve the template ID by name
Document names are the stable identifier. The numeric agreementDocumentTemplateId differs between environments and between clearing houses, so resolve it at runtime and never hard-code it.
Call agreementDocumentTemplateList and match on the exact name:
A name can appear several times, once per clearing house. Select in this order:
- the row whose
clearingHouseIdmatches the account’s; - otherwise the row with no
clearingHouseId.
Never take the first match, and never use a row belonging to a different clearing house.
Check what the user has already signed
Read the user’s signed records with userSignedDocumentLDependents:
A document counts as signed when a record carries its documentName. Compare against the list from the previous step and drop the documents the flow does not still need.
Preview the document
Retrieve the PDF with downloadUserDocumentPreview, using the resolved template ID:
The response returns the document in content as base64. Decode it and display it to the user.
Collect the signature
Call signUserDocument once per document:
A successful response carries userSignedDocumentId and successHashCode.
Confirm the signature was stored
Re-read userSignedDocument/ldeps and look for the userSignedDocumentId the sign call returned.
signUserDocument has returned successfully, the signature is stored. If the re-read does not show it yet, retry the read — do not call signUserDocument again. allowMultiple: true means a second call records a duplicate signature.Repeat the preview, sign, and confirm steps for each remaining document before starting the deposit.
Handle responses and rate limits
These endpoints return business failures in an HTTP 200 response. Always inspect errorText rather than relying on the status code.
Check every HTTP 200 body for p-ticket. Follow the penalty-ticket procedure rather than treating the response as a successful signature.
Next steps
- Complete the disclosures for the flow before calling
startStripeFunding; see Debit-card and digital-wallet funding. - If you prefer a NinjaTrader-hosted flow that handles the disclosures for you, see Embedding the Funding Page with an iframe.