checkout

Pay a Quote or an Invoice. The checkout mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.

Scope required: standard:write

mutation checkout ($payableId: ID, $invoiceId: ID, $quoteId: ID, $paymentMethodId: ID, $paymentMethodData: CheckoutPaymentMethodAttributes) {
  checkout (payableId: $payableId, invoiceId: $invoiceId, quoteId: $quoteId, paymentMethodId: $paymentMethodId, paymentMethodData: $paymentMethodData) {
      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
      }
      payment {
        accountId
        amount
        amountUnapplied
        baseCurrencyCash
        baseCurrencyId
        completedAt
        conversionRate
        createdAt
        currencyId
        description
        errorCode
        errorMessage
        fees
        fromChildAccountId
        id
        isLegacy
        memo
        paymentProcessor
        pluginId
        receivedAt
        remoteTransactionId
        startedAt
        updatedAt
      }
      paymentApplication {
        amount
        createdAt
        currencyId
        id
        invoiceId
        memo
        paymentId
        paymentType
        updatedAt
      }
      transaction {
        accountId
        amount
        createdAt
        currencyId
        description
        fromChildAccountId
        id
        state
        transactionableId
      }
  }
}

ArgumentsLink to Arguments section

{
  "payableId": "456123",
  "invoiceId": "456123",
  "quoteId": "456123",
  "paymentMethodId": "456123",
  "paymentMethodData": {
    "pluginGuid": "456123",
    "token": "",
    "metadata": "JSON",
    "savePaymentMethod": true
  }
}
Name Type Description
payableId ID  
invoiceId ID  
quoteId ID  
paymentMethodId ID  
paymentMethodData CheckoutPaymentMethodAttributes  

ResponseLink to Response section

Name Type Description
invoice Invoice  
payment Payment  
paymentApplication PaymentApplication  
transaction Transaction