Create Credit and Rebill Credit Memos
createCreditRebillAPI allows you to credit an entire invoice and rebill it. However, this API does not calculate tax for the credit memo. You must call the calculateTaxForCreditRebill API after calling the createCreditRebill API to calculate tax for the credit memo.
API | Signature |
|---|---|
createCreditRebill |
|
This API accepts the following input parameters.
Request | |||
|---|---|---|---|
Field | Type | Required? | Description |
invoiceId | ID | Yes | ID of the invoice. |
autoApproveCreditMemo | Boolean | Yes | If set to true, Conga Billing auto-approves credit memos. |
unrateUsageInputs | Boolean | No | If set to true, Conga Billing unrates usage inputs. |
The API returns a Map as a response parameter.
Response | ||
|---|---|---|
Field | Type | Description |
Result | Map | The result map contains the success string and a value |
Code Sample - Request
Map<String, Object> response = Apttus_Billing.CreditRebillService.createCreditRebill('a5TDc00000161oX', // Invoice Id
false);
System.debug('===response==='+response);Code Sample - Response
{
'success': true,
'creditMemoId': 'a5JDc000000lqH2'
}