Payment Method - Confirm Intent

POST /v2/payment-methods/{id}/confirm-intent

Description: Confirm a payment method intent.


Example request (cURL)

curl
curl --request POST \
  --url https://sandbox.hyperswitch.io/v2/payment-methods/{id}/confirm-intent \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "payment_method_data": {
    "card": {
      "card_number": "4111111145551142",
      "card_exp_month": "10",
      "card_exp_year": "25",
      "card_holder_name": "John Doe",
      "card_issuing_country": "AF",
      "card_cvc": "242",
      "nick_name": "John Doe",
      "card_network": "Visa",
      "card_issuer": "<string>",
      "card_type": "credit"
    }
  },
  "payment_method_type": "card",
  "payment_method_subtype": "ach",
  "customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44"
}
'

Example response (200)


Authorization

Header: api-key (string) — required

Use the API key created under your merchant account from the HyperSwitch dashboard. This key authenticates API requests from your merchant server only. Do not expose it in client-side code.


Request body (application/json)

  • payment_method_data (object) — required

    • Contains the payment method details (e.g., card object). See examples above.

  • payment_method_type (string) — required Indicates the type of payment method (e.g., card, wallet).

Available options for payment_method_type

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_subtype (string) — required Indicates the subtype of the payment method (e.g., google_pay, apple_pay for wallets).

Available options for payment_method_subtype (long 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

  • customer_id (string | null) The unique identifier of the customer. Required string length: 1–64. Example: "cus_y3oqhf46pyzuxjbcn2giaqnb44"


Response (200 — application/json)

Payment Method Intent Confirmed

Fields:

  • id (string) — required The unique identifier of the Payment method. Example: "12345_pm_01926c58bc6e77c09e809964e72af8c8"

  • merchant_id (string) — required Unique identifier for a merchant. Example: "merchant_1671528864"

  • customer_id (string) — required The unique identifier of the customer. Required string length: 32–64. Example: "12345_cus_01926c58bc6e77c09e809964e72af8c8"

  • payment_method_type (string) — required See payment_method_type options above.

  • payment_method_subtype (string) See payment_method_subtype options above.

  • recurring_enabled (boolean | null) Indicates whether the payment method supports recurring payments. Example: true

  • created (string, date-time | null) ISO 8601 timestamp when the payment method was created. Example: "2023-01-18T11:04:09.922Z"

  • last_used_at (string, date-time | null) ISO 8601 timestamp when the payment method was last used. Example: "2024-02-24T11:04:09.922Z"

  • payment_method_data (object) Object containing saved payment method details (e.g., card info). See example response.

  • connector_tokens (object[] | null) Connector token details if available.

  • network_token (object) Network token details (if available).

  • storage_type (string) Available: volatile, persistent

  • card_cvc_token_storage (object) Details about storage of card CVC token (e.g., is_stored, expires_at).


Was this page helpful?

  • Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v2/payment-methods/payment-method--confirm-intent.mdx

  • Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v2/payment-methods/payment-method--confirm-intent

Related:

  • Payment Method - Create Intent: https://api-reference.hyperswitch.io/v2/payment-methods/payment-method--create-intent

  • Payment Method - Update: https://api-reference.hyperswitch.io/v2/payment-methods/payment-method--update