POST
/v1/forwarding/requestsCreate a forwarding request
Creates a ForwardingRequest that sends a request to a configured destination URL on your behalf. Supply payment_method, replacements, and url, and optionally provide request headers, a body, metadata, or response expansions. The forwarding request inserts the payment method into the destination request and replaces the selected sensitive field kinds.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Form-encoded forwarding request details, including the destination and the data to send.
expandarray<string>optional
Specifies which fields in the response should be expanded.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) 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`.
payment_methodstringrequired
The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
replacementsarray<string>required
The field kinds to be replaced in the forwarded request.
requestobjectoptional
The request body and headers to be sent to the destination endpoint.
urlstringrequired
The destination URL for the forwarded request. Must be supported by the config.
200Returns the created ForwardingRequest, including its identifier, destination URL, payment method, replacements, and forwarding request and response details.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
payment_methodstringrequired
The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
replacementsarray<string>required
The field kinds to be replaced in the forwarded request.
request_contextobjectoptional
Context about the request from Stripe's servers to the destination endpoint.
request_detailsobjectoptional
The request that was sent to the destination endpoint. We redact any sensitive fields.
response_detailsobjectoptional
The response that the destination endpoint returned to us. We redact any sensitive fields.
urlstringoptional
The destination URL for the forwarded request. Must be supported by the config.
defaultReturned when the request cannot be processed; the response contains an error object with an error type and related details.
errorobjectrequired
Error handling
payment_method, replacements, and url are required. replacements must contain only card_cvc, card_expiry, card_number, cardholder_name, or request_signature, and url must be supported by the configuration.