Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Credit Grants

Credit Grants

Credit Grants

Create a credit grant
v1.credit_grants.create(CreditGrantCreateParams**kwargs) -> dataIDCreditGrantCreateResponse
post/v1/credits/createGrant
Update a credit grant
v1.credit_grants.edit(CreditGrantEditParams**kwargs) -> dataIDCreditGrantEditResponse
post/v1/credits/editGrant
List credit grants
v1.credit_grants.list(CreditGrantListParams**kwargs) -> SyncCursorPage[idstrbalanceBalancecustom_fieldsDict[str, str]customer_idstrdeductionslisteffective_atdatetimeexpires_atdatetimegrant_amountGrantAmountnamestrpaid_amountPaidAmountpending_deductionslistpriorityfloatcredit_grant_typestrinvoice_idstrproductslistreasonstruniqueness_keystrCreditGrantListResponse]
post/v1/credits/listGrants
List credit ledger entries
v1.credit_grants.list_entries(CreditGrantListEntriesParams**kwargs) -> datalistnext_pagestrCreditGrantListEntriesResponse
post/v1/credits/listEntries
Void a credit grant
v1.credit_grants.void(CreditGrantVoidParams**kwargs) -> dataIDCreditGrantVoidResponse
post/v1/credits/voidGrant
Credit Ledger Entry
CreditLedgerEntryclass
ShowShow
amountfloat

an amount representing the change to the customer's credit balance

created_bystr
credit_grant_idstr

the credit grant this entry is related to

formatuuid
effective_atdatetime
formatdate-time
reasonstr
running_balancefloat

the running balance for this credit type at the time of the ledger entry, including all preceding charges

invoice_idstr
optional

if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged

formatuuid
Rollover Amount Max Amount
RolloverAmountMaxAmountclass
ShowShow
typeliteral
Literal["MAX_AMOUNT"]

Rollover up to a fixed amount of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_AMOUNT"
valuefloat

The maximum amount to rollover.

Rollover Amount Max Percentage
RolloverAmountMaxPercentageclass
ShowShow
typeliteral
Literal["MAX_PERCENTAGE"]

Rollover up to a percentage of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_PERCENTAGE"
valuefloat

The maximum percentage (0-1) of the original credit grant to rollover.

minimum0
maximum1