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. NinjaTrader’s own add-a-payment-method flows collect the payment processor authorization again each time, even when the user signed it for an earlier method, and collect the form of risk disclosure once. The API does not require this: the server checks only that a signed copy of each required document exists. Collect the authorization again if your integration should match that behavior.
For Apple Pay and Google Pay, both documents must be signed before startStripeFunding. Previously signed copies satisfy the requirement, and the server does not enforce their signing order.
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 only when a record matches the required documentName and has a populated signedTimestamp. A matching name without signedTimestamp is still outstanding. Compare the signed records against the list from the previous step and complete any disclosures still required by the funding flow.
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 confirm that the userSignedDocumentId the sign call returned has a populated signedTimestamp. A record without that timestamp does not confirm acceptance.
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
- For an overview of document types and the account-opening agreement flow, see Document management.
- To link a bank account and submit ACH deposits or withdrawals, see ACH and Plaid funding.
- Complete the disclosures for the flow before calling
startStripeFunding; see Debit-card funding or Wallet Pay Funding. - If you prefer a NinjaTrader-hosted flow that handles the disclosures for you, see Embedding the Funding Page with an iframe.