Get a payment method
PreviewGET
/user/v1/paymentMethods/{paymentMethodId}
path parameters
paymentMethodId
string
RequiredThe identifier of the payment method.
Returns
The system-assigned identifier of the payment method.
Possible values:CARD
UNKNOWN
A human-readable description of the payment method.
This can be used to show a description of the payment method when the type is UNKNOWN or not explicitly handled.
The full name of the owner of the payment method.
The address for the payment method.
The city, district, suburb, town, or village.
The state, country, province, or region.
The 2-letter country code.
Whether the payment method is the default for the account.
The last payment error.
This will be unset if the payment method is updated or if a payment succeeds.
The general error code (e.g. INVALID_ARGUMENT
).
Possible values:OK
CANCELLED
UNKNOWN
INVALID_ARGUMENT
DEADLINE_EXCEEDED
NOT_FOUND
ALREADY_EXISTS
PERMISSION_DENIED
UNAUTHENTICATED
RESOURCE_EXHAUSTED
FAILED_PRECONDITION
ABORTED
OUT_OF_RANGE
UNIMPLEMENTED
INTERNAL
UNAVAILABLE
DATA_LOSS
A developer-facing error message.
A reason code for the error (e.g. USER_PENDING_DELETION
).
The parameter path related to the error (e.g. member.userId
).
Additional metadata related to the error.
A user-facing error message.
Card payment method (e.g. Visa credit card).
The brand of the card (e.g. VISA
).
Possible values:AMERICAN_EXPRESS
DINERS_CLUB
DISCOVER
JCB
MASTERCARD
UNIONPAY
VISA
The last for digits of the card.
The funding method for the card (e.g. DEBIT
)
Possible values:CREDIT
DEBIT
PREPAID
The creation time of the payment method connection.
The last update time of the payment method connection.
The system-assigned identifier of the payment method.
Possible values:CARD
UNKNOWN
A human-readable description of the payment method.
This can be used to show a description of the payment method when the type is UNKNOWN or not explicitly handled.
The full name of the owner of the payment method.
The address for the payment method.
The city, district, suburb, town, or village.
The state, country, province, or region.
The 2-letter country code.
Whether the payment method is the default for the account.
The last payment error.
This will be unset if the payment method is updated or if a payment succeeds.
The general error code (e.g. INVALID_ARGUMENT
).
Possible values:OK
CANCELLED
UNKNOWN
INVALID_ARGUMENT
DEADLINE_EXCEEDED
NOT_FOUND
ALREADY_EXISTS
PERMISSION_DENIED
UNAUTHENTICATED
RESOURCE_EXHAUSTED
FAILED_PRECONDITION
ABORTED
OUT_OF_RANGE
UNIMPLEMENTED
INTERNAL
UNAVAILABLE
DATA_LOSS
A developer-facing error message.
A reason code for the error (e.g. USER_PENDING_DELETION
).
The parameter path related to the error (e.g. member.userId
).
Additional metadata related to the error.
A user-facing error message.
Card payment method (e.g. Visa credit card).
The brand of the card (e.g. VISA
).
Possible values:AMERICAN_EXPRESS
DINERS_CLUB
DISCOVER
JCB
MASTERCARD
UNIONPAY
VISA
The last for digits of the card.
The funding method for the card (e.g. DEBIT
)
Possible values:CREDIT
DEBIT
PREPAID
The creation time of the payment method connection.
The last update time of the payment method connection.
curl https://api.userhub.com/user/v1/paymentMethods/pm_2kWzaZMKDM1x81 \
-H "UserHub-Api-Key: $USERHUB_USER_KEY" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
const res = await userApi.paymentMethods.get(
"pm_2kWzaZMKDM1x81",
);
res, err := userApi.PaymentMethods().Get(
context.Background(),
"pm_2kWzaZMKDM1x81",
nil,
)
$res = $userApi->paymentMethods->get(
paymentMethodId: 'pm_2kWzaZMKDM1x81',
);
res = user_api.payment_methods.get(
payment_method_id="pm_2kWzaZMKDM1x81",
)
Response bodyJSON
{
"id": "pm_2kWzaZMKDM1x81",
"type": "CARD",
"displayName": "Visa **** 4242",
"fullName": "Jane Doe",
"address": {
"lines": [
"42 West St"
],
"city": "Brooklyn",
"state": "NY",
"postalCode": "11222",
"country": "US"
},
"default": true,
"card": {
"brand": "VISA",
"expYear": 2030,
"expMonth": 7,
"last4": "4242",
"fundingType": "CREDIT"
},
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}