Payments - Submit Eligibility Data

POST /payments/{payment_id}/eligibility

Submit eligibility data for a payment (used for 3DS/browser info, card details, etc.).

Example (cURL)

Submit eligibility (cURL)
curl --request POST \
  --url https://sandbox.hyperswitch.io/payments/{payment_id}/eligibility \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
  "payment_method_type": "card",
  "payment_method_data": {
    "card": {
      "card_number": "4242424242424242",
      "card_exp_month": "24",
      "card_exp_year": "24",
      "card_holder_name": "John Test",
      "card_cvc": "242",
      "card_issuer": "chase",
      "card_network": "Visa",
      "card_type": "CREDIT",
      "card_issuing_country": "INDIA",
      "card_issuing_country_code": "IN",
      "bank_code": "JP_AMEX",
      "nick_name": "John Test"
    },
    "billing": {
      "address": {
        "city": "New York",
        "country": "AF",
        "line1": "123, King Street",
        "line2": "Powelson Avenue",
        "line3": "Bridgewater",
        "zip": "08807",
        "state": "New York",
        "first_name": "John",
        "last_name": "Doe",
        "origin_zip": "08807"
      },
      "phone": {
        "number": "9123456789",
        "country_code": "+1"
      },
      "email": "<string>"
    }
  },
  "payment_method_subtype": "ach",
  "browser_info": {
    "color_depth": 1,
    "java_enabled": true,
    "java_script_enabled": true,
    "language": "<string>",
    "screen_height": 1,
    "screen_width": 1,
    "time_zone": 123,
    "ip_address": "<string>",
    "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
    "user_agent": "<string>",
    "os_type": "<string>",
    "os_version": "<string>",
    "device_model": "<string>",
    "accept_language": "<string>",
    "referer": "<string>"
  }
}
'

Responses

  • 200 — Eligibility submit is successful

Example response:

  • 400 — Bad request / validation error

Authorizations

Header: api-key (string, required) Publishable keys are a type of keys that can be public and have limited scope of usage.

Path parameters

  • payment_id (string, required) — The identifier for payment

Body (application/json)

  • client_secret (string, required) — Token used for client side verification Example: "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo"

  • payment_method_type (enum, required) — Indicates the type of payment method. Examples: card, wallet, etc. Available options include:

    • card

    • card_redirect

    • pay_later

    • wallet

    • bank_redirect

    • bank_transfer

    • crypto

    • bank_debit

    • reward

    • real_time_payment

    • upi

    • voucher

    • gift_card

    • open_banking

    • mobile_payment

    • network_token

  • payment_method_data (object, required) — The payment method information provided for making a payment. Supported types (child attributes exist for each type):

    • Card

    • CardRedirect

    • Wallet

    • PayLater

    • BankRedirect

    • BankDebit

    • BankTransfer

    • RealTimePayment

    • Crypto

    • Upi

    • Voucher

    • GiftCard

    • CardToken

    • OpenBanking

    • MobilePayment

    • NetworkToken

  • payment_method_subtype (enum) — Indicates the sub type of payment method (e.g., google_pay, apple_pay for wallets). See full list below.

payment_method_subtype — full list

ach, affirm, afterpay_clearpay, alfamart, ali_pay, ali_pay_hk, alma, amazon_pay, paysera, apple_pay, atome, bacs, bancontact_card, becs, benefit, bizum, blik, bluecode, boleto, bca_bank_transfer, bni_va, breadpay, bri_va, bhn_card_network, card_redirect, cimb_va, classic, credit, crypto_currency, cashapp, dana, danamon_va, debit, duit_now, efecty, eft, eps, flexiti, fps, evoucher, giropay, givex, google_pay, go_pay, gcash, ideal, interac, indomaret, klarna, kakao_pay, local_bank_redirect, mandiri_va, knet, mb_way, mobile_pay, momo, momo_atm, multibanco, online_banking_thailand, online_banking_czech_republic, online_banking_finland, online_banking_fpx, online_banking_poland, online_banking_slovakia, oxxo, pago_efectivo, permata_bank_transfer, open_banking_uk, pay_bright, payjustnow, paypal, paze, pix, pay_safe_card, przelewy24, prompt_pay, pse, red_compra, red_pagos, samsung_pay, sepa, sepa_bank_transfer, sepa_guarenteed_debit, skrill, sofort, swish, touch_n_go, trustly, twint, upi_collect, upi_intent, upi_qr, vipps, viet_qr, venmo, walley, we_chat_pay, seven_eleven, lawson, mini_stop, family_mart, seicomart, pay_easy, local_bank_transfer, mifinity, open_banking_pis, direct_carrier_billing, instant_bank_transfer, instant_bank_transfer_finland, instant_bank_transfer_poland, revolut_pay, indonesian_bank_transfer, open_banking, network_token

  • browser_info (object) — Browser information to be used for 3DS 2.0. Example fields:

    • color_depth (number)

    • java_enabled (boolean)

    • java_script_enabled (boolean)

    • language (string)

    • screen_height (number)

    • screen_width (number)

    • time_zone (number)

    • ip_address (string)

    • accept_header (string)

    • user_agent (string)

    • os_type (string)

    • os_version (string)

    • device_model (string)

    • accept_language (string)

    • referer (string)

Response fields

  • payment_id (string, required) — The identifier for the payment

  • sdk_next_action (object, required) — Next action for SDK e.g. { "next_action": "post_session_tokens" }

If you want to suggest edits or report an issue for this documentation, see:

  • Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/payments/payments--submit-eligibility-data.mdx

  • Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/payments/payments--submit-eligibility-data