Forward a request to a PSP, substituting vaulted card data
Changed onForwards the request to the host named in X-Target-Host, at the given path, substituting any card placeholders in the body first.
Any additional headers on the request, including the merchant's own PSP credential (for example Authorization), are passed through unchanged. X-Primer-Api-Key authenticates you against Primer.
A placeholder has the form {{<token>.<FIELD>}}, for example {{tok_abc.CARD_NUMBER}}, and is substituted anywhere in the body. A placeholder left unresolved fails the request rather than being forwarded.
The response is the target PSP's response, relayed byte-for-byte, unless the X-Primer-Proxy-Error response header is present, in which case Primer itself raised a fault before or after reaching the PSP. See the default response below for both cases. The proxy never retries a request to the PSP.
Request
- Base URLhttps://proxy.primer.io
- URLhttps://proxy.primer.io/{proxyPath}
- AuthAPI key in header X-Primer-Api-Key
Request body
Response
The target PSP's response, relayed unchanged, unless X-Primer-Proxy-Error is present on the response, in which case the body is a Primer-raised problem document instead (application/problem+json). Known Primer fault statuses: 400 invalid_request, 401 unauthorized, 403 vault_not_enabled, 403 destination_not_allowed, 404 token_not_found, 405 method_not_allowed, 409 token_consumed, 410 token_expired, 413 payload_too_large, 415 unsupported_content_encoding, 422 unresolved_placeholder / unknown_field / field_not_available / card_data_in_request, 502 psp_unreachable, 503 vault_unavailable, 504 psp_timeout. Any other status is the PSP's own.
Changes
- info
endpoint added
- info