Update a webhook endpoint ​
Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
Returns ​
The updated webhook endpoint object if successful. Otherwise, this call raises an error.
Parameters ​
description(string, optional) An optional description of what the webhook is used for.disabled(boolean, optional) Disable the webhook endpoint if set to true.enabled_events(array of enums, optional) The list of events to enable for this endpoint. You may specify['*']to enable all events, except those that require explicit selection. Possible enum values:account.application.authorizedOccurs whenever a user authorizes an application. Sent to the related application only.account.application.deauthorizedOccurs whenever a user deauthorizes an application. Sent to the related application only.account.external_account.createdOccurs whenever an external account is created.account.external_account.deletedOccurs whenever an external account is deleted.account.external_account.updatedOccurs whenever an external account is updated.account.updatedOccurs whenever an account status or property has changed.application_fee.createdOccurs whenever an application fee is created on a charge.application_fee.refund.updatedOccurs whenever an application fee refund is updated.application_fee.refundedOccurs whenever an application fee is refunded, whether from refunding a charge or from refunding the application fee directly. This includes partial refunds.balance.availableOccurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions.balance_settings.updatedOccurs whenever a balance settings status or property has changed.billing.alert.triggeredOccurs whenever your custom alert threshold is met.billing.credit_grant.createdOccurs when a credit grant is createdbilling_portal.configuration.createdOccurs whenever a portal configuration is created.billing_portal.configuration.updatedOccurs whenever a portal configuration is updated.billing_portal.session.createdOccurs whenever a portal session is created.capability.updatedOccurs whenever a capability has new requirements or a new status.cash_balance.funds_availableOccurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance.charge.capturedOccurs whenever a previously uncaptured charge is captured.charge.dispute.closedOccurs when a dispute is closed and the dispute status changes tolost,warning_closed, orwon.charge.dispute.createdOccurs whenever a customer disputes a charge with their bank.charge.dispute.funds_reinstatedOccurs when funds are reinstated to your account after a dispute is closed. This includes partially refunded payments.charge.dispute.funds_withdrawnOccurs when funds are removed from your account due to a dispute.charge.dispute.updatedOccurs when the dispute is updated (usually with evidence).charge.expiredOccurs whenever an uncaptured charge expires.charge.failedOccurs whenever a failed charge attempt occurs.charge.pendingOccurs whenever a pending charge is created.charge.refund.updatedOccurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen torefund.updatedinstead.charge.refundedOccurs whenever a charge is refunded, including partial refunds. Listen torefund.createdfor information about the refund.charge.succeededOccurs whenever a charge is successful.charge.updatedOccurs whenever a charge description or metadata is updated, or upon an asynchronous capture.checkout.session.async_payment_failedOccurs when a payment intent using a delayed payment method fails.checkout.session.async_payment_succeededOccurs when a payment intent using a delayed payment method finally succeeds.checkout.session.completedOccurs when a Checkout Session has been successfully completed.checkout.session.expiredOccurs when a Checkout Session is expired.climate.order.canceledOccurs when a Climate order is canceled.climate.order.createdOccurs when a Climate order is created.climate.order.delayedOccurs when a Climate order is delayed.climate.order.deliveredOccurs when a Climate order is delivered.climate.order.product_substitutedOccurs when a Climate order’s product is substituted for another.climate.product.createdOccurs when a Climate product is created.climate.product.pricing_updatedOccurs when a Climate product is updated.coupon.createdOccurs whenever a coupon is created.coupon.deletedOccurs whenever a coupon is deleted.coupon.updatedOccurs whenever a coupon is updated.credit_note.createdOccurs whenever a credit note is created.credit_note.updatedOccurs whenever a credit note is updated.credit_note.voidedOccurs whenever a credit note is voided.customer.createdOccurs whenever a new customer is created.customer.deletedOccurs whenever a customer is deleted.customer.discount.createdOccurs whenever a coupon is attached to a customer.customer.discount.deletedOccurs whenever a coupon is removed from a customer.customer.discount.updatedOccurs whenever a customer is switched from one coupon to another.customer.source.createdOccurs whenever a new source is created for a customer.customer.source.deletedOccurs whenever a source is removed from a customer.customer.source.expiringOccurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won’t occur.customer.source.updatedOccurs whenever a source’s details are changed.customer.subscription.createdOccurs whenever a customer is signed up for a new plan.customer.subscription.deletedOccurs whenever a customer’s subscription ends.customer.subscription.pausedOccurs whenever a customer’s subscription is paused. Only applies when subscriptions enterstatus=paused, not when payment collection is paused.customer.subscription.pending_update_appliedOccurs whenever a customer’s subscription’s pending update is applied, and the subscription is updated.customer.subscription.pending_update_expiredOccurs whenever a customer’s subscription’s pending update expires before the related invoice is paid.customer.subscription.resumedOccurs whenever a customer’s subscription is no longer paused. Only applies when astatus=pausedsubscription is resumed, not when payment collection is resumed.customer.subscription.trial_will_endOccurs three days before a subscription’s trial period is scheduled to end, or when a trial is ended immediately (usingtrial_end=now).customer.subscription.updatedOccurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).customer.tax_id.createdOccurs whenever a tax ID is created for a customer.customer.tax_id.deletedOccurs whenever a tax ID is deleted from a customer.customer.tax_id.updatedOccurs whenever a customer’s tax ID is updated.customer.updatedOccurs whenever any property of a customer changes.customer_cash_balance_transaction.createdOccurs whenever a new customer cash balance transactions is created.entitlements.active_entitlement_summary.updatedOccurs whenever a customer’s entitlements change.file.createdOccurs whenever a new Stripe-generated file is available for your account.financial_connections.account.account_numbers_updatedOccurs when a Financial Connections account’s account numbers are updated.financial_connections.account.createdOccurs when a new Financial Connections account is created.financial_connections.account.deactivatedOccurs when a Financial Connections account’s status is updated fromactivetoinactive.financial_connections.account.disconnectedOccurs when a Financial Connections account is disconnected.financial_connections.account.reactivatedOccurs when a Financial Connections account’s status is updated frominactivetoactive.financial_connections.account.refreshed_balanceOccurs when an Account’sbalance_refreshstatus transitions frompendingto eithersucceededorfailed.financial_connections.account.refreshed_ownershipOccurs when an Account’sownership_refreshstatus transitions frompendingto eithersucceededorfailed.financial_connections.account.refreshed_transactionsOccurs when an Account’stransaction_refreshstatus transitions frompendingto eithersucceededorfailed.financial_connections.account.upcoming_account_number_expiryOccurs when an Account’s tokenized account number is about to expire.identity.verification_session.canceledOccurs whenever a VerificationSession is canceledidentity.verification_session.createdOccurs whenever a VerificationSession is createdidentity.verification_session.processingOccurs whenever a VerificationSession transitions to processingidentity.verification_session.redactedOccurs whenever a VerificationSession is redacted.identity.verification_session.requires_inputOccurs whenever a VerificationSession transitions to require user inputidentity.verification_session.verifiedOccurs whenever a VerificationSession transitions to verifiedinvoice.createdOccurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see Using Webhooks with Subscriptions.invoice.deletedOccurs whenever a draft invoice is deleted. Note: This event is not sent for invoice previews.invoice.finalization_failedOccurs whenever a draft invoice cannot be finalized. See the invoice’s last finalization error for details.invoice.finalizedOccurs whenever a draft invoice is finalized and updated to be an open invoice.invoice.marked_uncollectibleOccurs whenever an invoice is marked uncollectible.invoice.overdueOccurs X number of days after an invoice becomes due - where X is determined by Automationsinvoice.overpaidOccurs when an invoice transitions to paid with a non-zero amount_overpaid.invoice.paidOccurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.invoice.payment_action_requiredOccurs whenever an invoice payment attempt requires further user action to complete.invoice.payment_attempt_requiredOccurs when an invoice requires a payment using a payment method that cannot be processed by Stripe.invoice.payment_failedOccurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method.invoice.payment_succeededOccurs whenever an invoice payment attempt succeeds.invoice.sentOccurs whenever an invoice email is sent out.invoice.upcomingOccurs X number of days before a subscription is scheduled to create an invoice that is automatically charged - where X is determined by your subscriptions settings. Note: The receivedInvoiceobject will not have an invoice ID.invoice.updatedOccurs whenever an invoice changes (e.g., the invoice amount).invoice.voidedOccurs whenever an invoice is voided.invoice.will_be_dueOccurs X number of days before an invoice becomes due - where X is determined by Automationsinvoice_payment.paidOccurs when an InvoicePayment is successfully paid.invoiceitem.createdOccurs whenever an invoice item is created.invoiceitem.deletedOccurs whenever an invoice item is deleted.issuing_authorization.createdOccurs whenever an authorization is created.issuing_authorization.requestRepresents a synchronous request for authorization, see Using your integration to handle authorization requests.issuing_authorization.updatedOccurs whenever an authorization is updated.issuing_card.createdOccurs whenever a card is created.issuing_card.updatedOccurs whenever a card is updated.issuing_cardholder.createdOccurs whenever a cardholder is created.issuing_cardholder.updatedOccurs whenever a cardholder is updated.issuing_dispute.closedOccurs whenever a dispute is won, lost or expired.issuing_dispute.createdOccurs whenever a dispute is created.issuing_dispute.funds_reinstatedOccurs whenever funds are reinstated to your account for an Issuing dispute.issuing_dispute.funds_rescindedOccurs whenever funds are deducted from your account for an Issuing dispute.issuing_dispute.submittedOccurs whenever a dispute is submitted.issuing_dispute.updatedOccurs whenever a dispute is updated.issuing_personalization_design.activatedOccurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it.issuing_personalization_design.deactivatedOccurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it.issuing_personalization_design.rejectedOccurs whenever a personalization design is rejected by design review.issuing_personalization_design.updatedOccurs whenever a personalization design is updated.issuing_token.createdOccurs whenever an issuing digital wallet token is created.issuing_token.updatedOccurs whenever an issuing digital wallet token is updated.issuing_transaction.createdOccurs whenever an issuing transaction is created.issuing_transaction.purchase_details_receipt_updatedOccurs whenever an issuing transaction is updated with receipt data.issuing_transaction.updatedOccurs whenever an issuing transaction is updated.mandate.updatedOccurs whenever a Mandate is updated.payment_intent.amount_capturable_updatedOccurs when a PaymentIntent has funds to be captured. Check theamount_capturableproperty on the PaymentIntent to determine the amount that can be captured. You may capture the PaymentIntent with anamount_to_capturevalue up to the specified amount. Learn more about capturing PaymentIntents.payment_intent.canceledOccurs when a PaymentIntent is canceled.payment_intent.createdOccurs when a new PaymentIntent is created.payment_intent.partially_fundedOccurs when funds are applied to a customer_balance PaymentIntent and the ‘amount_remaining’ changes.payment_intent.payment_failedOccurs when a PaymentIntent has failed the attempt to create a payment method or a payment.payment_intent.processingOccurs when a PaymentIntent has started processing.payment_intent.requires_actionOccurs when a PaymentIntent transitions to requires_action statepayment_intent.succeededOccurs when a PaymentIntent has successfully completed payment.payment_link.createdOccurs when a payment link is created.payment_link.updatedOccurs when a payment link is updated.payment_method.attachedOccurs whenever a new payment method is attached to a customer.payment_method.automatically_updatedOccurs whenever a payment method’s details are automatically updated by the network.payment_method.detachedOccurs whenever a payment method is detached from a customer.payment_method.updatedOccurs whenever a payment method is updated via the PaymentMethod update API.payout.canceledOccurs whenever a payout is canceled.payout.createdOccurs whenever a payout is created.payout.failedOccurs whenever a payout attempt fails.payout.paidOccurs whenever a payout is expected to be available in the destination account. If the payout fails, apayout.failednotification is also sent, at a later time.payout.reconciliation_completedOccurs whenever balance transactions paid out in an automatic payout can be queried.payout.updatedOccurs whenever a payout is updated.person.createdOccurs whenever a person associated with an account is created.person.deletedOccurs whenever a person associated with an account is deleted.person.updatedOccurs whenever a person associated with an account is updated.plan.createdOccurs whenever a plan is created.plan.deletedOccurs whenever a plan is deleted.plan.updatedOccurs whenever a plan is updated.price.createdOccurs whenever a price is created.price.deletedOccurs whenever a price is deleted.price.updatedOccurs whenever a price is updated.product.createdOccurs whenever a product is created.product.deletedOccurs whenever a product is deleted.product.updatedOccurs whenever a product is updated.promotion_code.createdOccurs whenever a promotion code is created.promotion_code.updatedOccurs whenever a promotion code is updated.quote.acceptedOccurs whenever a quote is accepted.quote.canceledOccurs whenever a quote is canceled.quote.createdOccurs whenever a quote is created.quote.finalizedOccurs whenever a quote is finalized.radar.early_fraud_warning.createdOccurs whenever an early fraud warning is created.radar.early_fraud_warning.updatedOccurs whenever an early fraud warning is updated.refund.createdOccurs whenever a refund is created.refund.failedOccurs whenever a refund has failed.refund.updatedOccurs whenever a refund is updated.reporting.report_run.failedOccurs whenever a requestedReportRunfailed to complete.reporting.report_run.succeededOccurs whenever a requestedReportRuncompleted successfully.reporting.report_type.updatedOccurs whenever aReportTypeis updated (typically to indicate that a new day’s data has come available).reserve.hold.createdOccurs when a reserve hold is created.reserve.hold.updatedOccurs when a reserve hold is updated.reserve.plan.createdOccurs when a reserve plan is created.reserve.plan.disabledOccurs when a reserve plan is disabled.reserve.plan.expiredOccurs when a reserve plan expires.reserve.plan.updatedOccurs when a reserve plan is updated.reserve.release.createdOccurs when a reserve release is created.review.closedOccurs whenever a review is closed. The review’sreasonfield indicates why:approved,disputed,refunded,refunded_as_fraud, orcanceled.review.openedOccurs whenever a review is opened.setup_intent.canceledOccurs when a SetupIntent is canceled.setup_intent.createdOccurs when a new SetupIntent is created.setup_intent.requires_actionOccurs when a SetupIntent is in requires_action state.setup_intent.setup_failedOccurs when a SetupIntent has failed the attempt to setup a payment method.setup_intent.succeededOccurs when an SetupIntent has successfully setup a payment method.sigma.scheduled_query_run.createdOccurs whenever a Sigma scheduled query run finishes.source.canceledOccurs whenever a source is canceled.source.chargeableOccurs whenever a source transitions to chargeable.source.failedOccurs whenever a source fails.source.mandate_notificationOccurs whenever a source mandate notification method is set to manual.source.refund_attributes_requiredOccurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment.source.transaction.createdOccurs whenever a source transaction is created.source.transaction.updatedOccurs whenever a source transaction is updated.subscription_schedule.abortedOccurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency.subscription_schedule.canceledOccurs whenever a subscription schedule is canceled.subscription_schedule.completedOccurs whenever a new subscription schedule is completed.subscription_schedule.createdOccurs whenever a new subscription schedule is created.subscription_schedule.expiringOccurs 7 days before a subscription schedule will expire.subscription_schedule.releasedOccurs whenever a new subscription schedule is released.subscription_schedule.updatedOccurs whenever a subscription schedule is updated.tax.settings.updatedOccurs whenever tax settings is updated.tax_rate.createdOccurs whenever a new tax rate is created.tax_rate.updatedOccurs whenever a tax rate is updated.terminal.reader.action_failedOccurs whenever an action sent to a Terminal reader failed.terminal.reader.action_succeededOccurs whenever an action sent to a Terminal reader was successful.terminal.reader.action_updatedOccurs whenever an action sent to a Terminal reader is updated.test_helpers.test_clock.advancingOccurs whenever a test clock starts advancing.test_helpers.test_clock.createdOccurs whenever a test clock is created.test_helpers.test_clock.deletedOccurs whenever a test clock is deleted.test_helpers.test_clock.internal_failureOccurs whenever a test clock fails to advance its frozen time.test_helpers.test_clock.readyOccurs whenever a test clock transitions to a ready status.topup.canceledOccurs whenever a top-up is canceled.topup.createdOccurs whenever a top-up is created.topup.failedOccurs whenever a top-up fails.topup.reversedOccurs whenever a top-up is reversed.topup.succeededOccurs whenever a top-up succeeds.transfer.createdOccurs whenever a transfer is created.transfer.reversedOccurs whenever a transfer is reversed, including partial reversals.transfer.updatedOccurs whenever a transfer’s description or metadata is updated.
metadata(object, optional) Set of key-value pairs 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 tometadata.url(string, optional) The URL of the webhook endpoint.
curl
curl https://api.stripe.com/v1/webhook_endpoints/{{WEBHOOK_ENDPOINT_ID}} \
-u "<<YOUR_SECRET_KEY>>" \
-d "enabled_events[]=charge.succeeded" \
-d "enabled_events[]=charge.failed" \
--data-urlencode "url=https://example.com/new_endpoint"Response ​
json
{
"id": "we_1Mr5jULkdIwHu7ix1ibLTM0x",
"object": "webhook_endpoint",
"api_version": null,
"application": null,
"created": 1680122196,
"description": null,
"enabled_events": [
"charge.succeeded",
"charge.failed"
],
"livemode": false,
"metadata": {},
"status": "disabled",
"url": "https://example.com/new_endpoint"
}