Package com.stripe.model.forwarding
Class Request
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.forwarding.Request
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
Instructs Stripe to make a request on your behalf using the destination URL. The destination URL
is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials
provided during onboarding, and injects card details from the payment_method into the request.
Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, before storing the request and response data in the forwarding Request object, which are subject to a 30-day retention period.
You can provide a Stripe idempotency key to make sure that requests with the same key result in only one outbound request. The Stripe idempotency key provided should be unique and different from any idempotency keys provided on the underlying third-party request.
Forwarding Requests are synchronous requests that return a response or time out according to Stripe’s limits.
Related guide: Forward card details to third-party API endpoints.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Metadata about the forwarded request.static class
Details about the request forwarded to the destination endpoint.static class
Details about the response from the destination endpoint.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 Request
create
(RequestCreateParams params) Creates a ForwardingRequest object.static Request
create
(RequestCreateParams params, RequestOptions options) Creates a ForwardingRequest object.static Request
Creates a ForwardingRequest object.static Request
create
(Map<String, Object> params, RequestOptions options) Creates a ForwardingRequest object.boolean
Time at which the object was created.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.String representing the object's type.The PaymentMethod to insert into the forwarded request.The field kinds to be replaced in the forwarded request.Context about the request from Stripe's servers to the destination endpoint.The request that was sent to the destination endpoint.The response that the destination endpoint returned to us.getUrl()
The destination URL for the forwarded request.int
hashCode()
static RequestCollection
list
(RequestListParams params) Lists all ForwardingRequest objects.static RequestCollection
list
(RequestListParams params, RequestOptions options) Lists all ForwardingRequest objects.static RequestCollection
Lists all ForwardingRequest objects.static RequestCollection
list
(Map<String, Object> params, RequestOptions options) Lists all ForwardingRequest objects.static Request
Retrieves a ForwardingRequest object.static Request
retrieve
(String id, RequestOptions options) Retrieves a ForwardingRequest object.static Request
retrieve
(String id, RequestRetrieveParams params, RequestOptions options) Retrieves a ForwardingRequest object.static Request
Retrieves a ForwardingRequest object.void
setCreated
(Long created) Time at which the object was created.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
String representing the object's type.void
setPaymentMethod
(String paymentMethod) The PaymentMethod to insert into the forwarded request.void
setReplacements
(List<String> replacements) The field kinds to be replaced in the forwarded request.void
setRequestContext
(Request.RequestContext requestContext) Context about the request from Stripe's servers to the destination endpoint.void
setRequestDetails
(Request.RequestDetails requestDetails) The request that was sent to the destination endpoint.void
setResponseDetails
(Request.ResponseDetails responseDetails) The response that the destination endpoint returned to us.void
setResponseGetter
(StripeResponseGetter responseGetter) The header value.void
The destination URL for the forwarded request.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, 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
-
Request
public Request()
-
-
Method Details
-
create
Creates a ForwardingRequest object.- Throws:
StripeException
-
create
public static Request create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a ForwardingRequest object.- Throws:
StripeException
-
create
Creates a ForwardingRequest object.- Throws:
StripeException
-
create
public static Request create(RequestCreateParams params, RequestOptions options) throws StripeException Creates a ForwardingRequest object.- Throws:
StripeException
-
list
Lists all ForwardingRequest objects.- Throws:
StripeException
-
list
public static RequestCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionLists all ForwardingRequest objects.- Throws:
StripeException
-
list
Lists all ForwardingRequest objects.- Throws:
StripeException
-
list
public static RequestCollection list(RequestListParams params, RequestOptions options) throws StripeException Lists all ForwardingRequest objects.- Throws:
StripeException
-
retrieve
Retrieves a ForwardingRequest object.- Throws:
StripeException
-
retrieve
Retrieves a ForwardingRequest object.- Throws:
StripeException
-
retrieve
public static Request retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a ForwardingRequest object.- Throws:
StripeException
-
retrieve
public static Request retrieve(String id, RequestRetrieveParams params, RequestOptions options) throws StripeException Retrieves a ForwardingRequest object.- Throws:
StripeException
-
setResponseGetter
The header value.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
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
forwarding.request
. -
getPaymentMethod
The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. -
getReplacements
The field kinds to be replaced in the forwarded request. -
getRequestContext
Context about the request from Stripe's servers to the destination endpoint. -
getRequestDetails
The request that was sent to the destination endpoint. We redact any sensitive fields. -
getResponseDetails
The response that the destination endpoint returned to us. We redact any sensitive fields. -
getUrl
The destination URL for the forwarded request. Must be supported by the config. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
forwarding.request
. -
setPaymentMethod
The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. -
setReplacements
The field kinds to be replaced in the forwarded request. -
setRequestContext
Context about the request from Stripe's servers to the destination endpoint. -
setRequestDetails
The request that was sent to the destination endpoint. We redact any sensitive fields. -
setResponseDetails
The response that the destination endpoint returned to us. We redact any sensitive fields. -
setUrl
The destination URL for the forwarded request. Must be supported by the config. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-