| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._request_options import RequestOptions |
| 4 |
from typing import Dict, List |
| 5 |
from typing_extensions import Literal, NotRequired |
| 6 |
|
| 7 |
|
| 8 |
class WebhookEndpointCreateParams(RequestOptions): |
| 9 |
api_version: NotRequired[ |
| 10 |
Literal[ |
| 11 |
"2011-01-01", |
| 12 |
"2011-06-21", |
| 13 |
"2011-06-28", |
| 14 |
"2011-08-01", |
| 15 |
"2011-09-15", |
| 16 |
"2011-11-17", |
| 17 |
"2012-02-23", |
| 18 |
"2012-03-25", |
| 19 |
"2012-06-18", |
| 20 |
"2012-06-28", |
| 21 |
"2012-07-09", |
| 22 |
"2012-09-24", |
| 23 |
"2012-10-26", |
| 24 |
"2012-11-07", |
| 25 |
"2013-02-11", |
| 26 |
"2013-02-13", |
| 27 |
"2013-07-05", |
| 28 |
"2013-08-12", |
| 29 |
"2013-08-13", |
| 30 |
"2013-10-29", |
| 31 |
"2013-12-03", |
| 32 |
"2014-01-31", |
| 33 |
"2014-03-13", |
| 34 |
"2014-03-28", |
| 35 |
"2014-05-19", |
| 36 |
"2014-06-13", |
| 37 |
"2014-06-17", |
| 38 |
"2014-07-22", |
| 39 |
"2014-07-26", |
| 40 |
"2014-08-04", |
| 41 |
"2014-08-20", |
| 42 |
"2014-09-08", |
| 43 |
"2014-10-07", |
| 44 |
"2014-11-05", |
| 45 |
"2014-11-20", |
| 46 |
"2014-12-08", |
| 47 |
"2014-12-17", |
| 48 |
"2014-12-22", |
| 49 |
"2015-01-11", |
| 50 |
"2015-01-26", |
| 51 |
"2015-02-10", |
| 52 |
"2015-02-16", |
| 53 |
"2015-02-18", |
| 54 |
"2015-03-24", |
| 55 |
"2015-04-07", |
| 56 |
"2015-06-15", |
| 57 |
"2015-07-07", |
| 58 |
"2015-07-13", |
| 59 |
"2015-07-28", |
| 60 |
"2015-08-07", |
| 61 |
"2015-08-19", |
| 62 |
"2015-09-03", |
| 63 |
"2015-09-08", |
| 64 |
"2015-09-23", |
| 65 |
"2015-10-01", |
| 66 |
"2015-10-12", |
| 67 |
"2015-10-16", |
| 68 |
"2016-02-03", |
| 69 |
"2016-02-19", |
| 70 |
"2016-02-22", |
| 71 |
"2016-02-23", |
| 72 |
"2016-02-29", |
| 73 |
"2016-03-07", |
| 74 |
"2016-06-15", |
| 75 |
"2016-07-06", |
| 76 |
"2016-10-19", |
| 77 |
"2017-01-27", |
| 78 |
"2017-02-14", |
| 79 |
"2017-04-06", |
| 80 |
"2017-05-25", |
| 81 |
"2017-06-05", |
| 82 |
"2017-08-15", |
| 83 |
"2017-12-14", |
| 84 |
"2018-01-23", |
| 85 |
"2018-02-05", |
| 86 |
"2018-02-06", |
| 87 |
"2018-02-28", |
| 88 |
"2018-05-21", |
| 89 |
"2018-07-27", |
| 90 |
"2018-08-23", |
| 91 |
"2018-09-06", |
| 92 |
"2018-09-24", |
| 93 |
"2018-10-31", |
| 94 |
"2018-11-08", |
| 95 |
"2019-02-11", |
| 96 |
"2019-02-19", |
| 97 |
"2019-03-14", |
| 98 |
"2019-05-16", |
| 99 |
"2019-08-14", |
| 100 |
"2019-09-09", |
| 101 |
"2019-10-08", |
| 102 |
"2019-10-17", |
| 103 |
"2019-11-05", |
| 104 |
"2019-12-03", |
| 105 |
"2020-03-02", |
| 106 |
"2020-08-27", |
| 107 |
"2022-08-01", |
| 108 |
"2022-11-15", |
| 109 |
"2023-08-16", |
| 110 |
"2023-10-16", |
| 111 |
"2024-04-10", |
| 112 |
"2024-06-20", |
| 113 |
"2024-09-30.acacia", |
| 114 |
"2024-10-28.acacia", |
| 115 |
"2024-11-20.acacia", |
| 116 |
"2024-12-18.acacia", |
| 117 |
"2025-01-27.acacia", |
| 118 |
"2025-02-24.acacia", |
| 119 |
"2025-03-01.dashboard", |
| 120 |
"2025-03-31.basil", |
| 121 |
"2025-04-30.basil", |
| 122 |
"2025-05-28.basil", |
| 123 |
"2025-06-30.basil", |
| 124 |
"2025-07-30.basil", |
| 125 |
"2025-08-27.basil", |
| 126 |
"2025-09-30.clover", |
| 127 |
"2025-10-29.clover", |
| 128 |
"2025-11-17.clover", |
| 129 |
"2025-12-15.clover", |
| 130 |
"2026-01-28.clover", |
| 131 |
"2026-02-25.clover", |
| 132 |
] |
| 133 |
] |
| 134 |
""" |
| 135 |
Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. |
| 136 |
""" |
| 137 |
connect: NotRequired[bool] |
| 138 |
""" |
| 139 |
Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. |
| 140 |
""" |
| 141 |
description: NotRequired["Literal['']|str"] |
| 142 |
""" |
| 143 |
An optional description of what the webhook is used for. |
| 144 |
""" |
| 145 |
enabled_events: List[ |
| 146 |
Literal[ |
| 147 |
"*", |
| 148 |
"account.application.authorized", |
| 149 |
"account.application.deauthorized", |
| 150 |
"account.external_account.created", |
| 151 |
"account.external_account.deleted", |
| 152 |
"account.external_account.updated", |
| 153 |
"account.updated", |
| 154 |
"application_fee.created", |
| 155 |
"application_fee.refund.updated", |
| 156 |
"application_fee.refunded", |
| 157 |
"balance.available", |
| 158 |
"balance_settings.updated", |
| 159 |
"billing.alert.triggered", |
| 160 |
"billing.credit_grant.created", |
| 161 |
"billing_portal.configuration.created", |
| 162 |
"billing_portal.configuration.updated", |
| 163 |
"billing_portal.session.created", |
| 164 |
"capability.updated", |
| 165 |
"cash_balance.funds_available", |
| 166 |
"charge.captured", |
| 167 |
"charge.dispute.closed", |
| 168 |
"charge.dispute.created", |
| 169 |
"charge.dispute.funds_reinstated", |
| 170 |
"charge.dispute.funds_withdrawn", |
| 171 |
"charge.dispute.updated", |
| 172 |
"charge.expired", |
| 173 |
"charge.failed", |
| 174 |
"charge.pending", |
| 175 |
"charge.refund.updated", |
| 176 |
"charge.refunded", |
| 177 |
"charge.succeeded", |
| 178 |
"charge.updated", |
| 179 |
"checkout.session.async_payment_failed", |
| 180 |
"checkout.session.async_payment_succeeded", |
| 181 |
"checkout.session.completed", |
| 182 |
"checkout.session.expired", |
| 183 |
"climate.order.canceled", |
| 184 |
"climate.order.created", |
| 185 |
"climate.order.delayed", |
| 186 |
"climate.order.delivered", |
| 187 |
"climate.order.product_substituted", |
| 188 |
"climate.product.created", |
| 189 |
"climate.product.pricing_updated", |
| 190 |
"coupon.created", |
| 191 |
"coupon.deleted", |
| 192 |
"coupon.updated", |
| 193 |
"credit_note.created", |
| 194 |
"credit_note.updated", |
| 195 |
"credit_note.voided", |
| 196 |
"customer.created", |
| 197 |
"customer.deleted", |
| 198 |
"customer.discount.created", |
| 199 |
"customer.discount.deleted", |
| 200 |
"customer.discount.updated", |
| 201 |
"customer.source.created", |
| 202 |
"customer.source.deleted", |
| 203 |
"customer.source.expiring", |
| 204 |
"customer.source.updated", |
| 205 |
"customer.subscription.created", |
| 206 |
"customer.subscription.deleted", |
| 207 |
"customer.subscription.paused", |
| 208 |
"customer.subscription.pending_update_applied", |
| 209 |
"customer.subscription.pending_update_expired", |
| 210 |
"customer.subscription.resumed", |
| 211 |
"customer.subscription.trial_will_end", |
| 212 |
"customer.subscription.updated", |
| 213 |
"customer.tax_id.created", |
| 214 |
"customer.tax_id.deleted", |
| 215 |
"customer.tax_id.updated", |
| 216 |
"customer.updated", |
| 217 |
"customer_cash_balance_transaction.created", |
| 218 |
"entitlements.active_entitlement_summary.updated", |
| 219 |
"file.created", |
| 220 |
"financial_connections.account.account_numbers_updated", |
| 221 |
"financial_connections.account.created", |
| 222 |
"financial_connections.account.deactivated", |
| 223 |
"financial_connections.account.disconnected", |
| 224 |
"financial_connections.account.reactivated", |
| 225 |
"financial_connections.account.refreshed_balance", |
| 226 |
"financial_connections.account.refreshed_ownership", |
| 227 |
"financial_connections.account.refreshed_transactions", |
| 228 |
"financial_connections.account.upcoming_account_number_expiry", |
| 229 |
"identity.verification_session.canceled", |
| 230 |
"identity.verification_session.created", |
| 231 |
"identity.verification_session.processing", |
| 232 |
"identity.verification_session.redacted", |
| 233 |
"identity.verification_session.requires_input", |
| 234 |
"identity.verification_session.verified", |
| 235 |
"invoice.created", |
| 236 |
"invoice.deleted", |
| 237 |
"invoice.finalization_failed", |
| 238 |
"invoice.finalized", |
| 239 |
"invoice.marked_uncollectible", |
| 240 |
"invoice.overdue", |
| 241 |
"invoice.overpaid", |
| 242 |
"invoice.paid", |
| 243 |
"invoice.payment_action_required", |
| 244 |
"invoice.payment_attempt_required", |
| 245 |
"invoice.payment_failed", |
| 246 |
"invoice.payment_succeeded", |
| 247 |
"invoice.sent", |
| 248 |
"invoice.upcoming", |
| 249 |
"invoice.updated", |
| 250 |
"invoice.voided", |
| 251 |
"invoice.will_be_due", |
| 252 |
"invoice_payment.paid", |
| 253 |
"invoiceitem.created", |
| 254 |
"invoiceitem.deleted", |
| 255 |
"issuing_authorization.created", |
| 256 |
"issuing_authorization.request", |
| 257 |
"issuing_authorization.updated", |
| 258 |
"issuing_card.created", |
| 259 |
"issuing_card.updated", |
| 260 |
"issuing_cardholder.created", |
| 261 |
"issuing_cardholder.updated", |
| 262 |
"issuing_dispute.closed", |
| 263 |
"issuing_dispute.created", |
| 264 |
"issuing_dispute.funds_reinstated", |
| 265 |
"issuing_dispute.funds_rescinded", |
| 266 |
"issuing_dispute.submitted", |
| 267 |
"issuing_dispute.updated", |
| 268 |
"issuing_personalization_design.activated", |
| 269 |
"issuing_personalization_design.deactivated", |
| 270 |
"issuing_personalization_design.rejected", |
| 271 |
"issuing_personalization_design.updated", |
| 272 |
"issuing_token.created", |
| 273 |
"issuing_token.updated", |
| 274 |
"issuing_transaction.created", |
| 275 |
"issuing_transaction.purchase_details_receipt_updated", |
| 276 |
"issuing_transaction.updated", |
| 277 |
"mandate.updated", |
| 278 |
"payment_intent.amount_capturable_updated", |
| 279 |
"payment_intent.canceled", |
| 280 |
"payment_intent.created", |
| 281 |
"payment_intent.partially_funded", |
| 282 |
"payment_intent.payment_failed", |
| 283 |
"payment_intent.processing", |
| 284 |
"payment_intent.requires_action", |
| 285 |
"payment_intent.succeeded", |
| 286 |
"payment_link.created", |
| 287 |
"payment_link.updated", |
| 288 |
"payment_method.attached", |
| 289 |
"payment_method.automatically_updated", |
| 290 |
"payment_method.detached", |
| 291 |
"payment_method.updated", |
| 292 |
"payout.canceled", |
| 293 |
"payout.created", |
| 294 |
"payout.failed", |
| 295 |
"payout.paid", |
| 296 |
"payout.reconciliation_completed", |
| 297 |
"payout.updated", |
| 298 |
"person.created", |
| 299 |
"person.deleted", |
| 300 |
"person.updated", |
| 301 |
"plan.created", |
| 302 |
"plan.deleted", |
| 303 |
"plan.updated", |
| 304 |
"price.created", |
| 305 |
"price.deleted", |
| 306 |
"price.updated", |
| 307 |
"product.created", |
| 308 |
"product.deleted", |
| 309 |
"product.updated", |
| 310 |
"promotion_code.created", |
| 311 |
"promotion_code.updated", |
| 312 |
"quote.accepted", |
| 313 |
"quote.canceled", |
| 314 |
"quote.created", |
| 315 |
"quote.finalized", |
| 316 |
"radar.early_fraud_warning.created", |
| 317 |
"radar.early_fraud_warning.updated", |
| 318 |
"refund.created", |
| 319 |
"refund.failed", |
| 320 |
"refund.updated", |
| 321 |
"reporting.report_run.failed", |
| 322 |
"reporting.report_run.succeeded", |
| 323 |
"reporting.report_type.updated", |
| 324 |
"reserve.hold.created", |
| 325 |
"reserve.hold.updated", |
| 326 |
"reserve.plan.created", |
| 327 |
"reserve.plan.disabled", |
| 328 |
"reserve.plan.expired", |
| 329 |
"reserve.plan.updated", |
| 330 |
"reserve.release.created", |
| 331 |
"review.closed", |
| 332 |
"review.opened", |
| 333 |
"setup_intent.canceled", |
| 334 |
"setup_intent.created", |
| 335 |
"setup_intent.requires_action", |
| 336 |
"setup_intent.setup_failed", |
| 337 |
"setup_intent.succeeded", |
| 338 |
"sigma.scheduled_query_run.created", |
| 339 |
"source.canceled", |
| 340 |
"source.chargeable", |
| 341 |
"source.failed", |
| 342 |
"source.mandate_notification", |
| 343 |
"source.refund_attributes_required", |
| 344 |
"source.transaction.created", |
| 345 |
"source.transaction.updated", |
| 346 |
"subscription_schedule.aborted", |
| 347 |
"subscription_schedule.canceled", |
| 348 |
"subscription_schedule.completed", |
| 349 |
"subscription_schedule.created", |
| 350 |
"subscription_schedule.expiring", |
| 351 |
"subscription_schedule.released", |
| 352 |
"subscription_schedule.updated", |
| 353 |
"tax.settings.updated", |
| 354 |
"tax_rate.created", |
| 355 |
"tax_rate.updated", |
| 356 |
"terminal.reader.action_failed", |
| 357 |
"terminal.reader.action_succeeded", |
| 358 |
"terminal.reader.action_updated", |
| 359 |
"test_helpers.test_clock.advancing", |
| 360 |
"test_helpers.test_clock.created", |
| 361 |
"test_helpers.test_clock.deleted", |
| 362 |
"test_helpers.test_clock.internal_failure", |
| 363 |
"test_helpers.test_clock.ready", |
| 364 |
"topup.canceled", |
| 365 |
"topup.created", |
| 366 |
"topup.failed", |
| 367 |
"topup.reversed", |
| 368 |
"topup.succeeded", |
| 369 |
"transfer.created", |
| 370 |
"transfer.reversed", |
| 371 |
"transfer.updated", |
| 372 |
"treasury.credit_reversal.created", |
| 373 |
"treasury.credit_reversal.posted", |
| 374 |
"treasury.debit_reversal.completed", |
| 375 |
"treasury.debit_reversal.created", |
| 376 |
"treasury.debit_reversal.initial_credit_granted", |
| 377 |
"treasury.financial_account.closed", |
| 378 |
"treasury.financial_account.created", |
| 379 |
"treasury.financial_account.features_status_updated", |
| 380 |
"treasury.inbound_transfer.canceled", |
| 381 |
"treasury.inbound_transfer.created", |
| 382 |
"treasury.inbound_transfer.failed", |
| 383 |
"treasury.inbound_transfer.succeeded", |
| 384 |
"treasury.outbound_payment.canceled", |
| 385 |
"treasury.outbound_payment.created", |
| 386 |
"treasury.outbound_payment.expected_arrival_date_updated", |
| 387 |
"treasury.outbound_payment.failed", |
| 388 |
"treasury.outbound_payment.posted", |
| 389 |
"treasury.outbound_payment.returned", |
| 390 |
"treasury.outbound_payment.tracking_details_updated", |
| 391 |
"treasury.outbound_transfer.canceled", |
| 392 |
"treasury.outbound_transfer.created", |
| 393 |
"treasury.outbound_transfer.expected_arrival_date_updated", |
| 394 |
"treasury.outbound_transfer.failed", |
| 395 |
"treasury.outbound_transfer.posted", |
| 396 |
"treasury.outbound_transfer.returned", |
| 397 |
"treasury.outbound_transfer.tracking_details_updated", |
| 398 |
"treasury.received_credit.created", |
| 399 |
"treasury.received_credit.failed", |
| 400 |
"treasury.received_credit.succeeded", |
| 401 |
"treasury.received_debit.created", |
| 402 |
"billing.credit_balance_transaction.created", |
| 403 |
"billing.credit_grant.updated", |
| 404 |
"billing.meter.created", |
| 405 |
"billing.meter.deactivated", |
| 406 |
"billing.meter.reactivated", |
| 407 |
"billing.meter.updated", |
| 408 |
] |
| 409 |
] |
| 410 |
""" |
| 411 |
The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. |
| 412 |
""" |
| 413 |
expand: NotRequired[List[str]] |
| 414 |
""" |
| 415 |
Specifies which fields in the response should be expanded. |
| 416 |
""" |
| 417 |
metadata: NotRequired["Literal['']|Dict[str, str]"] |
| 418 |
""" |
| 419 |
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 420 |
""" |
| 421 |
url: str |
| 422 |
""" |
| 423 |
The URL of the webhook endpoint. |
| 424 |
""" |