You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transient payload is an Ory Kratos concept, that allows users of the APIs to pass data through to webhooks. All self-service Kratos flows support transient payloads, and they are passed through to the webhooks as JSON objects. This allows you to use the data in your webhooks, for example to customize the user experience or to trigger specific actions based on the data.
7
+
Transient payload is an Ory Kratos concept, that allows users of the APIs to pass data through to webhooks. All self-service
8
+
Kratos flows support transient payloads, and they are passed through to the webhooks as JSON objects. This allows you to use the
9
+
data in your webhooks, for example to customize the user experience or to trigger specific actions based on the data.
8
10
9
-
Ory Elements allows defining transient payloads on the self-service flow components. To do this, you can use the `transientPayload` prop on the self-service flow components. The value of this prop should be an object that contains the data you want to pass through to the webhooks or a function that returns such an object. The data will be passed through to the webhooks as JSON objects.
11
+
Ory Elements allows defining transient payloads on the self-service flow components. To do this, you can use the
12
+
`transientPayload` prop on the self-service flow components. The value of this prop should be an object that contains the data you
13
+
want to pass through to the webhooks or a function that returns such an object. The data will be passed through to the webhooks as
14
+
JSON objects.
10
15
16
+
-[Read more about webhooks in Ory](../../guides/integrate-with-ory-cloud-through-webhooks.mdx)
11
17
12
18
## Static Transient Payload
13
19
14
-
In this example, we define a static transient payload that contains the user's preferred language. This data will be passed through to the webhooks as a JSON object.
20
+
In this example, we define a static transient payload that contains the user's preferred language. This data will be passed
In this example, we define a dynamic transient payload that contains the user's preferred language. The function is called, when the user submits the form, and the API request is made. This allows you to pass dynamic data to the webhooks, based on the user's input or other factors.
56
+
In this example, we define a dynamic transient payload that contains the user's preferred language. The function is called, when
57
+
the user submits the form, and the API request is made. This allows you to pass dynamic data to the webhooks, based on the user's
58
+
input or other factors.
51
59
52
60
```tsx
53
61
"use client"
@@ -57,17 +65,20 @@ import { RegistrationFlow } from "@ory/client-fetch"
The function also receives the form values as an argument, which allows you to use the user's input to determine the transient payload. In this example, we are retrieving a referral code from local storage and passing it through to the webhooks.
83
+
The function also receives the form values as an argument, which allows you to use the user's input to determine the transient
84
+
payload. In this example, we are retrieving a referral code from local storage and passing it through to the webhooks.
0 commit comments