query · Module: Pricing · Requires pricing:read
Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
Returns
Surcharge!
| Field | Type |
|---|---|
id | String! |
object | SurchargeObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
name | String! |
kind | String! |
calculation | SurchargeCalculation! |
conditions | JSON |
schedule | [SurchargeScheduleItem!] |
status | SurchargeStatus |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Surcharge($id: ID!) {
surcharge(id: $id) {
id
object
name
status
livemode
created
updated
kind
calculation {
type
amount {
amount
currency
}
rate
basis
per {
value
unit
}
}
schedule {
effective_from
rate
amount {
amount
currency
}
}
}
}
{
"id": "sur_1a2B3c"
}
{
"data": {
"surcharge": {
"id": "sur_1a2B3c",
"object": "surcharge",
"name": "Example",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"kind": "example",
"calculation": {
"type": "fixed",
"amount": {
"amount": 1299,
"currency": "usd"
},
"rate": 0.145,
"basis": "base",
"per": {
"value": 1.5,
"unit": "kg"
}
},
"schedule": [
{
"effective_from": "2026-10-07",
"rate": 0.145,
"amount": {
"amount": 1299,
"currency": "usd"
}
}
]
}
}
}