- list - List payment options
List the payment options available at checkout. filtering by country, currency, and additional fields passed to Flow rules.
from gr4vy import Gr4vy
import os
with Gr4vy(
merchant_account_id="default",
bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:
res = g_client.payment_options.list(locale="en")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
merchant_account_id |
Optional[str] | ➖ | The ID of the merchant account to use for this request. | default |
metadata |
Dict[str, str] | ➖ | The metadata to used to evaluate checkout rules, which will help determine the right payment options to display. | { "cohort": "a" } |
country |
OptionalNullable[str] | ➖ | The country code used to evaluate checkout rules, and which are used to help determine the right payment options to display. | US |
currency |
OptionalNullable[str] | ➖ | The currency code used to evaluate checkout rules, and which are used to help determine the right payment options to display. | USD |
amount |
OptionalNullable[int] | ➖ | The amount used to evaluate checkout rules, and which are used to help determine the right payment options to display. | 1299 |
locale |
Optional[str] | ➖ | The locale used to determine the labels for each payment option. | en |
cart_items |
List[models.CartItem] | ➖ | The cart items used to evaluate checkout rules, and which are used to help determine the right payment options to display. | |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.Error400 | 400 | application/json |
| errors.Error401 | 401 | application/json |
| errors.Error403 | 403 | application/json |
| errors.Error404 | 404 | application/json |
| errors.Error405 | 405 | application/json |
| errors.Error409 | 409 | application/json |
| errors.HTTPValidationError | 422 | application/json |
| errors.Error425 | 425 | application/json |
| errors.Error429 | 429 | application/json |
| errors.Error500 | 500 | application/json |
| errors.Error502 | 502 | application/json |
| errors.Error504 | 504 | application/json |
| errors.APIError | 4XX, 5XX | */* |