POST
/
payment-options
curl --request POST \
  --url https://api.{gr4vy_id}.gr4vy.app/payment-options \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 1299,
  "locale": "en-US",
  "currency": "USD",
  "country": "US",
  "metadata": {
    "key": "value"
  },
  "cart_items": [
    {
      "name": "GoPro HERO9 Camcorder",
      "quantity": 1,
      "unit_amount": 37999,
      "discount_amount": 0,
      "tax_amount": 0,
      "external_identifier": "item-789123",
      "sku": "sku-789123",
      "product_url": "https://example.com/items/gopro",
      "image_url": "https://example.com/images/items/gopro.png",
      "categories": [
        "<string>"
      ],
      "product_type": "physical",
      "seller_country": "US"
    }
  ]
}'
{
  "items": [
    {
      "type": "payment-option",
      "method": "card",
      "icon_url": "https://cdn.gr4vy.app/card.svg",
      "mode": "card",
      "label": "Pay by Card",
      "can_store_payment_method": true,
      "can_delay_capture": true,
      "context": {
        "gateway": "<string>",
        "gateway_merchant_id": "<string>",
        "merchant_name": "<string>",
        "supported_schemes": [
          "<string>"
        ],
        "approval_ui": {
          "height": "300px",
          "width": "300px"
        },
        "required_fields": {
          "first_name": true,
          "last_name": true,
          "email_address": true,
          "phone_number": true,
          "address": {
            "city": true,
            "country": true,
            "postal_code": true,
            "state": true,
            "house_number_or_name": true,
            "line1": true
          },
          "tax_id": true
        }
      }
    }
  ]
}

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.

Body

application/json

A request to get list of payment options.

Response

200
application/json
Returns a list of available payment options for the given query parameters.

A list of payment options.