Vault forwarding API
The forward.pay.com API. Send a provider's request with card data from the Pay.com vault filled in, and get the provider's response.
The Vault forwarding API sends a provider's request with card data from the Pay.com vault filled in, and returns the provider's response. It has its own host and three resources:
- Destinations: the provider endpoints you may forward to.
- Credentials: your secrets for a provider.
- Forward requests: the requests themselves, written with placeholders.
For a walkthrough, see Forward cards to another provider.
Hosts
The API has one host for each environment.
| Environment | Base URL |
|---|---|
| Sandbox | https://forward.sandbox.pay.com/v1 |
| Live | https://forward.pay.com/v1 |
Authentication
Send a Pay.com API key with HTTP Basic auth (the key as the password), as for the rest of the API. Authorization: Bearer with the key is also accepted. Only keys starting with sk-pay-com- are valid. Any other key returns 401 with code: unauthenticated.
A live key scoped to multiple workspaces specifies the target workspace in the Basic auth username. See Choose the workspace.
curl https://forward.sandbox.pay.com/v1/forward_requests/fwd_01JDQ6W2X4Y6Z8A0B2C4D6E8F0 \
-u ':sk-pay-com-sandbox-…'Requests without a key return 401 with code: unauthenticated. Other key errors match the core API. See Authentication errors.
Send request bodies as JSON with Content-Type: application/json.
IDs
Each ID prefix identifies its resource type.
| Prefix | Resource |
|---|---|
fdst_ | Destination |
fcred_ | Credential |
fwd_ | Forward request |
fcert_ | Client certificate for a provider requiring mutual TLS |
tok_card_, pm_card_ | Card saved with Pay.com (token or payment method) |
Idempotency
Send an Idempotency-Key header when you forward a request to make retries safe. Keys must be 1 to 255 printable ASCII characters without spaces and are stored for 24 hours.
| Idempotency key state | Behavior |
|---|---|
| Completed (provider reached or uncertain) | Returns the original tokenized and redacted response with x-pay-com-idempotent-replayed: true without forwarding again. |
| Rejected before forwarding | Releases the key so a new attempt is forwarded. |
| In progress | Returns 409 with idempotency_in_flight. Retry after the number of seconds in Retry-After. |
| Reused with a different payload | Returns 422 with idempotency_key_reused. Generate a new key. |
The CVV
A CVV stays usable for up to 15 minutes after collection. Forwarding deletes it once a request carrying it is sent to the provider (regardless of the provider's response), unless Pay.com configured the destination to reuse CVVs. Requests that don't reach the provider (upstream_sent: false) preserve the CVV for retries. Requesting an expired or already-consumed CVV returns 422 with code: cvc_unavailable.
Limits
Forward requests and the records Pay.com keeps have these limits.
| What | Limit |
|---|---|
| Request body | 5 MB, also after the placeholders are filled |
| Provider's reply | 5 MB |
| Time for the provider to respond | 30 seconds, or up to 120 seconds for a destination Pay.com set up for it |
| Connecting to the provider | 5 seconds |
| URL | 4,096 characters |
| Headers | 64, each value up to 8,192 characters |
| JSON body depth | 32 levels |
| Placeholders | 256 for each request |
pm_card_ IDs | 10 for each request |
response.tokenize, response.redact | 32 and 64 paths |
| Rate | Limited per account and per destination. Requests over the limit return 429 |
| Idempotency keys | Kept 24 hours |
| Forward records | Kept 30 days |
Network
Every forward request reaches the provider from Pay.com's network.
- Pay.com connects only over HTTPS with TLS 1.2 or later and verifies the provider's certificate for the hostname.
- Pay.com resolves the provider's host once, rejects private, internal, and other non-public addresses, and connects directly to the verified IP address.
- Requests leave from fixed Pay.com IP addresses, which a provider can allowlist. Dedicated addresses for your account are available as a paid option.
- For a provider that requires a client certificate, Pay.com generates the key pair and provides a certificate signing request (CSR) for the provider to sign. The private key never leaves Pay.com.