It is possible to use a Vault Forward directly with a checkout session and Secure Fields.
This is especially useful when you don’t want to create a payment method, or when you want to collect
a CVV for a payment method.
To forward a security code (CVV) for a stored card, create a checkout session and use it with Secure Fields to
collect the security code. More information on this can be found in the Secure Fields guide on this topic.Once you’ve collected the security code, you can forward all the card details using the checkout session as described below.
Vault Forward uses request headers to select the payment method to forward data for,
what endpoint to send the request to, and any additional other settings.
x-vault-forward-url - the HTTPS URL to forward the request to. Its host must have been enabled if the request is in a production environment.
x-vault-forward-http-method - the HTTP method to use when forwarding the request. The accepted values are POST, PUT and PATCH.
x-vault-forward-checkout-session - the ID for a checkout session. At most 1 ID can be provided and if set x-vault-forward-payment-methods can be omitted. This can be used to forward the security code of a card.
x-vault-forward-header-{HEADER_NAME} - each header value to forward in the request. For example, to forward an authorization header to the endpoints, it should be set as x-vault-forward-header-authorization.
x-vault-forward-timeout (optional) - a timeout for the forwarded request. The default is 30 seconds.
The request payload should contain the body which you want to forward to the third-party endpoint. It could be constructed in any format, for example JSON, or XML.To forward vaulted data there are a set of placeholders that can be used as placeholders, using the {{ PLACEHOLDER }} syntax.
CARD_NUMBER_1: The number for a card to forward.
CARD_EXPIRATION_DATE_1: The expiration date for a card to forward.
CARD_EXPIRATION_DATE_M_1: The expiration date’s month as a non-zero-padded decimal number. Example: 1, 2, ..., 12.
CARD_EXPIRATION_DATE_MM_1: The expiration date’s month as zero-padded decimal number. Example: 01, 02, ..., 12.
CARD_EXPIRATION_DATE_YY_1: The expiration date’s year without century as a zero-padded decimal number. Example: 00, 01, ..., 99.
CARD_EXPIRATION_DATE_YYYY_1: The expiration date’s year with century as a decimal number. Example: 2013, 2014, ..., 9998, 9999.
The if/else template statement applies simple conditional logic to your template.
This is particularly useful when you need to handle empty values, such as setting them to null within a JSON template.
The or template statement outputs one value, or falls back to another if the first one is empty.
Copy
Ask AI
{ "authentication_response": "{{CARD_3DS_AUTHENTICATION_RESPONSE_1 or CARD_3DS_DIRECTORY_RESPONSE_1}}", "scheme": "{{CARD_3DS_SCHEME_1 or "No scheme"}}"}
This is useful when prioritizing a specific value but providing a default or alternative if the primary value is missing.