# Types of events This is a list of all public [thin events](https://docs.stripe.com/event-destinations.md#thin-events) we currently send for /v1 and /v2 resources, which are continually evolving and expanding. The payload of thin events is unversioned. During processing, you must fetch the versioned event from the API or fetch the resource’s current state. ## API event types ### `v1.billing.meter.error_report_triggered` Occurs when a Meter has invalid async usage events. ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "billing.meter") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v1.billing.meter.error_report_triggered") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.developer_message_summary` (string) Extra field included in the event’s `data` when fetched from /v2/events. - `data.reason` (object) This contains information about why meter error happens. - `data.reason.error_count` (integer) The total error count within this window. - `data.reason.error_types` (array of objects) The error details. - `data.reason.error_types.code` (enum) Open Enum. Possible enum values: - `archived_meter` Enum value: archived_meter. - `meter_event_customer_not_found` Enum value: meter_event_customer_not_found. - `meter_event_dimension_count_too_high` Enum value: meter_event_dimension_count_too_high. - `meter_event_invalid_value` Enum value: meter_event_invalid_value. - `meter_event_no_customer_defined` Enum value: meter_event_no_customer_defined. - `missing_dimension_payload_keys` Enum value: missing_dimension_payload_keys. - `no_meter` Enum value: no_meter. - `timestamp_in_future` Enum value: timestamp_in_future. - `timestamp_too_far_in_past` Enum value: timestamp_too_far_in_past. - `data.reason.error_types.error_count` (integer) The number of errors of this type. - `data.reason.error_types.sample_errors` (array of objects) A list of sample errors of this type. - `data.reason.error_types.sample_errors.error_message` (string) The error message. - `data.reason.error_types.sample_errors.request` (object) The request causes the error. - `data.reason.error_types.sample_errors.request.identifier` (string) The request idempotency key. - `data.validation_end` (timestamp) The end of the window that is encapsulated by this summary. - `data.validation_start` (timestamp) The start of the window that is encapsulated by this summary. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v1.billing.meter.no_meter_found` Occurs when a Meter's id is missing or invalid in async usage events. ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `type` (string, value is "v1.billing.meter.no_meter_found") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.developer_message_summary` (string) Extra field included in the event’s `data` when fetched from /v2/events. - `data.reason` (object) This contains information about why meter error happens. - `data.reason.error_count` (integer) The total error count within this window. - `data.reason.error_types` (array of objects) The error details. - `data.reason.error_types.code` (enum) Open Enum. Possible enum values: - `archived_meter` Enum value: archived_meter. - `meter_event_customer_not_found` Enum value: meter_event_customer_not_found. - `meter_event_dimension_count_too_high` Enum value: meter_event_dimension_count_too_high. - `meter_event_invalid_value` Enum value: meter_event_invalid_value. - `meter_event_no_customer_defined` Enum value: meter_event_no_customer_defined. - `missing_dimension_payload_keys` Enum value: missing_dimension_payload_keys. - `no_meter` Enum value: no_meter. - `timestamp_in_future` Enum value: timestamp_in_future. - `timestamp_too_far_in_past` Enum value: timestamp_too_far_in_past. - `data.reason.error_types.error_count` (integer) The number of errors of this type. - `data.reason.error_types.sample_errors` (array of objects) A list of sample errors of this type. - `data.reason.error_types.sample_errors.error_message` (string) The error message. - `data.reason.error_types.sample_errors.request` (object) The request causes the error. - `data.reason.error_types.sample_errors.request.identifier` (string) The request idempotency key. - `data.validation_end` (timestamp) The end of the window that is encapsulated by this summary. - `data.validation_start` (timestamp) The start of the window that is encapsulated by this summary. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.account.closed` This event occurs when an account is closed. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account.closed") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpbNAKwSIkamdPQY16THhWW0BSQoYblrirrmiR4a4Vc", "object": "v2.core.event", "type": "v2.core.account.closed", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpbNAKwSIkamdPQY16THhWW0BSQoYblrirrmiR4a4Vc", "object": "v2.core.event", "type": "v2.core.account.closed", "data": null, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" }, "changes": null } ``` ### `v2.core.account.created` Occurs when an Account is created. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account.created") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object, nullable) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpbHlFw1vIcWVJ0y16THhWW0BSQoYblrirrmiR4aAtE", "object": "v2.core.event", "type": "v2.core.account.created", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpbHlFw1vIcWVJ0y16THhWW0BSQoYblrirrmiR4aAtE", "object": "v2.core.event", "type": "v2.core.account.created", "data": null, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" }, "changes": null } ``` ### `v2.core.account.updated` Occurs when an Account is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpb3QI8UuMmue9DJ16THhWW0BSQoYblrirrmiR4aOdc", "object": "v2.core.event", "type": "v2.core.account.updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpb3QI8UuMmue9DJ16THhWW0BSQoYblrirrmiR4aOdc", "object": "v2.core.event", "type": "v2.core.account.updated", "data": null, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj" }, "changes": null } ``` ### `v2.core.account[configuration.customer].capability_status_updated` Occurs when the status of an Account's customer configuration capability is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.customer].capability_status_updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.updated_capability` (enum) The capability which had its status updated. Possible enum values: - `automatic_indirect_tax` Refers to the `customer.capabilities.card_payments` capability. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65SSMJhMl1dA8fh6lLW16RXPD96YSQQWRFoysHSB2ueQ9A", "object": "v2.core.event", "type": "v2.core.account[configuration.customer].capability_status_updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.customer" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65SSMJhMl1dA8fh6lLW16RXPD96YSQQWRFoysHSB2ueQ9A", "object": "v2.core.event", "type": "v2.core.account[configuration.customer].capability_status_updated", "data": { "updated_capability": "automatic_indirect_tax" }, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.customer" }, "changes": null } ``` ### `v2.core.account[configuration.customer].updated` Occurs when an Account's customer configuration is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.customer].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SSMJhhIMgYc9ZsFLW16RXPD96YSQQWRFoysHSB2ueOUy", "object": "v2.core.event", "type": "v2.core.account[configuration.customer].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.customer" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SSMJhhIMgYc9ZsFLW16RXPD96YSQQWRFoysHSB2ueOUy", "object": "v2.core.event", "type": "v2.core.account[configuration.customer].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.customer" }, "changes": null } ``` ### `v2.core.account[configuration.merchant].capability_status_updated` Occurs when the status of an Account's merchant configuration capability is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.merchant].capability_status_updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.updated_capability` (enum) The capability which had its status updated. Possible enum values: - `ach_debit_payments` Refers to the `merchant.capabilities.ach_debit_payments` capability. - `acss_debit_payments` Refers to the `merchant.capabilities.acss_debit_payments` capability. - `affirm_payments` Refers to the `merchant.capabilities.affirm_payments` capability. - `afterpay_clearpay_payments` Refers to the `merchant.capabilities.afterpay_clearpay_payments` capability. - `alma_payments` Refers to the `merchant.capabilities.alma_payments` capability. - `amazon_pay_payments` Refers to the `merchant.capabilities.amazon_pay_payments` capability. - `au_becs_debit_payments` Refers to the `merchant.capabilities.au_becs_debit_payments` capability. - `bacs_debit_payments` Refers to the `merchant.capabilities.bacs_debit_payments` capability. - `bancontact_payments` Refers to the `merchant.capabilities.bancontact_payments` capability. - `blik_payments` Refers to the `merchant.capabilities.blik_payments` capability. - `boleto_payments` Refers to the `merchant.capabilities.boleto_payments` capability. - `card_payments` Refers to the `merchant.capabilities.card_payments` capability. - `cartes_bancaires_payments` Refers to the `merchant.capabilities.cartes_bancaires_payments` capability. - `cashapp_payments` Refers to the `merchant.capabilities.cashapp_payments` capability. - `eps_payments` Refers to the `merchant.capabilities.eps_payments` capability. - `fpx_payments` Refers to the `merchant.capabilities.fpx_payments` capability. - `gb_bank_transfer_payments` Refers to the `merchant.capabilities.gb_bank_transfer_payments` capability. - `grabpay_payments` Refers to the `merchant.capabilities.grabpay_payments` capability. - `ideal_payments` Refers to the `merchant.capabilities.ideal_payments` capability. - `jcb_payments` Refers to the `merchant.capabilities.jcb_payments` capability. - `jp_bank_transfer_payments` Refers to the `merchant.capabilities.jp_bank_transfer_payments` capability. - `kakao_pay_payments` Refers to the `merchant.capabilities.kakao_pay_payments` capability. - `klarna_payments` Refers to the `merchant.capabilities.klarna_payments` capability. - `konbini_payments` Refers to the `merchant.capabilities.konbini_payments` capability. - `kr_card_payments` Refers to the `merchant.capabilities.kr_card_payments` capability. - `link_payments` Refers to the `merchant.capabilities.link_payments` capability. - `mobilepay_payments` Refers to the `merchant.capabilities.mobilepay_payments` capability. - `multibanco_payments` Refers to the `merchant.capabilities.multibanco_payments` capability. - `mx_bank_transfer_payments` Refers to the `merchant.capabilities.mx_bank_transfer_payments` capability. - `naver_pay_payments` Refers to the `merchant.capabilities.naver_pay_payments` capability. - `oxxo_payments` Refers to the `merchant.capabilities.oxxo_payments` capability. - `p24_payments` Refers to the `merchant.capabilities.p24_payments` capability. - `pay_by_bank_payments` Refers to the `merchant.capabilities.pay_by_bank_payments` capability. - `payco_payments` Refers to the `merchant.capabilities.payco_payments` capability. - `paynow_payments` Refers to the `merchant.capabilities.paynow_payments` capability. - `promptpay_payments` Refers to the `merchant.capabilities.promptpay_payments` capability. - `revolut_pay_payments` Refers to the `merchant.capabilities.revolut_pay_payments` capability. - `samsung_pay_payments` Refers to the `merchant.capabilities.samsung_pay_payments` capability. - `sepa_bank_transfer_payments` Refers to the `merchant.capabilities.sepa_bank_transfer_payments` capability. - `sepa_debit_payments` Refers to the `merchant.capabilities.sepa_debit_payments` capability. - `stripe_balance.payouts` Refers to the `merchant.capabilities.stripe_balance.payouts` capability. - `swish_payments` Refers to the `merchant.capabilities.swish_payments` capability. - `twint_payments` Refers to the `merchant.capabilities.twint_payments` capability. - `us_bank_transfer_payments` Refers to the `merchant.capabilities.us_bank_transfer_payments` capability. - `zip_payments` Refers to the `merchant.capabilities.zip_payments` capability. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:34:42.026Z", "id": "evt_test_65SSMLK1ZTX7OYhyjSr16RXPD96YSQQWRFoysHSB2ueHya", "object": "v2.core.event", "type": "v2.core.account[configuration.merchant].capability_status_updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.merchant" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:34:42.026Z", "id": "evt_test_65SSMLK1ZTX7OYhyjSr16RXPD96YSQQWRFoysHSB2ueHya", "object": "v2.core.event", "type": "v2.core.account[configuration.merchant].capability_status_updated", "data": { "updated_capability": "card_payments" }, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.merchant" }, "changes": null } ``` ### `v2.core.account[configuration.merchant].updated` Occurs when an Account's merchant configuration is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.merchant].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SSMLJIK4u1GJY5ySr16RXPD96YSQQWRFoysHSB2ueWLg", "object": "v2.core.event", "type": "v2.core.account[configuration.merchant].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.merchant" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SSMLJIK4u1GJY5ySr16RXPD96YSQQWRFoysHSB2ueWLg", "object": "v2.core.event", "type": "v2.core.account[configuration.merchant].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.merchant" }, "changes": null } ``` ### `v2.core.account[configuration.recipient].capability_status_updated` Occurs when the status of an Account's recipient configuration capability is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.recipient].capability_status_updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.updated_capability` (enum) The capability which had its status updated. Possible enum values: - `bank_accounts.local` Refers to the `recipient.capabilities.bank_accounts.local` capability. - `bank_accounts.wire` Refers to the `recipient.capabilities.bank_accounts.wire` capability. - `cards` Refers to the `recipient.capabilities.cards` capability. - `stripe.transfers` DEPRECATED: use RECIPIENT_CONFIG__STRIPE_TRANSFERS_CAPABILITY instead – Refers to the `recipient.capabilities.stripe.transfers` capability. - `stripe_balance.payouts` Refers to the `recipient.capabilities.stripe_balance.payouts` capability. - `stripe_balance.stripe_transfers` Refers to the `recipient.capabilities.stripe_balance.stripe_transfers` capability. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-01T23:03:17.678Z", "id": "evt_test_65SIbnJV74bY3Gprd8316RXPD96YSQQWRFoysHSB2ueM52", "object": "v2.core.event", "type": "v2.core.account[configuration.recipient].capability_status_updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.recipient" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-01T23:03:17.678Z", "id": "evt_test_65SIbnJV74bY3Gprd8316RXPD96YSQQWRFoysHSB2ueM52", "object": "v2.core.event", "type": "v2.core.account[configuration.recipient].capability_status_updated", "data": { "updated_capability": "stripe_balance.stripe_transfers" }, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.recipient" }, "changes": null } ``` ### `v2.core.account[configuration.recipient].updated` Occurs when a Recipient's configuration is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.recipient].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SIbnIZpPGoUur818316RXPD96YSQQWRFoysHSB2ue7Qm", "object": "v2.core.event", "type": "v2.core.account[configuration.recipient].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.recipient" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-01T23:03:16.425Z", "id": "evt_test_65SIbnIZpPGoUur818316RXPD96YSQQWRFoysHSB2ue7Qm", "object": "v2.core.event", "type": "v2.core.account[configuration.recipient].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=configuration.recipient" }, "changes": null } ``` ### `v2.core.account[configuration.storer].capability_status_updated` Occurs when the status of an Account's storer configuration capability is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.storer].capability_status_updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.updated_capability` (enum) The capability which had its status updated. Possible enum values: - `financial_addressses.bank_accounts` Refers to the `storer.capabilities.financial_addresses.bank_accounts` capability. - `financial_addressses.crypto_wallets` Refers to the `storer.capabilities.financial_addresses.crypto_wallets` capability. - `holds_currencies.eur` Refers to the `storer.capabilities.holds_currencies.eur` capability. - `holds_currencies.gbp` Refers to the `storer.capabilities.holds_currencies.gbp` capability. - `holds_currencies.usd` Refers to the `storer.capabilities.holds_currencies.usd` capability. - `holds_currencies.usdc` Refers to the `storer.capabilities.holds_currencies.usdc` capability. - `inbound_transfers.bank_accounts` Refers to the `storer.capabilities.inbound_transfers.bank_accounts` capability. - `outbound_payments.bank_accounts` Refers to the `storer.capabilities.outbound_payments.bank_accounts` capability. - `outbound_payments.cards` Refers to the `storer.capabilities.outbound_payments.cards` capability. - `outbound_payments.crypto_wallets` Refers to the `storer.capabilities.outbound_payments.crypto_wallets` capability. - `outbound_payments.financial_accounts` Refers to the `storer.capabilities.outbound_payments.financial_accounts` capability. - `outbound_transfers.bank_accounts` Refers to the `storer.capabilities.outbound_transfers.bank_accounts` capability. - `outbound_transfers.crypto_wallets` Refers to the `storer.capabilities.outbound_transfers.crypto_wallets` capability. - `outbound_transfers.financial_accounts` Refers to the `storer.capabilities.outbound_transfers.cards` capability. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-06-26T17:32:39.530Z", "id": "evt_test_65SnhcVsdHPetOMGZki16SmWzO0eE9IIrYxa2T2K4MqDdY", "object": "v2.core.event", "type": "v2.core.account[configuration.storer].capability_status_updated", "data": { "updated_capability": "outbound_transfers.financial_accounts" }, "livemode": false, "reason": null, "related_object": { "id": "acct_1Re4Nh05fklPI6a9", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1Re4Nh05fklPI6a9?include=configuration.storer" }, "changes": { "before": null, "after": null } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_test_65SnhcVsdHPetOMGZki16SmWzO0eE9IIrYxa2T2K4MqDdY", "object": "v2.core.event", "changes": { "before": null, "after": null }, "context": "acct_1Rd92306GG1czfwR", "created": "2025-06-26T17:32:39.530Z", "data": null, "reason": null, "related_object": { "id": "acct_1Re4Nh05fklPI6a9", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1Re4Nh05fklPI6a9?include=configuration.storer" }, "type": "v2.core.account[configuration.storer].capability_status_updated", "livemode": false } ``` ### `v2.core.account[configuration.storer].updated` Occurs when a Storer's configuration is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[configuration.storer].updated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-06-26T17:32:40.295Z", "id": "evt_test_65SnhcWJSyXD7prOFki16SmWzO0eE9IIrYxa2T2K4MqLGy", "object": "v2.core.event", "type": "v2.core.account[configuration.storer].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1Re4Nh05fklPI6a9", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1Re4Nh05fklPI6a9?include=configuration.storer" }, "changes": null } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_test_65SnhcWJSyXD7prOFki16SmWzO0eE9IIrYxa2T2K4MqLGy", "object": "v2.core.event", "changes": null, "context": "acct_1Rd92306GG1czfwR", "created": "2025-06-26T17:32:40.295Z", "data": null, "reason": null, "related_object": { "id": "acct_1Re4Nh05fklPI6a9", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1Re4Nh05fklPI6a9?include=configuration.storer" }, "type": "v2.core.account[configuration.storer].updated", "livemode": false } ``` ### `v2.core.account[defaults].updated` This event occurs when account defaults are created or updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[defaults].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpb3OfelO37hqKCH16THhWW0BSQoYblrirrmiR4aCgK", "object": "v2.core.event", "type": "v2.core.account[defaults].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=defaults" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:33:01.123Z", "id": "evt_test_65THpb3OfelO37hqKCH16THhWW0BSQoYblrirrmiR4aCgK", "object": "v2.core.event", "type": "v2.core.account[defaults].updated", "data": null, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=defaults" }, "changes": null } ``` ### `v2.core.account[future_requirements].updated` Occurs when an Account's future requirements are updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[future_requirements].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.account[identity].updated` Occurs when an Identity is updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[identity].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:48:08.710Z", "id": "evt_test_65SSMYK8uw9bZdmkiyd16RXPD96YSQQWRFoysHSB2ueSn2", "object": "v2.core.event", "type": "v2.core.account[identity].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=identity" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:48:08.710Z", "id": "evt_test_65SSMYK8uw9bZdmkiyd16RXPD96YSQQWRFoysHSB2ueSn2", "object": "v2.core.event", "type": "v2.core.account[identity].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=identity" }, "changes": null } ``` ### `v2.core.account[requirements].updated` Occurs when an Account's requirements are updated. Related object: [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account[requirements].updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-01T23:03:18.235Z", "id": "evt_test_65SIbnKv7aZvHPCht8316RXPD96YSQQWRFoysHSB2ue4iG", "object": "v2.core.event", "type": "v2.core.account[requirements].updated", "livemode": false, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=requirements" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-01T23:03:18.235Z", "id": "evt_test_65SIbnKv7aZvHPCht8316RXPD96YSQQWRFoysHSB2ue4iG", "object": "v2.core.event", "type": "v2.core.account[requirements].updated", "data": {}, "livemode": false, "reason": null, "related_object": { "id": "acct_1RIyMKPt46znscxj", "type": "v2.core.account", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj?include=requirements" }, "changes": null } ``` ### `v2.core.account_link.returned` Occurs when the generated AccountLink is completed. ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `type` (string, value is "v2.core.account_link.returned") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.account_id` (string) The ID of the v2 account. - `data.configurations` (array of enums) Configurations on the Account that was onboarded via the account link. Possible enum values: - `customer` The Account can be used as a customer. - `merchant` The Account can be used as a merchant. - `recipient` The Account can be used as a recipient. - `storer` The Account can be used as a storer. - `data.use_case` (enum) The use case type of the account link that has been completed. Possible enum values: - `account_onboarding` Refers to the `account_onboarding` use case. - `account_update` Refers to the `account_update` use case. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-09-17T20:19:43.005Z", "id": "evt_test_61THpmhqAHs1f7bm316THhk901SQqvRq7FVjHMVoeTTM", "object": "v2.core.event", "type": "v2.core.account_link.returned", "data": { "account_id": "acct_1S8RoaJG4CBdUHwl", "configurations": [ "recipient" ], "use_case": "account_onboarding" }, "livemode": false, "related_object": {} } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-09-17T20:19:43.005Z", "id": "evt_test_61THpmhqAHs1f7bm316THhk901SQqvRq7FVjHMVoeTTM", "object": "v2.core.event", "type": "v2.core.account_link.returned", "data": { "account_id": "acct_1S8RoaJG4CBdUHwl", "configurations": [ "recipient" ], "use_case": "account_onboarding" }, "livemode": false, "reason": null, "related_object": {}, "changes": null } ``` ### `v2.core.account_person.created` Occurs when a Person is created. Related object: [Person](https://docs.stripe.com/api/v2/core/persons/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account_person") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account_person.created") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Person](https://docs.stripe.com/api/v2/core/persons/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object, nullable) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.account_id` (string) The ID of the v2 account. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.created", "livemode": false, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.created", "data": { "account_id": "acct_1RIyMKPt46znscxj" }, "livemode": false, "reason": null, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" }, "changes": null } ``` ### `v2.core.account_person.deleted` Occurs when a Person is deleted. Related object: [Person](https://docs.stripe.com/api/v2/core/persons/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account_person") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account_person.deleted") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Person](https://docs.stripe.com/api/v2/core/persons/object.md) object for the structure of `before` and `after`. - `changes.after` (object, nullable) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.account_id` (string) The ID of the v2 account. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.deleted", "livemode": false, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.deleted", "data": { "account_id": "acct_1RIyMKPt46znscxj" }, "livemode": false, "reason": null, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" }, "changes": null } ``` ### `v2.core.account_person.updated` Occurs when a Person is updated. Related object: [Person](https://docs.stripe.com/api/v2/core/persons/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.account_person") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.account_person.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Person](https://docs.stripe.com/api/v2/core/persons/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `data.account_id` (string) The ID of the v2 account. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.updated", "livemode": false, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-04-28T20:48:39.804Z", "id": "evt_test_65SSMYpFXcSU1Rkwzk416RXPD96YSQQWRFoysHSB2ueEEy", "object": "v2.core.event", "type": "v2.core.account_person.updated", "data": { "account_id": "acct_1RIyMKPt46znscxj" }, "livemode": false, "reason": null, "related_object": { "id": "person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs", "type": "v2.core.account_person", "url": "/v2/core/accounts/acct_1RIyMKPt46znscxj/persons/person_test_61SSMYofvI9uiWN8k16SSMYJ6vSQjlx0WXeVr2P44Acs" }, "changes": null } ``` ### `v2.core.batch_job.batch_failed` Occurs when a batch job fails. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.batch_failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.canceled` Occurs when a batch job is canceled. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.canceled") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.completed` Occurs on completion of a batch job. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.completed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.created` Occurs on creation of a batch job. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.ready_for_upload` Occurs on submission of a batch job. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.ready_for_upload") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.timeout` Occurs when a batch job times out. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.timeout") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.updated` Occurs when a batch job is updated. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.updated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.upload_timeout` Occurs when merchant fails to upload a file in time. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.upload_timeout") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.validating` Occurs when a batch job proceeds to the validation stage. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.validating") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.batch_job.validation_failed` Occurs when a batch job fails on validation. Related object: [Batch Job](https://docs.stripe.com/api/v2/core/batch-jobs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.batch_job") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.batch_job.validation_failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.core.event_destination.ping` A ping event used to test the connection to an EventDestination. Related object: [Event Destination](https://docs.stripe.com/api/v2/core/event-destinations/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.core.event_destination") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.core.event_destination.ping") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "ed_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.core.event_destination", "url": "/v2/core/event_destinations/ed_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.core.event_destination.ping", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "ed_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.core.event_destination", "url": "/v2/core/event_destinations/ed_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.core.event_destination.ping", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.core.health.event_generation_failure.resolved` Occurs when an event generation failure alert is resolved. ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `type` (string, value is "v2.core.health.event_generation_failure.resolved") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.alert_id` (string) The alert ID. - `data.grouping_key` (string) The grouping key for the alert. - `data.impact` (object) The user impact. - `data.impact.context` (string, nullable) The context the event should have been generated for. Only present when the account is a connected account. - `data.impact.event_type` (string) The type of event that Stripe failed to generate. - `data.impact.related_object` (object) The related object details. - `data.impact.related_object.id` (string) The ID of the related object (e.g., “pi_…”). - `data.impact.related_object.type` (string) The type of the related object (e.g., “payment_intent”). - `data.impact.related_object.url` (string) The API URL for the related object (e.g., “/v1/payment_intents/pi_…”). - `data.resolved_at` (timestamp) The time when the user experience has returned to expected levels. - `data.summary` (string) A short description of the alert. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-09-01T00:00:00.000Z", "id": "evt_61T9lS0YJdsfs2qpP16S4Lg62UPMlhRZLaD8bjJk0URE", "object": "v2.core.event", "type": "v2.core.health.event_generation_failure.resolved", "livemode": true, "reason": null, "related_object": {}, "changes": null } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-09-01T00:00:00.000Z", "id": "evt_61T9lS0YJdsfs2qpP16S4Lg62UPMlhRZLaD8bjJk0URE", "object": "v2.core.event", "type": "v2.core.health.event_generation_failure.resolved", "livemode": true, "reason": null, "related_object": {}, "changes": null, "data": { "alert_id": "healt_61T9lS0oEhI3q4SIt16S4Lg62UPMlhRZLaD8bjJk04KG", "grouping_key": "_grouping_ptMhjBzqnKi6cYrIJceKtf3B8t7hOw2CFPxubICgKCzdFtQQWf", "impact": { "account": "acct_1RHue8PJcsYbr6qj", "event_type": "payment_intent.requires_action", "livemode": true, "missing_delivery_attempts": 4, "related_object_id": "pi_3S0JizPJcsYbr6qj2aCkkmwL" }, "resolved_at": "2025-09-01T00:00:00.000Z", "summary": "We have failed to create a notification for your Stripe account." } } ``` ### `v2.money_management.adjustment.created` Occurs when an Adjustment is created. Related object: [Adjustment](https://docs.stripe.com/api/v2/money-management/adjustments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.adjustment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.adjustment.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "adj_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.adjustment", "url": "/v2/money_management/adjustments/adj_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.adjustment.created", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "adj_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.adjustment", "url": "/v2/money_management/adjustments/adj_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.adjustment.created", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.financial_account.created` Occurs when a FinancialAccount is created. Related object: [Financial Account](https://docs.stripe.com/api/v2/money-management/financial-accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.financial_account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.financial_account.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_account", "url": "/v2/money_management/financial_accounts/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_account.created" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_account", "url": "/v2/money_management/financial_accounts/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_account.created", "changes": {}, "data": {} } ``` ### `v2.money_management.financial_account.updated` Occurs when a FinancialAccount is updated. Related object: [Financial Account](https://docs.stripe.com/api/v2/money-management/financial-accounts/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.financial_account") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.financial_account.updated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_12RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v12sAB2aV6o01RdTN", "idempotency_key": "fe21992d-e123-3f8c-bc90-abc93712bcb2" } }, "related_object": { "id": "fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcSabc", "type": "v2.money_management.financial_account", "url": "/v2/money_management/financial_accounts/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcSabc" }, "type": "v2.money_management.financial_account.updated", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_12RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v12sAB2aV6o01RdTN", "idempotency_key": "fe21992d-e123-3f8c-bc90-abc93712bcb2" } }, "related_object": { "id": "fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcSabc", "type": "v2.money_management.financial_account", "url": "/v2/money_management/financial_accounts/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcSabc" }, "type": "v2.money_management.financial_account.updated", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.financial_address.activated` Occurs when a FinancialAddress is activated and is ready to receive funds. Related object: [Financial Address](https://docs.stripe.com/api/v2/money-management/financial-addresses/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.financial_address") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.financial_address.activated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "finaddr_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_address", "url": "/v2/money_management/financial_addresses/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_address.activated" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "finaddr_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_address", "url": "/v2/money_management/financial_addresses/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_address.activated", "changes": {}, "data": {} } ``` ### `v2.money_management.financial_address.failed` Occurs when a FinancialAddress fails to activate and can not receive funds. Related object: [Financial Address](https://docs.stripe.com/api/v2/money-management/financial-addresses/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.financial_address") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.financial_address.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "finaddr_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_address", "url": "/v2/money_management/financial_addresses/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_address.failed" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "finaddr_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.financial_address", "url": "/v2/money_management/financial_addresses/fa_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.financial_address.failed", "changes": {}, "data": {} } ``` ### `v2.money_management.inbound_transfer.available` Occurs when an InboundTransfer's funds are made available. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.available") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.transaction_id` (string) The transaction ID of the received credit. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEF", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEG", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEH" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEI", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEI" }, "type": "v2.money_management.inbound_transfer.available", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEF", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEG", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEH" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEI", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEI" }, "type": "v2.money_management.inbound_transfer.available", "livemode": true, "changes": {}, "data": { "transaction_id": "txn_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWEJ" } } ``` ### `v2.money_management.inbound_transfer.bank_debit_failed` Occurs when an InboundTransfer fails. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.bank_debit_failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFK", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFL", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFM" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFN", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFN" }, "type": "v2.money_management.inbound_transfer.bank_debit_failed", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFK", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFL", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFM" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFN", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFN" }, "type": "v2.money_management.inbound_transfer.bank_debit_failed", "livemode": true, "changes": {}, "data": { "transaction_id": "txn_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWFO" } } ``` ### `v2.money_management.inbound_transfer.bank_debit_processing` Occurs when an InboundTransfer starts processing. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.bank_debit_processing") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGP", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGQ", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGR" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGS", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGS" }, "type": "v2.money_management.inbound_transfer.bank_debit_processing", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGP", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGQ", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGR" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGS", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGS" }, "type": "v2.money_management.inbound_transfer.bank_debit_processing", "livemode": true, "changes": {}, "data": { "transaction_id": "txn_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWGT" } } ``` ### `v2.money_management.inbound_transfer.bank_debit_queued` Occurs when an InboundTransfer is queued. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.bank_debit_queued") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHU", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHV", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHW" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHX", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHX" }, "type": "v2.money_management.inbound_transfer.bank_debit_queued", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHU", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHV", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHW" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHX", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHX" }, "type": "v2.money_management.inbound_transfer.bank_debit_queued", "livemode": true, "changes": {}, "data": { "transaction_id": "txn_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWHY" } } ``` ### `v2.money_management.inbound_transfer.bank_debit_returned` Occurs when an InboundTransfer is returned. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.bank_debit_returned") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWIZ", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJa", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJb" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJc", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJc" }, "type": "v2.money_management.inbound_transfer.bank_debit_returned", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWIZ", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJa", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJb" } }, "related_object": { "id": "ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJc", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJc" }, "type": "v2.money_management.inbound_transfer.bank_debit_returned", "livemode": true, "changes": {}, "data": { "transaction_id": "txn_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWJd" } } ``` ### `v2.money_management.inbound_transfer.bank_debit_succeeded` Occurs when an InboundTransfer succeeds. Related object: [Inbound Transfer](https://docs.stripe.com/api/v2/money-management/inbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.inbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.inbound_transfer.bank_debit_succeeded") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "ibt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.inbound_transfer.bank_debit_succeeded" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "ibt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.inbound_transfer", "url": "/v2/money_management/inbound_transfers/ibt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.inbound_transfer.bank_debit_succeeded", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.canceled` Occurs when an OutboundPayment transitions into the canceled state. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.canceled") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.canceled" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.canceled", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.created` Occurs when an OutboundPayment is created. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.created" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.created", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.failed` Occurs when an OutboundPayment transitions into the failed state. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.failed" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.failed", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.posted` Occurs when an OutboundPayment transitions into the posted state. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.posted") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.posted" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.posted", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.returned` Occurs when an OutboundPayment transitions into the returned state. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.returned") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.returned" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_payment", "url": "/v2/money_management/outbound_payments/obp_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_payment.returned", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_payment.updated` Occurs when an OutboundPayment is updated. Related object: [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_payment.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Outbound Payment](https://docs.stripe.com/api/v2/money-management/outbound-payments/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.money_management.outbound_transfer.canceled` Occurs when an OutboundTransfer transitions into the canceled state. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.canceled") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.canceled" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.canceled", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_transfer.created` Occurs when an OutboundTransfer is created. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.created" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.created", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_transfer.failed` Occurs when an OutboundTransfer transitions into the failed state. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.failed" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.failed", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_transfer.posted` Occurs when an OutboundTransfer transitions into the posted state. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.posted") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.posted" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.posted", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_transfer.returned` Occurs when an OutboundTransfer transitions into the returned state. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.returned") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.returned" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.outbound_transfer", "url": "/v2/money_management/outbound_transfers/obt_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.outbound_transfer.returned", "changes": {}, "data": {} } ``` ### `v2.money_management.outbound_transfer.updated` Event that is emitted every time an Outbound Transfer is updated. Related object: [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.outbound_transfer") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.outbound_transfer.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Outbound Transfer](https://docs.stripe.com/api/v2/money-management/outbound-transfers/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.money_management.payout_method.created` Occurs when a PayoutMethod is created. Related object: [Payout Method](https://docs.stripe.com/api/v2/money-management/payout-methods/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.payout_method") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.payout_method.created") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Payout Method](https://docs.stripe.com/api/v2/money-management/payout-methods/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object, nullable) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.money_management.payout_method.updated` Occurs when a PayoutMethod is updated. Related object: [Payout Method](https://docs.stripe.com/api/v2/money-management/payout-methods/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.payout_method") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.payout_method.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Payout Method](https://docs.stripe.com/api/v2/money-management/payout-methods/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_test_65T9qz5vb8kyuH3jDpN16T9qz2Z9SQtIGtjTwSQlWYSQKu", "object": "v2.core.event", "type": "v2.money_management.payout_method.updated", "livemode": true, "related_object": { "id": "usba_test_61T9qz3EsA8z0jZAC16T9qz2Z9SQtIGtjTwSQlWYSGVU", "type": "v2.money_management.payout_method", "url": "/v2/money_management/payout_methods/usba_test_61T9qz3EsA8z0jZAC16T9qz2Z9SQtIGtjTwSQlWYSGVU" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_test_65T9qz5vb8kyuH3jDpN16T9qz2Z9SQtIGtjTwSQlWYSQKu", "object": "v2.core.event", "type": "v2.money_management.payout_method.updated", "livemode": true, "related_object": { "id": "usba_test_61T9qz3EsA8z0jZAC16T9qz2Z9SQtIGtjTwSQlWYSGVU", "type": "v2.money_management.payout_method", "url": "/v2/money_management/payout_methods/usba_test_61T9qz3EsA8z0jZAC16T9qz2Z9SQtIGtjTwSQlWYSGVU" }, "changes": { "before": { "routing_number": "1110000", "last4": "1234", "account_type": "savings" }, "after": { "routing_number": "0001111", "last4": "0000", "account_type": "checking" } }, "reason": null } ``` ### `v2.money_management.received_credit.available` Occurs when a ReceivedCredit's funds are received and are available in your balance. Related object: [Received Credit](https://docs.stripe.com/api/v2/money-management/received-credits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_credit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_credit.available") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.transaction_id` (string) The transaction ID of the received credit. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.available" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.available", "changes": {}, "data": { "transaction_id": "trxn_65SIg2l4L4cgf1QMQle13Ns7tI51SQD5CcHYMPnDCEaBfE" } } ``` ### `v2.money_management.received_credit.failed` Occurs when a ReceivedCredit is attempted to your balance and fails. See the status_details for more information. Related object: [Received Credit](https://docs.stripe.com/api/v2/money-management/received-credits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_credit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_credit.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.failed" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.failed", "changes": {}, "data": {} } ``` ### `v2.money_management.received_credit.returned` Occurs when a ReceivedCredit is reversed, returned to the originator, and deducted from your balance. Related object: [Received Credit](https://docs.stripe.com/api/v2/money-management/received-credits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_credit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_credit.returned") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.returned" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.returned", "changes": {}, "data": {} } ``` ### `v2.money_management.received_credit.succeeded` Occurs when a ReceivedCredit succeeds. Related object: [Received Credit](https://docs.stripe.com/api/v2/money-management/received-credits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_credit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_credit.succeeded") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.succeeded" } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "context": null, "created": "2025-01-01T00:00:00.000Z", "id": "evt_65RCjj4EqW1sabcjs2Z16RCMoNQdSQkOWvfL6L5uU2K40u", "livemode": true, "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_v24sUK2aV6o01RdVU", "idempotency_key": "fe21992d-e123-3f8c-bc90-fec93712bcb2" } }, "related_object": { "id": "rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me", "type": "v2.money_management.received_credit", "url": "/v2/money_management/received_credits/rc_65SDS7HTasdQYsDClFT16CGd2aE2kBpeAvvRnBUcS2me" }, "type": "v2.money_management.received_credit.succeeded", "changes": {}, "data": {} } ``` ### `v2.money_management.received_debit.canceled` Occurs when a ReceivedDebit is canceled. Related object: [Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_debit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_debit.canceled") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKe", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKf", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKg" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKh", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKh" }, "type": "v2.money_management.received_debit.canceled", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKe", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKf", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKg" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKh", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWKh" }, "type": "v2.money_management.received_debit.canceled", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.received_debit.failed` Occurs when a ReceivedDebit fails. Related object: [Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_debit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_debit.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLi", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLj", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLk" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLl", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLl" }, "type": "v2.money_management.received_debit.failed", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLi", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLj", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLk" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLl", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWLl" }, "type": "v2.money_management.received_debit.failed", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.received_debit.pending` Occurs when a ReceivedDebit is set to pending. Related object: [Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_debit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_debit.pending") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMm", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMn", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMo" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMp", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMp" }, "type": "v2.money_management.received_debit.pending", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMm", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMn", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMo" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMp", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWMp" }, "type": "v2.money_management.received_debit.pending", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.received_debit.succeeded` Occurs when a ReceivedDebit succeeds. Related object: [Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_debit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_debit.succeeded") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNq", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNr", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNs" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNt", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNt" }, "type": "v2.money_management.received_debit.succeeded", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNq", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNr", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNs" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNt", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWNt" }, "type": "v2.money_management.received_debit.succeeded", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.received_debit.updated` Occurs when a ReceivedDebit is updated. Related object: [Received Debit](https://docs.stripe.com/api/v2/money-management/received-debits/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.received_debit") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.received_debit.updated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOu", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOv", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOw" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOx", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOx" }, "type": "v2.money_management.received_debit.updated", "livemode": true } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-01-01T00:00:00.000Z", "id": "evt_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOu", "object": "v2.core.event", "reason": { "type": "request", "request": { "id": "req_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOv", "idempotency_key": "idem_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOw" } }, "related_object": { "id": "rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOx", "type": "v2.money_management.received_debit", "url": "/v2/money_management/received_debits/rd_65PIoVqwBhv9ka9wC16PITSVZ3SQ2qpWK2k4kS9loWOx" }, "type": "v2.money_management.received_debit.updated", "livemode": true, "changes": {}, "data": {} } ``` ### `v2.money_management.transaction.created` Occurs when a Transaction is created. Related object: [Transaction](https://docs.stripe.com/api/v2/money-management/transactions/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.transaction") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.transaction.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `data.v1_id` (string, nullable) Id of the v1 Transaction corresponding to this Transaction. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-07-29T21:54:27.929Z", "id": "evt_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z", "object": "v2.core.event", "type": "v2.money_management.transaction.created", "data": {}, "livemode": true, "reason": null, "related_object": { "id": "trxn_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z", "type": "v2.money_management.transaction", "url": "/v2/money_management/transactions/trxn_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-07-29T21:54:27.929Z", "id": "evt_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z", "object": "v2.core.event", "type": "v2.money_management.transaction.created", "data": {}, "livemode": true, "reason": null, "related_object": { "id": "trxn_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z", "type": "v2.money_management.transaction", "url": "/v2/money_management/transactions/trxn_1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z" } } ``` ### `v2.money_management.transaction.updated` Occurs when a Transaction is updated. Related object: [Transaction](https://docs.stripe.com/api/v2/money-management/transactions/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.money_management.transaction") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.money_management.transaction.updated") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-07-29T21:55:15.482Z", "id": "evt_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A", "object": "v2.core.event", "type": "v2.money_management.transaction.updated", "data": {}, "livemode": true, "reason": null, "related_object": { "id": "trxn_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A", "type": "v2.money_management.transaction", "url": "/v2/money_management/transactions/trxn_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A" }, "changes": null } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-07-29T21:55:15.482Z", "id": "evt_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A", "object": "v2.core.event", "type": "v2.money_management.transaction.updated", "data": {}, "livemode": true, "reason": null, "related_object": { "id": "trxn_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A", "type": "v2.money_management.transaction", "url": "/v2/money_management/transactions/trxn_2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7A" }, "changes": null } ``` ### `v2.payments.off_session_payment.attempt_failed` Sent after a failed attempt if there are still retries available on the OffSessionPayment. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.attempt_failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUwG8HlF7AB6jtrA783Zq3rx5KZXokpIlSxVqLQuBWZx", "object": "v2.core.event", "type": "v2.payments.off_session_payment.attempt_failed", "livemode": true, "created": "2025-10-23T16:54:12.345Z", "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUwG8HlF7AB6jtrA783Zq3rx5KZXokpIlSxVqLQuBWZx", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:54:12.345Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" }, "type": "v2.payments.off_session_payment.attempt_failed", "livemode": true } ``` ### `v2.payments.off_session_payment.attempt_started` Sent when our internal scheduling system kicks off an attempt, whether it's a retry or an initial attempt. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.attempt_started") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUxH9ImG8BC7ktrB894Ar4sy6LaYplqJmTyWrMRvCXAy", "object": "v2.core.event", "type": "v2.payments.off_session_payment.attempt_started", "livemode": true, "created": "2025-10-23T16:49:55.678Z", "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUxH9ImG8BC7ktrB894Ar4sy6LaYplqJmTyWrMRvCXAy", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:49:55.678Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" }, "type": "v2.payments.off_session_payment.attempt_started", "livemode": true } ``` ### `v2.payments.off_session_payment.authorization_attempt_failed` Sent after a failed authorization if there are still retries available on the OffSessionPayment. This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.authorization_attempt_failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUvF7GkE69A5itrZ672Yp2qw4JYWnjoHkRwUpKPtAVYw", "object": "v2.core.event", "type": "v2.payments.off_session_payment.authorization_attempt_failed", "livemode": true, "created": "2025-10-23T16:50:05.890Z", "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUvF7GkE69A5itrZ672Yp2qw4JYWnjoHkRwUpKPtAVYw", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:50:05.890Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" }, "type": "v2.payments.off_session_payment.authorization_attempt_failed", "livemode": true } ``` ### `v2.payments.off_session_payment.authorization_attempt_started` Sent when our internal scheduling system kicks off an attempt at authorization, whether it's a retry or an initial authorization. This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.authorization_attempt_started") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUuE6FjD58Z4htrY561Xo1pv3IXVminGjQvToJOsZUXv", "object": "v2.core.event", "type": "v2.payments.off_session_payment.authorization_attempt_started", "livemode": true, "created": "2025-10-23T16:49:50.567Z", "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUuE6FjD58Z4htrY561Xo1pv3IXVminGjQvToJOsZUXv", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:49:50.567Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" }, "type": "v2.payments.off_session_payment.authorization_attempt_started", "livemode": true } ``` ### `v2.payments.off_session_payment.canceled` Sent immediately following a user's call to the Off-Session Payments cancel endpoint. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.canceled") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUsC4DhB36X2ftrW349Vm9nt1GVTkglEhOtRmHMqXSVt", "object": "v2.core.event", "type": "v2.payments.off_session_payment.canceled", "livemode": true, "created": "2025-10-23T16:52:45.789Z", "related_object": { "id": "osp_65TUsBsuEYof6gqUB7L38Vm9nt1GVTkglEhOtRmHMqXT6E", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUsBsuEYof6gqUB7L38Vm9nt1GVTkglEhOtRmHMqXT6E" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUsC4DhB36X2ftrW349Vm9nt1GVTkglEhOtRmHMqXSVt", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:52:45.789Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUsBsuEYof6gqUB7L38Vm9nt1GVTkglEhOtRmHMqXT6E", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUsBsuEYof6gqUB7L38Vm9nt1GVTkglEhOtRmHMqXT6E" }, "type": "v2.payments.off_session_payment.canceled", "livemode": true } ``` ### `v2.payments.off_session_payment.created` Sent immediately following a user's call to the Off-Session Payments create endpoint. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.created") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUpetAEZ03U9ctrT016Sk6kq8DSQhdnBeLqOjEJnUPSq", "object": "v2.core.event", "type": "v2.payments.off_session_payment.created", "livemode": true, "created": "2025-10-23T16:49:22.980Z", "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUpetAEZ03U9ctrT016Sk6kq8DSQhdnBeLqOjEJnUPSq", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:49:22.980Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" }, "type": "v2.payments.off_session_payment.created", "livemode": true } ``` ### `v2.payments.off_session_payment.failed` Sent after a failed authorization if there are no retries remaining, or if the failure is unretryable. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.failed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUrB3CgA25W1etrV238Ul8ms0FUSjfkDgNsQlGLpWRUs", "object": "v2.core.event", "type": "v2.payments.off_session_payment.failed", "livemode": true, "created": "2025-10-23T16:51:30.456Z", "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUrB3CgA25W1etrV238Ul8ms0FUSjfkDgNsQlGLpWRUs", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:51:30.456Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUrArtDXne5fpTA6K27Ul8ms0FUSjfkDgNsQlGLpWS5D" }, "type": "v2.payments.off_session_payment.failed", "livemode": true } ``` ### `v2.payments.off_session_payment.paused` Sent immediately following a user's call to the Off-Session Payments pause endpoint. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.paused") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.payments.off_session_payment.resumed` Sent immediately following a user's call to the Off-Session Payments resume endpoint. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.resumed") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### `v2.payments.off_session_payment.succeeded` Sent immediately after a successful authorization. Related object: [Off Session Payment](https://docs.stripe.com/api/v2/payments/off-session-payments/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.payments.off_session_payment") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.payments.off_session_payment.succeeded") The type of the event. ## Fetched attributes - `changes` (null) Always `null` because this event type doesn’t track related object changes. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "id": "evt_65TUqA2BfZ14V0dsrU127Tk7lr9ETRiejCfMrPkFKoVQTr", "object": "v2.core.event", "type": "v2.payments.off_session_payment.succeeded", "livemode": true, "created": "2025-10-23T16:50:15.123Z", "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_65TUqA2BfZ14V0dsrU127Tk7lr9ETRiejCfMrPkFKoVQTr", "object": "v2.core.event", "context": null, "created": "2025-10-23T16:50:15.123Z", "data": {}, "reason": null, "related_object": { "id": "osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C", "type": "v2.payments.off_session_payment", "url": "/v2/payments/off_session_payments/osp_65TUpesSCWmd4eoSz5J16Sk6kq8DSQhdnBeLqOjEJnUT4C" }, "type": "v2.payments.off_session_payment.succeeded", "livemode": true } ``` ### `v2.reporting.report_run.created` Occurs when a ReportRun is created. Related object: [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.reporting.report_run") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.reporting.report_run.created") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object, nullable) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-08-26T00:00:00.000Z", "id": "evt_test_xxx", "object": "v2.core.event", "type": "v2.reporting.report_run.created", "livemode": false, "reason": { "type": "request", "request": { "id": "req_xxx", "idempotency_key": "xxx" } }, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "created": "2025-08-26T00:00:00.000Z", "id": "evt_test_xxx", "object": "v2.core.event", "type": "v2.reporting.report_run.created", "livemode": false, "reason": { "type": "request", "request": { "id": "req_xxx", "idempotency_key": "xxx" } }, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" }, "data": {}, "changes": { "before": null, "after": { "created": "2025-08-26T00:00:00.000Z", "id": "reprun_test_xxx", "object": "v2.reporting.report_run", "report": "report_test_xxx", "report_name": "test report name", "report_parameters": { "interval_start": "2025-08-18T00:00:00.000Z", "interval_end": "2025-08-25T00:00:00.000Z" }, "result": null, "result_options": { "compress_file": false }, "status": "running", "status_details": {}, "livemode": false } } } ``` ### `v2.reporting.report_run.failed` Occurs when a ReportRun has failed to complete. Related object: [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.reporting.report_run") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.reporting.report_run.failed") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-08-26T00:00:00.000Z", "id": "evt_test_xxx", "object": "v2.core.event", "type": "v2.reporting.report_run.failed", "livemode": false, "reason": null, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_test_xxx", "object": "v2.core.event", "created": "2025-08-26T00:00:00.000Z", "data": {}, "reason": null, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" }, "type": "v2.reporting.report_run.failed", "livemode": false, "changes": { "before": { "status": "running", "status_details": {} }, "after": { "status": "failed", "status_details": { "failed": { "error_code": "file_size_above_limit", "error_message": "The file generated by this request exceeds the 5 GB limit." } } } } } ``` ### `v2.reporting.report_run.succeeded` Occurs when a ReportRun has successfully completed. Related object: [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.reporting.report_run") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.reporting.report_run.succeeded") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-08-26T00:00:00.000Z", "id": "evt_test_xxx", "object": "v2.core.event", "type": "v2.reporting.report_run.succeeded", "livemode": false, "reason": null, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_test_xxx", "object": "v2.core.event", "created": "2025-08-26T00:00:00.000Z", "data": {}, "reason": null, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" }, "type": "v2.reporting.report_run.succeeded", "livemode": false, "changes": { "before": { "status": "running" }, "after": { "status": "succeeded" } } } ``` ### `v2.reporting.report_run.updated` Occurs when a ReportRun is updated. Related object: [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) ## Attributes - `id` (string) Unique identifier for the event. - `object` (string, value is "v2.core.event") String representing the object’s type. Objects of the same type share the same value of the object field. - `context` (string, nullable) Authentication context needed to fetch the event or related object. - `created` (timestamp) Time at which the object was created. - `livemode` (boolean) Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - `related_object` (object) Object containing the reference to API resource relevant to the event. - `related_object.id` (string) Unique identifier for the object relevant to the event. - `related_object.type` (string, value is "v2.reporting.report_run") Object tag of the resource relevant to the event. - `related_object.url` (string) URL to retrieve the resource. - `type` (string, value is "v2.reporting.report_run.updated") The type of the event. ## Fetched attributes - `changes` (object) Changes that the event makes to properties in the related object. See the [Report Run](https://docs.stripe.com/api/v2/reporting/report-runs/object.md) object for the structure of `before` and `after`. - `changes.after` (object) Updated values of properties that the event changed. This is `null` for deletion events. - `changes.before` (object) Values of properties before the event changes. This is `null` for creation events. - `data` (object) Additional data about the event. - `reason` (object, nullable) Reason for the event. - `reason.request` (object, nullable) Information on the API request that instigated the event. - `reason.request.id` (string) ID of the API request that caused the event. - `reason.request.idempotency_key` (string) The idempotency key transmitted during the request. - `reason.type` (enum) Event reason type. Possible enum values: - `request` The event was published as the result of an API request. ### Event payload ```json { "created": "2025-08-26T00:00:00Z", "id": "evt_test_xxx", "object": "v2.core.event", "type": "v2.reporting.report_run.updated", "livemode": false, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" } } ``` ### Event handler ```curl # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```bash # Select a client library to see examples of # parsing and retrieving event details. ``` ### Event handler ```ruby client = Stripe::StripeClient.new("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = request.env['HTTP_STRIPE_SIGNATURE'] thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```python client = StripeClient("{{YOUR_API_KEY}}") endpoint_secret = 'whsec_...' signature_header = '' thin_event = client.parse_thin_event( payload, signature_header, endpoint_secret ) event = client.v2.core.events.retrieve(thin_event.id) ``` ### Event handler ```php $stripe = new StripeStripeClient('{{YOUR_API_KEY}}'); $endpoint_secret = 'whsec_...'; $signature_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $thin_event = $client->parseThinEvent( $payload, $signature_header, $endpoint_secret ); $event = $client->v2->core->events->retrieve($thin_event->id); ``` ### Event handler ```java StripeClient client = new StripeClient("{{YOUR_API_KEY}}"); String signatureHeader = request.headers("Stripe-Signature"); String endpointSecret = "whsec_..."; com.stripe.model.ThinEvent thinEvent = client.parseThinEvent( payload, signatureHeader, endpointSecret ); com.stripe.model.v2.Event event = client.v2().core().events().retrieve( thinEvent.getId() ); ``` ### Event handler ```javascript const stripe = require('stripe')('{{YOUR_API_KEY}}'); const endpoint_secret = 'whsec_...' const signature_header = '...' const thinEvent = stripe.parseThinEvent( payload, signature_header, endpoint_secret ); const event = await stripe.v2.core.events.retrieve(thinEvent.id); ``` ### Event handler ```go err = webhook.ValidatePayload( payload, signatureHeader, endpointSecret ) if err != nil { fmt.Fprintf(os.Stderr, "Error reading request body: %v ", err) return } var thinEvent map[string]interface{} if err := json.Unmarshal(payload, &thinEvent); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse thin event body json: %v ", err.Error() ) return } eventID := thinEvent["id"].(string) var event map[string]interface{} resp, err := client.RawRequest( http.MethodGet, "/v2/core/events/"+eventID, "", nil ) if err != nil { fmt.Fprintf( os.Stderr, "Failed to get pull event: %v ", err.Error() ) return } if err := json.Unmarshal(resp.RawJSON, &event); err != nil { fmt.Fprintf( os.Stderr, "Failed to parse pull event body json: %v ", err.Error() ) return } ``` ### Event handler ```dotnet var client = new StripeClient("{{YOUR_API_KEY}}"); string endpointSecret = "whsec_..."; string signatureHeader = Request.Headers["Stripe-Signature"]; var thinEvent = client.ParseThinEvent( payload, signatureHeader, endpointSecret ); var event = await client.V2.Core.Events.GetAsync(thinEvent.Id); ``` ### Fetched payload ```json { "id": "evt_test_xxx", "object": "v2.core.event", "created": "2025-08-26T00:00:00Z", "data": {}, "reason": null, "related_object": { "id": "reprun_test_xxx", "type": "v2.reporting.report_run", "url": "/v2/reporting/report_runs/reprun_test_xxx" }, "type": "v2.reporting.report_run.updated", "livemode": false, "changes": { "before": { "status": "running" }, "after": { "status": "succeeded" } } } ```