POST
/
payment-options
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.PaymentOptions.ListAsync(paymentOptionRequest: new PaymentOptionRequest() {});

// handle response
{
  "items": [
    {
      "type": "payment-option",
      "method": "<string>",
      "icon_url": "<string>",
      "mode": "card",
      "label": "<string>",
      "can_store_payment_method": true,
      "can_delay_capture": true,
      "context": {
        "merchant_name": "<string>",
        "supported_schemes": [
          "<string>"
        ]
      }
    }
  ]
}

This endpoint requires the payment-options.read or embed scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Body

application/json
metadata
object | null

The metadata to used to evaluate checkout rules, which will help determine the right payment options to display.

Examples:
{ "cohort": "a" }
country
string | null

The country code used to evaluate checkout rules, and which are used to help determine the right payment options to display.

Examples:

"DE"

"GB"

"US"

currency
string | null

The currency code used to evaluate checkout rules, and which are used to help determine the right payment options to display.

Examples:

"EUR"

"GBP"

"USD"

amount
integer | null

The amount used to evaluate checkout rules, and which are used to help determine the right payment options to display.

Examples:

1299

locale
string
default:en

The locale used to determine the labels for each payment option.

Required string length: 1 - 50
Examples:

"en"

cart_items
CartItem · object[] | null

The cart items used to evaluate checkout rules, and which are used to help determine the right payment options to display.

Response

200
application/json

Successful Response

items
PaymentOption · object[]
required

A list of items returned for this request.