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_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static WebhookEndpoint
create
(WebhookEndpointCreateParams params) A webhook endpoint must have aurl
and a list ofenabled_events
.static WebhookEndpoint
create
(WebhookEndpointCreateParams params, RequestOptions options) A webhook endpoint must have aurl
and a list ofenabled_events
.static WebhookEndpoint
A webhook endpoint must have aurl
and a list ofenabled_events
.static WebhookEndpoint
create
(Map<String, Object> params, RequestOptions options) A webhook endpoint must have aurl
and 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.boolean
The 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 valuetrue
if the object exists in live mode or the valuefalse
if 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.int
hashCode()
static WebhookEndpointCollection
list
(WebhookEndpointListParams params) Returns a list of your webhook endpoints.static WebhookEndpointCollection
list
(WebhookEndpointListParams params, RequestOptions options) Returns a list of your webhook endpoints.static WebhookEndpointCollection
Returns a list of your webhook endpoints.static WebhookEndpointCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of your webhook endpoints.static WebhookEndpoint
Retrieves the webhook endpoint with the given ID.static WebhookEndpoint
retrieve
(String webhookEndpoint, RequestOptions options) Retrieves the webhook endpoint with the given ID.static WebhookEndpoint
retrieve
(String webhookEndpoint, WebhookEndpointRetrieveParams params, RequestOptions options) Retrieves the webhook endpoint with the given ID.static WebhookEndpoint
Retrieves the webhook endpoint with the given ID.void
setApiVersion
(String apiVersion) The API version events are rendered as for this webhook endpoint.void
setApplication
(String application) The ID of the associated Connect application.void
setCreated
(Long created) Time at which the object was created.void
setDeleted
(Boolean deleted) Always true for a deleted object.void
setDescription
(String description) An optional description of what the webhook is used for.void
setEnabledEvents
(List<String> enabledEvents) The list of events to enable for this endpoint.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
The endpoint's secret, used to generate webhook signatures.void
The status of the webhook.void
The 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, setResponseGetter, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
WebhookEndpoint
public WebhookEndpoint()
-
-
Method Details
-
create
A webhook endpoint must have aurl
and a list ofenabled_events
. You may optionally specify the Booleanconnect
parameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurl
about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurl
only 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 aurl
and a list ofenabled_events
. You may optionally specify the Booleanconnect
parameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurl
about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurl
only 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 aurl
and a list ofenabled_events
. You may optionally specify the Booleanconnect
parameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurl
about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurl
only 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 aurl
and a list ofenabled_events
. You may optionally specify the Booleanconnect
parameter. If set to true, then a Connect webhook endpoint that notifies the specifiedurl
about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specifiedurl
only 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:
update
in 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:
update
in 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 valuetrue
if the object exists in live mode or the valuefalse
if 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 beenabled
ordisabled
. -
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 valuetrue
if the object exists in live mode or the valuefalse
if 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 beenabled
ordisabled
. -
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:
getMetadata
in interfaceMetadataStore<WebhookEndpoint>
-