Additional resources
- Yuno offers a TypeScript library that complements the SDK.
- See Choose the right integration for you if you’re unsure which flow to follow.
- See the Demo App for a complete implementation (clone from the repository).
Requirements
- A customer created in Yuno, a customer session, and an enrollment payment method object: reference each API when setting up your backend.
- Public API key (obtain from the Yuno Dashboard → Developers > Credentials)
Parameters
For the full list of parameters and callbacks, see the Web SDK Common Reference.full-checkout Enrollment (Web)
Use full-checkout for a seamless integration with pre-built UI. Implement enrollment as follows.Step 1: Include the library in your project
Including the library in your project is done in the same way as in payment flows.Step 2: Initialize the SDK
See Quickstart guide for initialization.Step 3: Create a customer session and an enrollment payment method object
Create a customer session and an enrollment payment method object on your server-side to keep private API keys secure; define which payment method the customer can enroll when creating the payment method object.Server-side example
Create a customer session and enrollment payment method on your backend. This keeps your private API keys secure.Client-side example
After receiving thecustomerSession from your server, initialize the Yuno SDK and mount the enrollment form on the client-side.
verify struct when defining the payment method object on the server.
Step 4: Mount the enrollment
Useawait yuno.mountEnrollment() with the parameters below.
The next code block presents an example of the Enrollment parameter configuration and mounting.