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.NetworkTokens.ListAsync(paymentMethodId: "ef9496d8-53a5-4aad-8ca2-00eb68334389");
// handle response{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "<string>",
"payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "network-token"
}
]
}List all network tokens stored for a payment method.
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.NetworkTokens.ListAsync(paymentMethodId: "ef9496d8-53a5-4aad-8ca2-00eb68334389");
// handle response{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "<string>",
"payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "network-token"
}
]
}payment-methods.read scope.
Network token provisioning via the API is not enabled by default in production.
Please contact support for further guidance.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
The ID of the payment method
"ef9496d8-53a5-4aad-8ca2-00eb68334389"
Successful Response
A list of items returned for this request.
Show child attributes
Was this page helpful?