Payments - Confirm Intent

POST /v2/payments/{id}/confirm-intent

Try it: https://sandbox.hyperswitch.io/v2/payments/{id}/confirm-intent

cURL

curl --request POST \
  --url https://sandbox.hyperswitch.io/v2/payments/{id}/confirm-intent \
  --header 'Content-Type: application/json' \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>' \
  --data '
{
  "payment_method_data": {
    "card": {
      "card_cvc": "123",
      "card_exp_month": "10",
      "card_exp_year": "25",
      "card_holder_name": "joseph Doe",
      "card_number": "4242424242424242"
    }
  },
  "payment_method_subtype": "credit",
  "payment_method_type": "card"
}
'

Responses: 200, 400

Example 200 response (application/json)

Authorizations

  • api-key (header) — string — required Publishable keys are a type of keys that can be public and have limited scope.

Headers

  • X-Profile-Id — string — required Profile ID associated to the payment intent

  • Content-Type: application/json

Path Parameters

  • id — string — required The unique identifier for the Payment Intent

Request Body (application/json)

Request for Payment Intent Confirm

  • payment_method_data — object — required The payment method information provided for making a payment. Supported options include:

    • Card, CardRedirect, Wallet, PayLater, BankRedirect, BankDebit, BankTransfer, RealTimePayment, Crypto, Upi, Voucher, GiftCard, CardToken, OpenBanking, MobilePayment, NetworkToken

  • payment_method_type — enum — required Indicates the type of payment method. Examples: card, wallet, etc. Available options: 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 — enum — required Indicates the sub type of payment method (eg: google_pay, apple_pay). A long list of available options such as ach, credit, apple_pay, google_pay, paypal, etc.

  • return_url — string | null The URL to redirect the user after payment completion. If not provided, the business profile URL is used. Example: "https://hyperswitch.io"

  • split_payment_method_data — object[] | null Payment instrument data to be used for split payments

  • shipping — object

  • customer_acceptance — object CustomerAcceptance object: type, time, mode of acceptance (usually passed by SDK/client)

  • browser_info — object Browser information for 3DS 2.0

  • payment_method_id — string | null

  • payment_token — string | null Example: "187282ab-40ef-47a9-9206-5099ba31e432"

  • merchant_connector_details — object

  • return_raw_connector_response — boolean | null If true, returns stringified connector raw response body

  • webhook_url — string | null Webhook endpoint to receive payment status notifications. Example: "https://merchant.example.com/webhooks/payment"


Response (200 application/json)

Payment created — Response for Payment Intent Confirm

Note: Few fields may be returned as expandable objects (e.g., shipping, billing, customer, payment_method) and are not included by default unless explicitly requested for expansion.

Key response fields:

  • id — string — required Unique identifier for the payment (32–64 chars). Example: "12345_pay_01926c58bc6e77c09e809964e72af8c8"

  • status — enum — required Overall status of a payment intent. Options include: succeeded, failed, cancelled, processing, requires_customer_action, requires_payment_method, requires_confirmation, requires_capture, partially_captured, expired, etc.

  • amount — object — required

  • customer_id — string — required (32–64 chars)

  • processor_merchant_id — string — required (max 255 chars)

  • created — string — required

  • modified_at — string — required

  • initiator — enum (platform, connected)

  • connector — string | null

  • payment_method_data — object

  • payment_method_type — enum

  • payment_method_subtype — enum

  • connector_transaction_id — string | null

  • connector_reference_id — string | null

  • merchant_connector_id — string | null

  • browser_info — object

  • error — object

  • shipping — object

  • billing — object

  • attempts — object[] | null

  • connector_token_details — object

  • payment_method_id — string | null

  • next_action — object (contains redirection URL info)

  • return_url — string | null

  • authentication_type — enum (default: no_three_ds) three_ds or no_three_ds — indicates requested authentication behavior.

  • authentication_type_applied — enum (default: no_three_ds)

  • is_iframe_redirection_enabled — boolean | null

  • merchant_reference_id — string | null

  • raw_connector_response — string | null Only returned if return_raw_connector_response is true.

  • feature_metadata — object

  • metadata — object Up to 50 keys; key names up to 40 chars; values up to 500 chars.


Was this page helpful?

  • Yes / No

Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v2/payments/payments--confirm-intent.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v2/payments/payments--confirm-intent