creditTopUpCreate

Buy credits through a usage charge's top-up charge, invoiced without a quote. The creditTopUpCreate mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.

Scope required: billing:write

mutation creditTopUpCreate ($subscriptionChargeId: ID!, $quantity: Int!) {
  creditTopUpCreate (subscriptionChargeId: $subscriptionChargeId, quantity: $quantity) {
      creditTopUp {
        createdAt
        creditBalanceId
        id
        invoiceId
        origin
        price
        priceListChargeId
        quantity
        subscriptionChargeId
        subscriptionId
        subtotal
      }
      invoice {
        accountId
        aging
        amount
        amountDue
        amountPaid
        baseCurrencyId
        baseCurrencyTotal
        couponApplied
        createdAt
        credits
        currencyId
        description
        dueAt
        fromChildAccountId
        hasPaymentMethod
        id
        internalNotes
        isLegacy
        issuedAt
        kind
        netPaymentDays
        notes
        number
        paidAt
        payableId
        paymentFailedAt
        paymentFailureReason
        poNumber
        portalUrl
        quoteId
        sendInvoiceTo
        smallUnitAmountDue
        subtotal
        taxAmount
        taxRate
        updatedAt
        url
        uuid
      }
  }
}

ArgumentsLink to Arguments section

{
  "subscriptionChargeId": "456123",
  "quantity": 123
}
Name Type Description
subscriptionChargeId ID  
quantity Int  

ResponseLink to Response section

Name Type Description
creditTopUp CreditTopUp  
invoice Invoice