code
stringlengths
34
10.1k
nl
stringlengths
52
6.18k
import stripe stripe.api_key = "sk_test_your_key" stripe.WebhookEndpoint.modify( "we_1LSdif2eZvKYlo2CBeXfpCQI", url="https://example.com/new_endpoint", ) '''Response { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1659518305, "description": "This is my webhook, I like it a lot", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/new_endpoint" }'''
Update a webhook endpointUpdates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.Parameters description optional An optional description of what the webhook is used for. enabled_events optional enum The list of events to enable for this endpoint. You may specify [’*’] to enable all events, except those that require explicit selection.Possible enum valuesaccount.updated Occurs whenever an account status or property has changed.account.application.authorized Occurs whenever a user authorizes an application. Sent to the related application only.account.application.deauthorized Occurs whenever a user deauthorizes an application. Sent to the related application only.account.external_account.created Occurs whenever an external account is created.account.external_account.deleted Occurs whenever an external account is deleted.account.external_account.updated Occurs whenever an external account is updated.application_fee.created Occurs whenever an application fee is created on a charge.Show 182 more metadata optional dictionary 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 to metadata. url optional The URL of the webhook endpoint.More parametersExpand all disabled optional ReturnsThe updated webhook endpoint object if successful. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.WebhookEndpoint.list(limit=3) '''Response { "object": "list", "url": "/v1/webhook_endpoints", "has_more": false, "data": [ { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1659518305, "description": "This is my webhook, I like it a lot", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/my/webhook/endpoint" }, {...}, {...} ] }'''
List all webhook endpointsReturns a list of your webhook endpoints.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit webhook endpoints, starting after webhook endpoint starting_after. Each entry in the array is a separate webhook endpoint object. If no more webhook endpoints are available, the resulting array will be empty. This request should never raise an error
import stripe stripe.api_key = "sk_test_your_key" stripe.WebhookEndpoint.delete( "we_1LSdif2eZvKYlo2CBeXfpCQI", ) '''Response { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "deleted": true }'''
Delete a webhook endpointYou can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.ParametersNo parameters.ReturnsAn object with the deleted webhook endpoints’s ID. Otherwise, this call raises an error, such as if the webhook endpoint has already been deleted