Skip to content

Technical Consideration #58

@henrylee746

Description

@henrylee746

Metadata: When creating the Checkout session, pass a userId in the metadata field. This ensures that when the webhook fires, we know exactly which user to upgrade in your database.

However, this may mean that there needs to be some reconstruct in the signup process - meaning that the user should not be registered & no data of theirs should be saved in Prisma prior to the payment being successful.

Having said that, if we need the user's userId (created as an object maybe using their name + email), we need to first have them submit the initial form for personal information then proceed with the payment. So signing up the user in Prisma and giving them a session token should not be done after submission of the signup form but rather after the payment has been made afterwards.

Same goes before registering a user in the Strapi cloud

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions