Package com.stripe.model
Class WebhookEndpoint
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.WebhookEndpoint
- All Implemented Interfaces:
HasId,MetadataStore<WebhookEndpoint>,StripeActiveObject,StripeObjectInterface
You can configure webhook endpoints via the API
to be notified about events that happen in your Stripe account or connected accounts.
Most users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints.
Related guide: Setting up webhooks
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic WebhookEndpointcreate(WebhookEndpointCreateParams params) A webhook endpoint must have aurland a list ofenabled_events.static WebhookEndpointcreate(WebhookEndpointCreateParams params, RequestOptions options) A webhook endpoint must have aurland a list ofenabled_events.static WebhookEndpointA webhook endpoint must have aurland a list ofenabled_events.static WebhookEndpointcreate(Map<String, Object> params, RequestOptions options) A webhook endpoint must have aurland a list ofenabled_events.delete()You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.delete(RequestOptions options) You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.delete(Map<String, Object> params, RequestOptions options) You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.booleanThe API version events are rendered as for this webhook endpoint.The ID of the associated Connect application.Time at which the object was created.Always true for a deleted object.An optional description of what the webhook is used for.The list of events to enable for this endpoint.getId()Unique identifier for the object.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The endpoint's secret, used to generate webhook signatures.The status of the webhook.getUrl()The URL of the webhook endpoint.inthashCode()static WebhookEndpointCollectionlist(WebhookEndpointListParams params) Returns a list of your webhook endpoints.static WebhookEndpointCollectionlist(WebhookEndpointListParams params, RequestOptions options) Returns a list of your webhook endpoints.static WebhookEndpointCollectionReturns a list of your webhook endpoints.static WebhookEndpointCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your webhook endpoints.static WebhookEndpointRetrieves the webhook endpoint with the given ID.static WebhookEndpointretrieve(String webhookEndpoint, RequestOptions options) Retrieves the webhook endpoint with the given ID.static WebhookEndpointretrieve(String webhookEndpoint, WebhookEndpointRetrieveParams params, RequestOptions options) Retrieves the webhook endpoint with the given ID.static WebhookEndpointRetrieves the webhook endpoint with the given ID.voidsetApiVersion(String apiVersion) The API version events are rendered as for this webhook endpoint.voidsetApplication(String application) The ID of the associated Connect application.voidsetCreated(Long created) Time at which the object was created.voidsetDeleted(Boolean deleted) Always true for a deleted object.voidsetDescription(String description) An optional description of what the webhook is used for.voidsetEnabledEvents(List<String> enabledEvents) The list of events to enable for this endpoint.voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidThe endpoint's secret, used to generate webhook signatures.voidThe status of the webhook.voidThe URL of the webhook endpoint.update(WebhookEndpointUpdateParams params) Updates the webhook endpoint.update(WebhookEndpointUpdateParams params, RequestOptions options) Updates the webhook endpoint.Updates the webhook endpoint.update(Map<String, Object> params, RequestOptions options) Updates the webhook endpoint.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, setResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
WebhookEndpoint
public WebhookEndpoint()
-
-
Method Details
-
create
A webhook endpoint must have aurland a list ofenabled_events. You may optionally specify the Booleanconnectparameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurlabout events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurlonly about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.- Throws:
StripeException
-
create
public static WebhookEndpoint create(Map<String, Object> params, RequestOptions options) throws StripeExceptionA webhook endpoint must have aurland a list ofenabled_events. You may optionally specify the Booleanconnectparameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurlabout events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurlonly about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.- Throws:
StripeException
-
create
A webhook endpoint must have aurland a list ofenabled_events. You may optionally specify the Booleanconnectparameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurlabout events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurlonly about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.- Throws:
StripeException
-
create
public static WebhookEndpoint create(WebhookEndpointCreateParams params, RequestOptions options) throws StripeException A webhook endpoint must have aurland a list ofenabled_events. You may optionally specify the Booleanconnectparameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurlabout events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurlonly about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.- Throws:
StripeException
-
delete
You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.- Throws:
StripeException
-
delete
You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.- Throws:
StripeException
-
delete
You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.- Throws:
StripeException
-
delete
public WebhookEndpoint delete(Map<String, Object> params, RequestOptions options) throws StripeExceptionYou can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.- Throws:
StripeException
-
list
Returns a list of your webhook endpoints.- Throws:
StripeException
-
list
public static WebhookEndpointCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your webhook endpoints.- Throws:
StripeException
-
list
public static WebhookEndpointCollection list(WebhookEndpointListParams params) throws StripeException Returns a list of your webhook endpoints.- Throws:
StripeException
-
list
public static WebhookEndpointCollection list(WebhookEndpointListParams params, RequestOptions options) throws StripeException Returns a list of your webhook endpoints.- Throws:
StripeException
-
retrieve
Retrieves the webhook endpoint with the given ID.- Throws:
StripeException
-
retrieve
public static WebhookEndpoint retrieve(String webhookEndpoint, RequestOptions options) throws StripeException Retrieves the webhook endpoint with the given ID.- Throws:
StripeException
-
retrieve
public static WebhookEndpoint retrieve(String webhookEndpoint, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the webhook endpoint with the given ID.- Throws:
StripeException
-
retrieve
public static WebhookEndpoint retrieve(String webhookEndpoint, WebhookEndpointRetrieveParams params, RequestOptions options) throws StripeException Retrieves the webhook endpoint with the given ID.- Throws:
StripeException
-
update
Updates the webhook endpoint. You may edit theurl, the list ofenabled_events, and the status of your endpoint.- Specified by:
updatein interfaceMetadataStore<WebhookEndpoint>- Throws:
StripeException
-
update
public WebhookEndpoint update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates the webhook endpoint. You may edit theurl, the list ofenabled_events, and the status of your endpoint.- Specified by:
updatein interfaceMetadataStore<WebhookEndpoint>- Throws:
StripeException
-
update
Updates the webhook endpoint. You may edit theurl, the list ofenabled_events, and the status of your endpoint.- Throws:
StripeException
-
update
public WebhookEndpoint update(WebhookEndpointUpdateParams params, RequestOptions options) throws StripeException Updates the webhook endpoint. You may edit theurl, the list ofenabled_events, and the status of your endpoint.- Throws:
StripeException
-
getApiVersion
The API version events are rendered as for this webhook endpoint. -
getApplication
The ID of the associated Connect application. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getDeleted
Always true for a deleted object. -
getDescription
An optional description of what the webhook is used for. -
getEnabledEvents
The list of events to enable for this endpoint.['*']indicates that all events are enabled, except those that require explicit selection. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
webhook_endpoint. -
getSecret
The endpoint's secret, used to generate webhook signatures. Only returned at creation. -
getStatus
The status of the webhook. It can beenabledordisabled. -
getUrl
The URL of the webhook endpoint. -
setApiVersion
The API version events are rendered as for this webhook endpoint. -
setApplication
The ID of the associated Connect application. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setDeleted
Always true for a deleted object. -
setDescription
An optional description of what the webhook is used for. -
setEnabledEvents
The list of events to enable for this endpoint.['*']indicates that all events are enabled, except those that require explicit selection. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMetadata
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
webhook_endpoint. -
setSecret
The endpoint's secret, used to generate webhook signatures. Only returned at creation. -
setStatus
The status of the webhook. It can beenabledordisabled. -
setUrl
The URL of the webhook endpoint. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
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.- Specified by:
getMetadatain interfaceMetadataStore<WebhookEndpoint>
-