Flash Documentation
  • Welcome to the Flash Documentation!
  • Getting Started
    • Connect Your Wallet
      • Coinos Wallet
  • Products
    • Checkouts
      • Payment Links
      • Donation Widget
      • Page Paywalls
      • Payment Buttons
      • Video Paywalls
    • Subscriptions
      • Getting Started
        • Create a Subscription Plan
        • Pre-Fill User Details
      • Authentication
      • Endpoints
      • Webhooks
    • Stores
      • Managing Products
      • Hosted Store
      • Point of Sale
  • Integrations
    • WooCommerce
    • Shopify
    • Wix
  • API DOCUMENTATION
    • Welcome
    • Authentication
    • Subscriptions
      • Subscription-specific Authentication
      • Endpoints
      • Webhooks
  • NEED MORE HELP?
    • Contact Us
Powered by GitBook
On this page
  • URL Parameters
  • Parameters you can pass:
  • How to Pass Parameters
  • How Flash Uses These Parameters:
  • Example Workflow
Export as PDF
  1. Products
  2. Subscriptions
  3. Getting Started

Pre-Fill User Details

The Flash Subscription allows you to streamline user experience by pre-filling subscription forms with data like email, Nostr ID (npub), and a unique identifier, external_uuid, when redirecting users to the subscription page. This saves users from re-entering details and enables you to integrate smoothly with your own user management systems.

URL Parameters

When redirecting users to the Flash subscription page, you can pass relevant user information in the URL through a Base64-encoded JSON object. The system will automatically pre-fill the subscription form based on these values.

Parameters you can pass:

  • email: The user's email address.

  • npub: The user's Nostr public key (Npub).

  • external_uuid: A unique identifier from your system to map users in your backend with Flash APIs. This value is not visible to users and is only used internally for identification.

  • is_verified: A boolean value indicating whether the user's email or Npub has already been verified.

    • If set to false, Flash will handle the verification process by either sending an email (for email addresses) or a Nostr DM (for Npubs) with a verification token.

    • If set to true, no additional verification steps are required, and the subscription process will continue seamlessly.

How to Pass Parameters

You can pass the following parameters by embedding them as a Base64-encoded JSON object in the params query string:

{
  "email": "user@example.com",
  "npub": "npub123...",
  "is_verified": false,
  "external_uuid": "your-unique-user-id"
}

The resulting URL might look like this:

https://app.paywithflash.com/subscription-page?flashId=459&params=<Base64-encoded-JSON>

When Flash receives this URL, the system decodes the parameters and pre-populates the subscription form with the provided data.

How Flash Uses These Parameters:

  • Pre-Filled Fields: The user's email or Npub will be automatically filled into the form.

  • Verification:

    • If the user is not verified (i.e., is_verified = false), Flash will initiate the verification process by sending a verification token:

      • Email: The user will receive a token via email.

      • Npub: The user will receive a token via Nostr DM.

    • The user will then input the received token into the interface to verify their identity.

Note: The external_uuid parameter is designed for developers to map their own user IDs with the Flash system, making it easy to track and manage users across platforms. This value is not shown to users.


Example Workflow

  1. Set Up the Redirect: Pass the user's email, Npub, and external UUID in the URL as described above.

  2. Pre-Filled Form: The subscription page will pre-fill the user's details.

  3. Verification (if required): If the user isn't verified, Flash sends a token via email or Nostr DM, which the user will input to complete verification.

  4. Subscription Completed: Once verified, the user can complete their subscription without re-entering details.

PreviousCreate a Subscription PlanNextAuthentication

Last updated 8 months ago

Page cover image