Socotra
API ReferenceBilling API

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.

ActionEndpoint
Fetch CreditsGET/billing/{tenantLocator}/credits/list
Fetch Shortfall CreditGET/billing/{tenantLocator}/shortfallCredits/{locator}
Fetch Multiple Shortfall CreditsGET/billing/{tenantLocator}/shortfallCredits/list

Fetch Credits

Fetch CreditsfetchCredits
GET/billing/{tenantLocator}/credits/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
accountLocatorqueryulid?No
offsetqueryinteger?No
countqueryinteger?No
extendedqueryboolean?No
Security Group:credits
Permissions:
read,list
CreditListResponse

Required properties

PropertyTypeDescription
listCompletedboolean
itemsCreditResponse[]
CreditResponse

Required properties

PropertyTypeDescription
locatorulid
currencystring
creditStateEnum discarded | draft | posted | reversed | validated | executed | distributed | approved | rejected | requested | executing | failed | cancelled
amountnumber
creditTypeEnum creditDistribution | disbursement | payment | subpayment | shortfallWriteOff | writeOff
createdAtdatetime

Optional properties

PropertyTypeDescription
accountLocatorulid?
realizedAtdatetime?
reversalReasonstring?
reversedAtdatetime?

Fetch Shortfall Credit

Fetch Shortfall CreditfetchShortfallCredit
GET/billing/{tenantLocator}/shortfallCredits/{locator}

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:shortfall-credits
Permission:
read
ShortfallCreditListResponse

Required properties

PropertyTypeDescription
listCompletedboolean
itemsShortfallCreditResponse[]
ShortfallCreditResponse

Required properties

PropertyTypeDescription
locatorulid
accountLocatorulid
parentCreditLocatorulid
currencystring
shortfallCreditStateEnum draft | distributed | reversed
amountnumber
creditTypeEnum creditDistribution | disbursement | payment | subpayment | shortfallWriteOff | writeOff
createdAtdatetime
createdByuuid
targetsCreditItem[]

Optional properties

PropertyTypeDescription
reversalReasonstring?

Fetch Multiple Shortfall Credits

Fetch Multiple Shortfall CreditsfetchMultipleShortfallCredits
GET/billing/{tenantLocator}/shortfallCredits/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
offsetqueryinteger?No
countqueryinteger?No
accountLocatorqueryulid?No
extendedqueryboolean?No
Security Group:shortfall-credits
Permissions:
read,list

Fetch Credits For An Invoice

Fetch Credits For An InvoicefetchCreditsForAnInvoice
GET/billing/{tenantLocator}/invoices/{locator}/credits/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
includeReversedqueryboolean?No
offsetqueryinteger?No
countqueryinteger?No
extendedqueryboolean?No
Security Group:invoices
Permissions:
read,list

On this page