Credits API
Credits are added to the system to as desired to credit customer accounts.
Currently the only credits supported (other than payments and credit distributions) are write-offs to resolve invoice payment shortfalls within the tolerance threshold.
| Action | Endpoint |
|---|---|
| Fetch Credits | GET/billing/{tenantLocator}/credits/list |
| Fetch Shortfall Credit | GET/billing/{tenantLocator}/shortfallCredits/{locator} |
| Fetch Multiple Shortfall Credits | GET/billing/{tenantLocator}/shortfallCredits/list |
Fetch Credits
Fetch Credits
fetchCreditsGET
/billing/{tenantLocator}/credits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
accountLocator | query | ulid? | No | |
offset | query | integer? | No | |
count | query | integer? | No | |
extended | query | boolean? | No |
Response:
CreditListResponseSecurity Group:
creditsPermissions:
read,listCreditListResponse
Required properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | CreditResponse[] |
CreditResponse
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
currency | string | |
creditState | Enum discarded | draft | posted | reversed | validated | executed | distributed | approved | rejected | requested | executing | failed | cancelled | |
amount | number | |
creditType | Enum creditDistribution | disbursement | payment | subpayment | shortfallWriteOff | writeOff | |
createdAt | datetime |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
realizedAt | datetime? | |
reversalReason | string? | |
reversedAt | datetime? |
Fetch Shortfall Credit
Fetch Shortfall Credit
fetchShortfallCreditGET
/billing/{tenantLocator}/shortfallCredits/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
Response:
ShortfallCreditResponseSecurity Group:
shortfall-creditsPermission:
readShortfallCreditListResponse
Required properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | ShortfallCreditResponse[] |
ShortfallCreditResponse
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
accountLocator | ulid | |
parentCreditLocator | ulid | |
currency | string | |
shortfallCreditState | Enum draft | distributed | reversed | |
amount | number | |
creditType | Enum creditDistribution | disbursement | payment | subpayment | shortfallWriteOff | writeOff | |
createdAt | datetime | |
createdBy | uuid | |
targets | CreditItem[] |
Optional properties
| Property | Type | Description |
|---|---|---|
reversalReason | string? |
Fetch Multiple Shortfall Credits
Fetch Multiple Shortfall Credits
fetchMultipleShortfallCreditsGET
/billing/{tenantLocator}/shortfallCredits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
offset | query | integer? | No | |
count | query | integer? | No | |
accountLocator | query | ulid? | No | |
extended | query | boolean? | No |
Response:
ShortfallCreditListResponseSecurity Group:
shortfall-creditsPermissions:
read,listFetch Credits For An Invoice
Fetch Credits For An Invoice
fetchCreditsForAnInvoiceGET
/billing/{tenantLocator}/invoices/{locator}/credits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
includeReversed | query | boolean? | No | |
offset | query | integer? | No | |
count | query | integer? | No | |
extended | query | boolean? | No |
Response:
CreditListResponseSecurity Group:
invoicesPermissions:
read,list