v1
latestOpenAPI 3.0.02026-07-24161215397.4 KBCharges
Create a new charge for invoice
Create a new charge for the specified invoice.
Required scopes: flex.billing.charges.create
post/api/v2/organizations/{orgSlug}/charges
Path parameters
orgSlugstring required
organization slug
Request body
Example request
{
"payment": "6080186f490fcf6e0547ec50",
"date": "2024-10-31T13:00:00.000Z",
"amount": 1000,
"account": "Cash",
"reference": "Charge Reference 1",
"providerChargeReference": "ch_3ABC123DEF456",
"source": "API"
}Response
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"
}