Retrieve Payment Methods for Checkout

This request retrieves a checkout session using the unique identifier that was generated when the session was first created.

GET/checkout/sessions/{checkout_session}/payment-methods

Path Parameters

checkout_sessionstringrequired

The unique identifier of the checkout session (UUID, 36 chars).

Query Parameters

categorystring

Optional category filter.

Response

200

namestring
vaulted_tokenstring
descriptionstring
typestring
categorystring
iconstring
last_successfully_usedboolean
last_successfully_used_atstring
checkoutobject
Show checkout properties
sessionstring
sdk_required_actionboolean
conditionsobject
Show conditions properties
enabledboolean
rulesobject[]

List of condition rules (INCLUDE/EXCLUDE) applied to the payment method. Each rule has a type (e.g. METADATA, AMOUNT, COUNTRY) and values.

Show rules properties
conditionstring

INCLUDE or EXCLUDE

condition_group_codestring

UUID of the condition group

condition_namestring

Human-readable name of the condition

typestring

Rule type: METADATA, AMOUNT, COUNTRY, etc.

valuesobject

Values used by the rule. Structure depends on rule type: currency, max, and min are strings (nullable); countries is an array of strings (e.g. [“AF”]); metadata is an array of objects with key and value (e.g. [{“key”: “test”, “value”: “test”}]).

Show values properties
countriesstring[]

Array of country codes (e.g. [“AF”], [“US”]). Null when not used by the rule.

currencystring

Currency code when rule type is AMOUNT. Null otherwise.

maxstring

Maximum value when applicable. Null otherwise.

metadataobject[]

Array of key-value objects (e.g. [{“key”: “test”, “value”: “test”}]). Null when not used by the rule.

Show metadata properties
keystring
valuestring
minstring

Minimum value when applicable. Null otherwise.

card_dataobject
Show card_data properties
iinstring
lfdstring
expiration_monthinteger
expiration_yearinteger
number_lengthinteger
security_code_lengthinteger
brandstring
issuerstring
issuer_codeany
categorystring
typestring
preferredboolean

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X GET "https://api-sandbox.whitelabel.com/v1/checkout/sessions/<checkout_session>/payment-methods?category=<category>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>"
Response
[
  {
    "name": "VISA ****1111",
    "vaulted_token": "de00c1bd-624b-4e7b-ae28-47d86c94b15f",
    "description": "VISA ****1111",
    "type": "CARD",
    "category": "CARD",
    "icon": "https://icons.prod.whitelabel.com/visa_logosimbolo.png",
    "last_successfully_used": false,
    "last_successfully_used_at": "",
    "checkout": {
      "session": "d313047b-4f96-44ef-bbad-caf1d7ba4c2b",
      "sdk_required_action": false,
      "conditions": {
        "enabled": true,
        "rules": [
          {
            "condition": "INCLUDE",
            "condition_group_code": "2b273309-2c63-4ef8-b5f8-2953abf7ad4a",
            "condition_name": "Country-US",
            "type": "COUNTRY",
            "values": {
              "countries": [
                "AF"
              ],
              "currency": null,
              "max": null,
              "metadata": null,
              "min": null
            }
          }
        ]
      }
    },
    "card_data": {
      "iin": "41111111",
      "lfd": "1111",
      "expiration_month": 3,
      "expiration_year": 26,
      "number_length": 16,
      "security_code_length": 3,
      "brand": "VISA",
      "issuer": "JPMORGAN CHASE BANK N A",
      "issuer_code": null,
      "category": "CREDIT",
      "type": "CREDIT"
    },
    "preferred": false
  }
]