v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Charges

Delete a charge for invoice

Delete a charge for the specified invoice.

Required scopes: flex.billing.charges.delete

delete/api/v2/organizations/{orgSlug}/charges/{chargeId}

Path parameters

chargeIdstring required

Id of the charge.

orgSlugstring required

organization slug

Response

_idstring required

The _id of the charge.

amountnumber required

The amount of the charge.

currencystring

The currency of the charge.

accountstring

The account to which the charge is allocated.

referencestring

A short description of the charge

datestring

The date of the charge.

sourcestring

The source of the charge. The source will be an accounting integration if the charge is synced from an integration.

status'pending' | 'fail' | 'success' | 'refund'

The status of the charge.

paymentstring

Reference to the invoice, to which the charge belongs to.

providerChargeReferencestring

The payment gateway reference for the charge (e.g., Stripe charge ID).

createdAtstring date-time

The date when the charge has been created at.

createdBystring

The user that created the charge.

modifiedAtstring date-time

The date when the charge has been modified for the last time.

modifiedBystring

The user that did the last modification to the charge. Before the first modification, this field equals to the createdBy field.

Example response

{
  "_id": "6080186f490fcf6e0547ec50",
  "amount": 15,
  "currency": "USD",
  "account": "Cash",
  "reference": "Charge Reference 1",
  "date": "2025-01-01T00:00:00.000Z",
  "accounting": {
    "provider": "xero",
    "providerId": "123456789",
    "externalOrgId": "987654321",
    "deepLink": "https://quickbooks.com/123456789",
    "lastSync": "2025-01-01T00:00:00.000Z",
    "error": "An error occurred while syncing with Xero"
  },
  "source": "API",
  "payment": "6080186f490fcf6e0547ec50",
  "providerChargeReference": "ch_3ABC123DEF456",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "createdBy": "6080186f490fcf6e0547ec50",
  "modifiedAt": "2025-01-01T00:00:00.000Z",
  "modifiedBy": "6080186f490fcf6e0547ec50"
}