Skip to main content

Generate a Stripe token from a scan

  1. Provide a Stripe key

    You will need to provide a stripe key in one of two ways.

    1. (preferred) Provide a private Stripe Key to Dyneti
    2. Pass a publishable Stripe Key in the Scan Configuration
    const config = {
    ...
    stripePublishableApiKey: "pk_asdf1234",
    ...
    }
  2. (Optional) If the card's expiration date is known, you should set the value in the scan.present options parameter with the format MM/YY

    const options = {
    cardExpirationDate: "03/28", // MM/YY format
    }
    const { data, completed } = await scan.present(
    userId,
    verify,
    options,
    );