# Invoke Forward Proxy

Forwards your request to the destination in the `yuno-proxy-destination-url` header, replacing `{{vaulted_token.<TOKEN>.<field>}}` expressions inside WHITELABEL's secure environment with the data stored under the vaulted token: the card (PAN, expiration, holder name), its network token (DPAN and its expiration), and its network transaction ID (NTID). For destinations that require HMAC-signed requests, send `yuno-proxy-auth` + `yuno-proxy-auth-secret-key` and the proxy signs the resolved body for you. See [Signed destinations](/docs/security-and-compliance/pci-proxy/forward-proxy#signed-destinations-hmac-request-signing) for details. See the [Forward Proxy guide](/docs/security-and-compliance/pci-proxy/forward-proxy) for a step-by-step integration.

<Note>
**Beta**

The PCI Proxy is in beta and is enabled per organization. In production, requests return `403 PRODUCT_NOT_ENABLED` until your organization is activated; contact your Key Account Manager (KAM). The sandbox is open for testing.
</Note>

<Warning>
**Server-side only**

Proxy requests detokenize card data and must only be made from your backend. Never expose your `private-secret-key` in client-side code.
</Warning>

All of `GET`, `POST`, `PUT`, `PATCH`, and `DELETE` are supported: the destination receives the same method you used. Put the complete destination URL, including its path and any query string, in the `yuno-proxy-destination-url` header; a query string on the `/pci-proxy/forward` request itself is rejected. The destination host must be on your [destination allowlist](/docs/security-and-compliance/pci-proxy/allowlist).

If you are a PCI-certified merchant and need the raw card data itself rather than a pass-through call, use [Retrieve Enrolled Payment Method by ID PCI Data](/reference/payment-methods-direct-workflow/retrieve-enrolled-payment-method-by-id-pci-api) instead.

**POST** `/pci-proxy/forward`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Forwards your request to the destination indicated in the `yuno-proxy-destination-url` header, replacing `{{vaulted_token.<TOKEN>.<field>}}` expressions in the body and header values with real card data inside WHITELABEL's PCI DSS Level 1 environment. The destination's status code, headers, and body are returned unchanged. `GET`, `PUT`, `PATCH`, and `DELETE` are also supported and forwarded verbatim. The full destination (including its path and query string) is specified in `yuno-proxy-destination-url`; a query string on the `/pci-proxy/forward` request itself is rejected. Every proxy response carries a `yuno-proxy-request-id` header; a `401` returned before the request reaches the proxy is the only exception.

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Header parameters

- `yuno-proxy-destination-url` (string, required)
  The complete destination URL, including its path and any query string (for example `https://api.example-processor.com/charges/ch_123/capture?expand=true`). Must be a public HTTPS hostname on port 443, and the host must be registered on your destination allowlist; IP addresses and internal networks are rejected. It must not contain `{{vaulted_token...}}` expressions (card data must never appear in a URL).
- `yuno-proxy-timeout` (integer)
  Destination timeout in seconds. Default 30, maximum 120.
- `yuno-account-id` (string)
  Optional account scope. Narrows which allowlisted destinations are permitted for this request; it does not affect token resolution (vaulted tokens are always scoped to your organization). Like all `yuno-*` headers it is removed before forwarding and never reaches the destination.
- `yuno-proxy-auth` (string)
  Signing scheme for destinations that require HMAC request signing over the body. The proxy computes the signature over the resolved body (after expression substitution) and injects the destination's auth headers; your signing secret is used in memory and discarded — nothing is stored. Supported: `DLOCAL_HMAC` (the proxy generates `X-Date` and computes `Authorization: V2-HMAC-SHA256, Signature: <hex>` over `X-Login + X-Date + resolved body`; you send `X-Login`, `X-Trans-Key`, and `X-Version` as normal destination headers). An unknown value — or a `DLOCAL_HMAC` request missing the `X-Login` or `X-Trans-Key` headers — is rejected with `400 INVALID_REQUEST` before the destination is contacted.
- `yuno-proxy-auth-secret-key` (string)
  Your signing secret for this request (required when `yuno-proxy-auth` is present). Like every `yuno-*` header it is stripped before forwarding and excluded from logs.

## Body

Content type: `application/json`

Example:

```json
{
  "amount": 2500,
  "currency": "USD",
  "card": {
    "number": "{{vaulted_token.1a2b3c4d-5678-90ab-cdef-111213141516.number}}",
    "expiration_month": "{{vaulted_token.1a2b3c4d-5678-90ab-cdef-111213141516.expiration_month}}",
    "expiration_year": "{{vaulted_token.1a2b3c4d-5678-90ab-cdef-111213141516.expiration_year}}",
    "holder_name": "{{vaulted_token.1a2b3c4d-5678-90ab-cdef-111213141516.holder_name}}"
  }
}
```

## Responses

### 200

Response from the destination, passed through unchanged (the actual status code is whatever the destination returned; check `yuno-proxy-destination-status`).

Example:

```json
{}
```

### 400

Proxy-originated request error (invalid destination URL, expression problems, invalid timeout, too many tokens, or an invalid signing setup — unknown `yuno-proxy-auth`, missing `yuno-proxy-auth-secret-key`, or `DLOCAL_HMAC` without the `X-Login` or `X-Trans-Key` headers). The `yuno-proxy-destination-status` header is absent because the destination was not called.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 401

Authentication failed. Returned before the request reaches the proxy, so it carries no `yuno-proxy-*` headers.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 403

The destination is not allowed, or the PCI Proxy is not activated for your organization (production only).

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 413

Request body over 1 MB.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 429

Rate limit exceeded for the account (enforced at the WHITELABEL edge).

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 500

Unexpected proxy-side error.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 502

The destination could not be reached, or (when WHITELABEL is configured service-wide to block rather than redact) its response contained card data.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 504

The destination did not respond within the timeout.

- `code` ("NOT_AUTHENTICATED" | "AuthenticationFail" | "INVALID_REQUEST" | "EXPRESSION_RESOLUTION_FAILED" | "INVALID_ACCOUNT_ID" | "DESTINATION_NOT_ALLOWED" | "PRODUCT_NOT_ENABLED" | "REQUEST_TOO_LARGE" | "TOO_MANY_REQUESTS" | "DESTINATION_UNREACHABLE" | "DESTINATION_TIMEOUT" | "RESPONSE_BLOCKED" | "PROXY_ERROR")
  Machine-readable error code.
- `messages` (string[])

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```