using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListPaymentMethodsRequest req = new ListPaymentMethodsRequest() {};
ListPaymentMethodsResponse? res = await sdk.PaymentMethods.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"method": "abitab",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"cit_usage_count": 123,
"has_replacement": true,
"usage_count": 123,
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "USD",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"additional_schemes": [
"eftpos-australia"
],
"cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
"last_used_at": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"merchant_account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
},
"external_identifier": "card-12345"
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}List all stored payment method.
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListPaymentMethodsRequest req = new ListPaymentMethodsRequest() {};
ListPaymentMethodsResponse? res = await sdk.PaymentMethods.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"method": "abitab",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"cit_usage_count": 123,
"has_replacement": true,
"usage_count": 123,
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "USD",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "a50b85c200ee0795d6fd33a5c66f37a4564f554355c5b46a756aac485dd168a4",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"additional_schemes": [
"eftpos-australia"
],
"cit_last_used_at": "2013-07-16T19:23:00.000+00:00",
"last_used_at": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"merchant_account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
},
"external_identifier": "card-12345"
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}payment-methods.read scope.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"
A pointer to the page of results to return.
"ZXhhbXBsZTE"
The maximum number of items that are at returned.
1 <= x <= 10020
The ID of the buyer to filter payment methods by.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The external identifier of the buyer to filter payment methods by.
"buyer-12345"
processing, buyer_approval_required, succeeded, failed, paused The external identifier of the payment method to filter by.
"payment-method-12345"
Successful Response
A list of items returned for this request.
Show child attributes
The number of items for this page.
1 <= x <= 10020
The cursor pointing at the next page of items.
1 - 1000"ZXhhbXBsZTE"
The cursor pointing at the previous page of items.
1 - 1000"Xkjss7asS"