Get Started
Essentials
Payments Core APIs
- Setup Instructions
- Payment Flows
- Payments
- Payment Methods
- POSTPaymentMethods - Create
- GETPayment Method - Retrieve
- POSTPayment Method - Update
- DELPayment Method - Delete
- POSTPayment Method - Set Default Payment Method for Customer
- GETList payment methods for a Merchant
- GETList customer saved payment methods for a Payment
- GETList payment methods for a Customer
- POSTPayment Method - Set Default Payment Method for Customer
- POST
- Customers
- Mandates
- Refunds
- Disputes
- Payouts
Account management APIs
- Organization
- Merchant Account
- Business Profile
- API Key
- Merchant Connector Account
- GSM (Global Status Mapping)
Other APIs
- Event
- Poll
- Blocklist
- Routing
- Relay
- Schemas
Payment Methods
Payment Method - Retrieve
Retrieves a payment method of a customer.
GET
/
payment_methods
/
{method_id}
Copy
curl --request GET \
--url https://sandbox.hyperswitch.io/payment_methods/{method_id} \
--header 'api-key: <api-key>'
Copy
{
"merchant_id": "merchant_1671528864",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
"payment_method": "card",
"payment_method_type": "ach",
"card": {
"scheme": "<string>",
"issuer_country": "<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>",
"saved_to_locker": true
},
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": [
"redirect_to_url"
],
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California",
"bank_account_number": "000123456",
"bank_routing_number": "110000000"
},
"last_used_at": "2024-02-24T11:04:09.922Z",
"client_secret": "<string>"
}
Authorizations
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
The unique identifier for the Payment Method
Response
200
application/json
Payment Method retrieved
The response is of type object
.
Was this page helpful?
Copy
curl --request GET \
--url https://sandbox.hyperswitch.io/payment_methods/{method_id} \
--header 'api-key: <api-key>'
Copy
{
"merchant_id": "merchant_1671528864",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method_id": "card_rGK4Vi5iSW70MY7J2mIg",
"payment_method": "card",
"payment_method_type": "ach",
"card": {
"scheme": "<string>",
"issuer_country": "<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>",
"saved_to_locker": true
},
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": [
"redirect_to_url"
],
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California",
"bank_account_number": "000123456",
"bank_routing_number": "110000000"
},
"last_used_at": "2024-02-24T11:04:09.922Z",
"client_secret": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.