Update a Manual Charge

You can update a manual charge by ID using the following endpoint and sample payload:

PUT https://example-gotransverse.com/billing/2/manual-charges/{id}

Learn what you need to know to successfully update a manual charge in the Considerations, Before You Start, Request, Response, and Next Steps sections below.

Considerations

Consider the following when updating a manual charge:

  • Only manual charges with a DRAFT status can be updated.

  • The description, quantity, unit_price, start_date, end_date, effective_date, taxable fields and the reason object can be updated. All other fields cannot be updated.

The status value of a manual charge cannot be changed using this endpoint. Refer to Post a Manual Charge to change the value from DRAFT to POSTED.

Before You Start

You will need the following when updating a manual charge:

  • The id of the manual charge entity to update as the endpoint's {id} path parameter.

Request

Copy
{
  "type": "sourced",
  "description": "string",
  "status": "DRAFT",
  "quantity": 5,
  "unit_price": 105,
  "start_date": "2023-01-01T00:00:00-06:00",
  "end_date": "2023-02-01T00:00:00-06:00",
  "effective_date": "2023-06-02T00:00:00-06:00",
  "taxable": false,
  "reason": {
    "reason_type": "manual-charge",
    "id": "451",   
    "name": "Manual Charge Reason"
  }
}

Response

Copy
{
  "type": "sourced",
  "id": "136526",
  "description": "string",
  "status": "DRAFT",
  "quantity": 5,
  "amount": 525,
  "taxable": false,
  "unit_price": 105,
  "start_date": "2023-01-01T00:00:00-06:00",
  "end_date": "2023-02-01T00:00:00-06:00",
  "effective_date": "2023-06-02T00:00:00-06:00",
  "reason": {
    "reason_type": "manual-charge",
    "id": "451",
    "name": "Manual Charge Reason"
  },
  "source_charge": {
    "invoice_item_charge_type": "charge",
    "id": "75583"
  }
}

The following fields are returned when a manual charge is successfully updated:

  • type — The type of manual charge. The available value is source.

  • id — The ID of the manual charge.

  • description — A description of the manual charge.

  • status — The status of the manual charge. New manual charges are created with a DRAFT status.

  • quantity — The quantity of the charge.

  • amount — The amount of the charge.

  • taxable — Specifies whether the charge is taxable:

    • true: Tax is calculated for the charge when invoiced.

    • false: Tax is not calculated for the charge when invoiced.

  • unit_price — The unit price of the charge.

  • start_date — The date and time the charge starts.

  • end_date — The date and time the charge ends.

  • effective_date — The date and time the manual charge becomes effective. This date determines the bill cycle in which the charge is generated and invoiced.

  • reason — The reason for the manual charge.

    • reason_type: The type of reason. Possible values are manual-charge and manual-invoice.

    • id: The ID of the reason.

    • name: The name of the reason.

  • source_charge — The invoice item charge object the manual charge is based on:

    • invoice_item_charge_type: The type of source invoice item charge. Possible values are charge, manual-usage, manual-usage-discount, usage, usage-discount.

    • id: The ID of the source invoice item charge.

Next Steps

Once the manual charge is updated, you can change the status from Draft to Posted using the /manual-charges/{id}/post endpoint. Alternatively, you can delete a manual charge with a Draft status.

 

 

 

 

Topic Updated: 7/2024.