Skip to Content
Docs

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:

For a walkthrough, see Forward cards to another provider.

Hosts

The API has one host for each environment.

EnvironmentBase URL
Sandboxhttps://forward.sandbox.pay.com/v1
Livehttps://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.

PrefixResource
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 stateBehavior
Completed (provider reached or uncertain)Returns the original tokenized and redacted response with x-pay-com-idempotent-replayed: true without forwarding again.
Rejected before forwardingReleases the key so a new attempt is forwarded.
In progressReturns 409 with idempotency_in_flight. Retry after the number of seconds in Retry-After.
Reused with a different payloadReturns 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.

WhatLimit
Request body5 MB, also after the placeholders are filled
Provider's reply5 MB
Time for the provider to respond30 seconds, or up to 120 seconds for a destination Pay.com set up for it
Connecting to the provider5 seconds
URL4,096 characters
Headers64, each value up to 8,192 characters
JSON body depth32 levels
Placeholders256 for each request
pm_card_ IDs10 for each request
response.tokenize, response.redact32 and 64 paths
RateLimited per account and per destination. Requests over the limit return 429
Idempotency keysKept 24 hours
Forward recordsKept 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.
Was this page helpful?