Docs/User API/Payment methods/Get

Get a payment method

Preview
GET/user/v1/paymentMethods/{paymentMethodId}

Get a payment method.

path parameters

  • paymentMethodId

    string

    Required

    The identifier of the payment method.

Returns

  • id

    string

    The system-assigned identifier of the payment method.

  • type

    enum

    The payment method type.

    Possible values:
    CARDUNKNOWN
  • displayName

    string

    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.

  • fullName

    string

    The full name of the owner of the payment method.

  • address

    Address

    The address for the payment method.

  • default

    boolean

    Whether the payment method is the default for the account.

  • lastPaymentError

    Status

    The last payment error.

    This will be unset if the payment method is updated or if a payment succeeds.

  • card

    CardPaymentMethod

    Card payment method (e.g. Visa credit card).

  • createTime

    date-time

    The creation time of the payment method connection.

  • updateTime

    date-time

    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"
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"
}
PreviousCreate a payment method intent
NextUpdate a payment method

Build software thatmonetizes
$

Subscribe to monthly product updates

© 2025 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth