GET
/
payment-method-definitions
List payment method definitions
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/payment-method-definitions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
{
  "items": [
    {
      "id": "card",
      "icon_url": "https://example.com/icons/card.png",
      "display_name": "Card",
      "long_display_name": "Credit or Debit Card",
      "method": "card_payment"
    }
  ]
}
Returns a list of all available payment methods recognized by Gr4vy. This endpoint requires the payment-method-definitions.read 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"

Response

200
application/json

Successful Response

The response is of type object.