Mutation
mutation PurchaseCredits($input: PurchaseCreditsInput!) {
purchaseCredits(input: $input) {
creditBalance {
type
remaining
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"count": 1
}
}Response
{
"data": {
"purchaseCredits": {
"creditBalance": {
"type": "monthlyAllowance",
"remaining": 1
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
purchaseCredits
Purchases a top-up credit bundle for AI features. The count must match the unit count of a configured top-up bundle. Returns the updated top-up credit balance after purchase. Requires the billing:edit permission.
MUTATION
purchaseCredits(input: PurchaseCreditsInput!): PurchaseCreditsOutput!Arguments
input
required
Returns
creditBalance
error
Mutation
mutation PurchaseCredits($input: PurchaseCreditsInput!) {
purchaseCredits(input: $input) {
creditBalance {
type
remaining
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"count": 1
}
}Response
{
"data": {
"purchaseCredits": {
"creditBalance": {
"type": "monthlyAllowance",
"remaining": 1
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

