Payment Method - Retrieve
GET /payment_methods/{method_id}
Description
Retrieve a Payment Method by its unique identifier.
Example — cURL
curl --request GET \
--url https://sandbox.hyperswitch.io/payment_methods/{method_id} \
--header 'api-key: <api-key>'Example Response (200)
{
"merchant_id": "merchant_1671528864",
"payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
"payment_method": "card",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method_type": "ach",
"card": {
"saved_to_locker": true,
"scheme": "<string>",
"issuer_country": "<string>",
"issuer_country_code": "<string>",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_token": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>"
},
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": [
"redirect_to_url"
],
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California"
},
"last_used_at": "2024-02-24T11:04:09.922Z",
"client_secret": "<string>"
}Authorizations
api-key (string, header, required) Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
method_id (string, required) The unique identifier for the Payment Method.
Response (200) — application/json
Payment Method retrieved. Fields:
merchant_id (string, required) Unique identifier for a merchant. Example:
"merchant_1671528864"payment_method_id (string, required) The unique identifier of the Payment Method. Example:
"card_rGK4Vi5iSW70MY7J2mIg"payment_method (enum, required) Indicates the type of payment method. Examples:
card,wallet, etc. Available options include (not exhaustive):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_tokencustomer_id (string | null) The unique identifier of the customer. Required string length: 1–64. Example:
"cus_y3oqhf46pyzuxjbcn2giaqnb44"payment_method_type (enum) Indicates the sub type of payment method (e.g.,
google_pay,apple_payfor wallets). Available options include many values such asach,apple_pay,credit,debit,paypal,google_pay,sepa,bank_transfer,network_token, etc.card (object) Card-specific attributes:
saved_to_locker (boolean)
scheme (string)
issuer_country (string)
issuer_country_code (string)
last4_digits (string)
expiry_month (string)
expiry_year (string)
card_token (string)
card_holder_name (string)
card_fingerprint (string)
nick_name (string)
card_network (string) — Example:
"Visa"card_isin (string)
card_issuer (string)
card_type (string)
recurring_enabled (boolean | null) Indicates whether the payment method supports recurring payments. Example:
trueinstallment_payment_enabled (boolean | null) Indicates whether the payment method is eligible for installment payments (e.g., EMI, BNPL). Example:
truepayment_experience (enum[] | null) Type of payment experience enabled with the connector (how the customer will be routed). Available options include:
redirect_to_url,invoke_sdk_client,display_qr_code,one_click,link_wallet,invoke_payment_app,display_wait_screen,collect_otpExample:["redirect_to_url"]metadata (object) Up to 50 keys; key names up to 40 characters; values up to 500 characters. Useful for storing additional structured information.
created (string | null) Timestamp (ISO 8601) when the payment method was created. Example:
"2023-01-18T11:04:09.922Z"bank_transfer (object) Bank transfer attributes (example fields shown in response):
bank_account_number (string)
bank_routing_number (string)
bank_name (string)
bank_country_code (string)
bank_city (string)
last_used_at (string | null) Example:
"2024-02-24T11:04:09.922Z"client_secret (string | null) For client-based calls.
If you want to suggest edits or raise an issue on the docs, the original source links are available in the repository.