Payment Method - Retrieve
GET /v2/payment-methods/{id}
Try it
Example: cURL
curl --request GET \
--url https://sandbox.hyperswitch.io/v2/payment-methods/{id} \
--header 'api-key: <api-key>'Example Response (200)
{
"id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
"merchant_id": "merchant_1671528864",
"customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"payment_method_type": "card",
"payment_method_subtype": "ach",
"recurring_enabled": true,
"created": "2023-01-18T11:04:09.922Z",
"last_used_at": "2024-02-24T11:04:09.922Z",
"payment_method_data": {
"card": {
"saved_to_locker": true,
"issuer_country": "AF",
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "25",
"card_holder_name": "John Doe",
"card_fingerprint": "fingerprint_12345",
"nick_name": "Card",
"card_network": "Visa",
"card_isin": "4567890",
"card_issuer": "Issuer Bank",
"card_type": "Credit"
}
},
"connector_tokens": [
{
"token": "pm_9UhMqBMEOooRIvJFFdeW",
"connector_token_request_reference_id": "<string>"
}
],
"network_token": {
"payment_method_data": {
"last4_digits": "4242",
"issuer_country": "AF",
"network_token_expiry_month": "05",
"network_token_expiry_year": "27",
"nick_name": "Card",
"card_holder_name": "John Doe",
"card_isin": "16712672",
"card_issuer": "Bank of America",
"card_network": "Visa",
"card_type": "Credit",
"saved_to_locker": true
}
},
"storage_type": "volatile",
"card_cvc_token_storage": {
"is_stored": true,
"expires_at": "2024-02-24T11:04:09.922Z"
}
}Authorizations
Header:
api-key(string) — 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
id (string) — required The unique identifier for the Payment Method
Response (200) — Payment Method Retrieved
Fields described below.
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 - 64Example:"12345_cus_01926c58bc6e77c09e809964e72af8c8"payment_method_type (enum, required) Indicates the type of payment method. Eg: 'card', 'wallet', etc.
payment_method_subtype (enum) Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
recurring_enabled (boolean | null) Indicates whether the payment method supports recurring payments. Optional. Example:
truecreated (string | null) A timestamp (ISO 8601) that determines when the payment method was created. Example:
"2023-01-18T11:04:09.922Z"last_used_at (string | null) A timestamp (ISO 8601) that determines when the payment method was last used. Example:
"2024-02-24T11:04:09.922Z"payment_method_data (object) Object containing payment method specific data (e.g.,
card). See example response for details.connector_tokens (object[] | null) The connector token details if available. Example element:
token
connector_token_request_reference_id
network_token (object) Network token object. See example response for
payment_method_datainsidenetwork_token.storage_type (enum) Available options:
volatile,persistentcard_cvc_token_storage (object) Child attributes:
is_stored (boolean)
expires_at (string)
Was this page helpful?
Yes / No
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v2/payment-methods/payment-method--retrieve.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v2/payment-methods/payment-method--retrieve
Related:
Payment Method - Update: https://api-reference.hyperswitch.io/v2/payment-methods/payment-method--update
Payment Method - Delete: https://api-reference.hyperswitch.io/v2/payment-methods/payment-method--delete