approved once the user has both passed identity verification and accepted the terms. Acceptance is on by default for new programs; existing programs are migrating to it over time.
Prerequisites
As part of program setup, you’ll complete the terms intake form with your Implementation Manager, it defines the terms your users accept. Terms acceptance works in both sandbox and production. If you plan to embed the terms page in your own onboarding UI instead of using Rain’s hosted flow, also tell your Implementation Manager which domains will embed the page. Embedding is generally available on Enterprise plans, your Implementation Manager can confirm availability for your program. This guide covers new implementations. If your program predates terms acceptance, your Implementation Manager will coordinate the migration with you.How acceptance affects application status
Terms acceptance adds one application status:tosNotAccepted. It means the user passed identity verification but hasn’t accepted the terms yet, acceptance is the only thing between them and approval.
- You’ll see
tosNotAcceptedin user application responses and inuser.updatedwebhooks, alongside anapplicationCompletionLinkthe user can follow to finish. - Once the user accepts, Rain records the acceptance and refreshes the application status. Processing can take up to a minute. You’ll receive an
approvedwebhook when it completes, and the usual approval side effects run, so you can proceed as you do today. - On programs migrating to terms acceptance, users who were already
approvedcurrently keep their status. This may change in the future; Rain will notify you before shipping any breaking change.
Standard Compliance
Nothing to integrate: under Standard Compliance, Rain’s hosted flow presents the terms step after identity verification, and the application transitions toapproved shortly after the user accepts.
Embed the terms page in your own flow
If you host your own onboarding UI under Hybrid Compliance, embed the terms page instead of redirecting to the hosted flow. The embedded page renders the terms and checkboxes; your page owns everything around them, including the submit button. The two talk overpostMessage.
Embedding must be enabled for your program before the page will render, see Prerequisites.
1
Derive the terms URL
While a user’s application status is Forward every param the link gives you, unchanged. Two of them carry the request:
tosNotAccepted, user responses and webhooks include an applicationCompletionLink whose url ends in /kyc, Rain’s hosted flow. The embeddable terms page lives at /kyc/terms on the same host. Replace the path and forward all params as query parameters:The link only exists while the application is in a non-approved state, so derive it when you render your terms step, not ahead of time.
2
Embed and style the iframe
Add styling parameters to the derived URL so the embedded terms match your UI, then render it in an iframe:
URLSearchParams URL-encodes values like #111111 for you; encode them yourself (%23111111) only if you build the URL by hand.3
Track progress with lifecycle messages
The terms page reports where the user is in the acceptance process by posting a
rain.kyc.terms.lifecycle message to your page on every state transition:Only trust messages that come from the terms page: check the origin, and that the message was sent by your embedded iframe.
4
Submit acceptance
When the user clicks your submit button, post a Recording an acceptance can take up to a minute, so keep your spinner tied to the
rain.kyc.terms.submit message into the iframe. The page dispatches the acceptance and reports progress through the lifecycle messages above.submitting state rather than a fixed delay. If you add your own stall timeout, don’t resubmit automatically, refetch the user’s application status to reconcile before letting the user try again.5
Handle completion
When you receive
completed, the acceptance is recorded and Rain has refreshed the user’s application status. Confirm the transition the same way you track every other status change, via the user.updated webhook or by refetching the user, and continue your flow once the application is approved, for example by issuing a card.Handle errors
When the lifecycle state iserror, data.error tells you what happened:
Errors are recoverable: after an
error, the next lifecycle message tells you where the user is.
Test in sandbox
The embedded flow works in both sandbox and production. To simulate the status itself, use the same sandbox fixture as other application statuses: give the user a last name containingtosnotaccepted (case-insensitive), such as TestTosNotAccepted, see testing application statuses for how fixtures work.
What’s next
Application states
What each application state means and what to do about it.
Signing up a customer
Create and manage applications through the API.
user.updated webhook
Full payload reference for the user.updated event.
Webhooks overview
Track application progress in real time.