Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gr4vy.com/llms.txt

Use this file to discover all available pages before exploring further.

PSP tokenization provisions a card stored in the Gr4vy vault as a token on a specific payment provider (PSP). The provider issues its own token that references the card on their side. PSP tokens are used when a downstream service requires a provider-specific reference rather than raw card data — for example, when migrating recurring mandates or storing a card on a provider for future use.

PSP tokens vs network tokens

PSP tokenNetwork token
Issued byPayment provider (PSP/acquirer)Card scheme (Visa, Mastercard)
PortabilityTied to one providerCan work across supported providers
Use caseProvider-specific integrationsAuthorization rate optimization, recurring payments
For most use cases, network tokens are preferred because they can be more portable across supported providers and provide higher authorization rates. PSP tokens are useful when a specific provider requires its own token format.

Provisioning a PSP token

To provision a PSP token, the card must already be stored in the Gr4vy vault as a payment method. Call the provision endpoint with the target payment service ID.
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.PaymentMethods.PaymentServiceTokens.CreateAsync(
    paymentMethodId: "ef9496d8-53a5-4aad-8ca2-00eb68334389",
    paymentServiceTokenCreate: new PaymentServiceTokenCreate() {
        PaymentServiceId = "fffd152a-9532-4087-9a4f-de58754210f0",
        RedirectUrl = "https://example.com/callback",
    }
);

// handle response
The response contains the provisioned token details, including the provider’s token reference.

Listing PSP tokens

To retrieve existing PSP tokens for a payment method:
using Gr4vy;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.PaymentMethods.PaymentServiceTokens.ListAsync(
    paymentMethodId: "ef9496d8-53a5-4aad-8ca2-00eb68334389"
);

// handle response

API reference

Provision PSP token

POST /payment-methods/payment_method_id/payment-service-tokens

List PSP tokens

GET /payment-methods/payment_method_id/payment-service-tokens

Delete PSP token

DELETE /payment-methods/payment_method_id/payment-service-tokens/payment_service_token_id