Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.

Headers

X-Idempotency-Key
string

Makes the write safe to retry. A repeat with the same key, by the same credential, with the same request within 24 hours returns the original outcome with Idempotent-Replayed: true instead of executing again. 1 to 255 visible ASCII characters, sent once. Must not contain card data. See Idempotency.

Required string length: 1 - 255
Pattern: ^[!-~]+$
Example:

"provision-7f3c2a9e-0001"

Body

application/json
source
From Session · object
required

Where the network token is provisioned from. type selects the variant.

metadata
object

Metadata consisting of key-value entries.

  • Maximum 20 key-value pairs.
  • Maximum 20 characters per key.
  • Maximum 80 characters per value.
Example:
presentation_type
enum<string>

The presentation type the network token is provisioned for. agent provisions it for agent-initiated payments. Supported with Visa Token Service only. Leave it out for an ordinary network token, which is provisioned with ecom.

Requires agentic commerce support, a gated feature that must be activated for the instance. Without it, any value returns 403.

Available options:
ecom,
agent

Response

Success response

Which variant you get follows the request's source.type, and the three carry no shared tag field — tell them apart by shape.

  • A session source returns the Session object (session_id only).
  • A pan or pci_token source returns the Network Token.
  • A wallet_token source returns Wallet Token Promotion, which nests the created network_token alongside the originating source.
session_id
string<uuid>
required
Example:

"0f2c8f7e-4d2a-4d1b-9a6e-1c9b2d3e4f50"