query · Module: Billing · Requires billing:read
Arguments
Returns
PaymentMethod!
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
query PaymentMethod($id: ID!) {
paymentMethod(id: $id) {
id
object
type
livemode
created
updated
connection
brand
last4
exp_month
exp_year
bank_name
}
}
{
"id": "pm_1a2B3c"
}
{
"data": {
"paymentMethod": {
"id": "pm_1a2B3c",
"object": "payment_method",
"type": "card",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"connection": "conn_9f8e",
"brand": "example",
"last4": "example",
"exp_month": 2,
"exp_year": 2,
"bank_name": "example"
}
}
}
Retrieve a PaymentMethod
query PaymentMethod($id: ID!) {
paymentMethod(id: $id) {
id
object
type
livemode
created
updated
connection
brand
last4
exp_month
exp_year
bank_name
}
}
{
"id": "pm_1a2B3c"
}
{
"data": {
"paymentMethod": {
"id": "pm_1a2B3c",
"object": "payment_method",
"type": "card",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"connection": "conn_9f8e",
"brand": "example",
"last4": "example",
"exp_month": 2,
"exp_year": 2,
"bank_name": "example"
}
}
}
query · Module: Billing · Requires billing:read
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
PaymentMethod!
| Field | Type |
|---|---|
id | String! |
object | PaymentMethodObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
type | PaymentMethodType! |
connection | String! |
brand | String |
last4 | String |
exp_month | Int |
exp_year | Int |
bank_name | String |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
errors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query PaymentMethod($id: ID!) {
paymentMethod(id: $id) {
id
object
type
livemode
created
updated
connection
brand
last4
exp_month
exp_year
bank_name
}
}
{
"id": "pm_1a2B3c"
}
{
"data": {
"paymentMethod": {
"id": "pm_1a2B3c",
"object": "payment_method",
"type": "card",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"connection": "conn_9f8e",
"brand": "example",
"last4": "example",
"exp_month": 2,
"exp_year": 2,
"bank_name": "example"
}
}
}