Skip to main content
POST
/
payment-options
C#
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

Headers

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

Body

application/json
metadata
object | null
Examples:
country
string | null
Examples:
currency
string | null
Examples:
amount
integer | null
Examples:
locale
string
default:en
Required string length: 1 - 50
Examples:
cart_items
CartItem · object[] | null

Response

items
PaymentOption · object[]
required