{
  "version": "3.0.0",
  "form": {
    "name": "Payment details with Stripe",
    "description": null,
    "messages": {
      "custom": {},
      "errors": {}
    },
    "languages": {
      "default": null,
      "primary": "en"
    },
    "translations": {},
    "start": {
      "nextNode": "step_4iwC",
      "coordinates": {
        "x": -338,
        "y": -10
      },
      "hiddenFields": []
    },
    "nodes": [
      {
        "id": "step_4iwC",
        "type": "STEP",
        "alias": "Payment details",
        "config": {
          "nextNode": "$ending",
          "components": [
            {
              "id": "rich_text_hPsU",
              "type": "RICH_TEXT",
              "config": {
                "content": "<h2>Verify your card details</h2><p>We verify cards to prevent spam, you won't be charged.</p>"
              },
              "category": "BLOCK"
            },
            {
              "id": "payment",
              "hint": null,
              "type": "PAYMENT",
              "label": null,
              "config": {
                "charge": {
                  "type": "SUBSCRIPTION",
                  "subscription": {
                    "coupon": null,
                    "priceIds": [
                      "REPLACE_WITH_PRICE_ID"
                    ],
                    "taxRates": [],
                    "trialDays": null,
                    "invoiceItems": []
                  }
                },
                "fields": {
                  "cardNumber": {
                    "label": "Credit or debit card",
                    "placeholder": "1234 1234 1234 1234"
                  },
                  "trustmarks": true,
                  "securityCode": {
                    "label": "Security code",
                    "placeholder": "CVC"
                  },
                  "expirationDate": {
                    "label": "Expiration date",
                    "placeholder": "MM / YY"
                  }
                },
                "customer": {
                  "email": "{{context.user.email}}",
                  "metadata": null,
                  "shipping": null,
                  "description": null
                },
                "provider": "STRIPE",
                "credentials": {
                  "publicKey": "REPLACE_WITH_PUBLIC_KEY",
                  "privateKey": "REPLACE_WITH_SECRET_KEY"
                }
              },
              "category": "FIELD",
              "required": true,
              "transient": false
            },
            {
              "id": "next_button_YKS2",
              "type": "NEXT_BUTTON",
              "config": {
                "text": "Continue"
              },
              "category": "BLOCK"
            }
          ]
        },
        "coordinates": {
          "x": -59,
          "y": -172
        }
      }
    ],
    "ending": {
      "content": null,
      "redirection": null,
      "callback": null,
      "afterSubmit": {
        "email": null,
        "flowId": "#FLOW-1#"
      },
      "coordinates": {
        "x": 536,
        "y": -40
      },
      "resumeFlow": true
    },
    "social": [],
    "style": {
      "css": null,
      "theme": "ROUND",
      "version": "MODERN"
    },
    "tags": []
  },
  "flows": {
    "#FLOW-1#": {
      "name": "Update app_metadata",
      "description": null,
      "actions": [
        {
          "id": "update_user_1C8T",
          "type": "AUTH0",
          "alias": null,
          "notes": null,
          "action": "UPDATE_USER",
          "params": {
            "userId": "{{context.user.user_id}}",
            "changes": {
              "app_metadata": {
                "subscription": "{{fields.payment}}"
              }
            },
            "connectionId": "#CONN-1#"
          },
          "allowFailure": false
        }
      ],
      "triggers": {
        "webhook": {
          "secret": null,
          "enabled": false
        }
      },
      "synchronous": true,
      "security": {
        "rateLimits": []
      }
    }
  },
  "connections": {
    "#CONN-1#": {
      "id": "ac_mR36vDo5CxoyUi1EDwkvji",
      "appId": "AUTH0",
      "name": "REPLACE_WITH_M2M_CONNECTION"
    }
  }
}
