using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/vault-forward");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-vault-forward-payment-methods", "<x-vault-forward-payment-methods>");
request.AddHeader("x-vault-forward-checkout-session", "<x-vault-forward-checkout-session>");
request.AddHeader("x-vault-forward-url", "<x-vault-forward-url>");
request.AddHeader("x-vault-forward-http-method", "<x-vault-forward-http-method>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("\"{\\n \\\"number\\\":\\\"{{CARD_NUMBER_1}}\\\",\\n \\\"expiry\\\":\\\"{{CARD_EXPIRATION_DATE_1}}\\\"\\n}\\n\"", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);"<string>"Forward an API call to a PCI endpoint. The request body is evaluated and any template fields are replaced by the card data before the request is sent to the given destination.
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/vault-forward");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-vault-forward-payment-methods", "<x-vault-forward-payment-methods>");
request.AddHeader("x-vault-forward-checkout-session", "<x-vault-forward-checkout-session>");
request.AddHeader("x-vault-forward-url", "<x-vault-forward-url>");
request.AddHeader("x-vault-forward-http-method", "<x-vault-forward-http-method>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("\"{\\n \\\"number\\\":\\\"{{CARD_NUMBER_1}}\\\",\\n \\\"expiry\\\":\\\"{{CARD_EXPIRATION_DATE_1}}\\\"\\n}\\n\"", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);"<string>"vault-forwards.write scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A comma-separated list of Payment Method IDs that can be used to fill in the request template. At least 1 must be given, and a maximum of 100 are accepted.
"faaad066-30b4-4997-a438-242b0752d7e1,faaad066-30b4-4997-a438-242b0752d7e2"
A Checkout Session IDs that can be used to fill in the request template. At most 1 can be provided.
"faaad066-30b4-4997-a438-242b0752d7e2"
A comma-separated list of IDs for the authentication methods that will be applied to a Vault Forward request.
"faaad066-30b4-4997-a438-242b0752d7e1,faaad066-30b4-4997-a438-242b0752d7e2"
The URL to forward card data to.
"https://api.amadeus.com/booking"
The HTTP method that is used when forwarding the request to the x-vault-forward-url.
POST, PUT, PATCH "POST"
A header that is forwarded to the x-vault-forward-url. The header will be
forwarded without the x-vault-forward-header part. For example,
x-vault-forward-header-x-frame-options: SAMEORIGIN is forwarded as
x-frame-options: SAMEORIGIN.
"x-vault-forward-header-x-frame-options"
The number of seconds to wait before timing out when forwarding the request.
x >= 110
Payload to forward in the request.
The body is of type string.
Returns the payload received from the forwarded request. If the request timed out or there was a network error, the payload will be empty instead.
The response is of type string.
Was this page helpful?