● Provider proxy · /v1

Provider proxy

Forward your raw request to a named provider, substituting vaulted card data on the way through. For provider-specific features Baton has not abstracted yet.

Proxy a read to a provider

GET /v1/proxy/{connector_code}/{path}

For provider-specific read endpoints (look up an order, check a refund). No body, no idempotency key needed.

Path parameters

connector_coderequired string
pathrequired string
Request
curl -X GET https://api.baton.example/v1/proxy/{connector_code}/{path} \
  -H "Authorization: Bearer sk_live_xxx"

Proxy to a provider

POST /v1/proxy/{connector_code}/{path}

For provider-specific features Baton has not abstracted yet. We do exactly two things: substitute real card data for the vault token, and sign and forward the request. The response comes back untouched, with no unified mapping.

The cost: proxied calls do not appear in unified reporting, do not take part in cascading, and are excluded from auth-rate figures. If a standard endpoint can do it, use the standard endpoint.

Path parameters

connector_coderequired string
pathrequired string The provider-side path, appended verbatim

Headers

Idempotency-Keyrequired string A unique string you generate (UUID/ULID recommended). Replaying the same key within 24 hours returns the original result and never creates a second payment.
X-Proxy-Method POST | PUT | PATCH | DELETE The verb used when forwarding to the provider. Our own public API exposes only GET and POST; when a provider requires PUT / PATCH / DELETE, name it here. Defaults to POST
Request
curl -X POST https://api.baton.example/v1/proxy/{connector_code}/{path} \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Idempotency-Key: 01J8ZQ4T7M2K9F3B" \
  -H "X-Timestamp: 1763280000" -H "X-Nonce: 7f3a" -H "X-Signature: v1=..." \
  -H "Content-Type: application/json" \
  -d '{
  "amount": {
    "value": 8900,
    "currency": "USD"
  },
  "paymentMethod": {
    "type": "scheme",
    "number": "{{pm_7c2a91f4.number}}"
  }
}'