Payments API
| Action | Endpoint |
|---|---|
| Fetch a Payment | GET/billing/{tenantLocator}/payments/{locator} |
| Fetch Multiple Payments | GET/billing/{tenantLocator}/payments/list |
| Fetch Subpayments | GET/billing/{tenantLocator}/payments/{locator}/subpayments/list |
| Fetch Payments With Number | GET/billing/{tenantLocator}/payments/numbers/{paymentNumber} |
| Create a Payment | POST/billing/{tenantLocator}/payments |
| Update a Payment | PATCH/billing/{tenantLocator}/payments/{locator} |
| Update a Payment (overwrite extension data) | PUT/billing/{tenantLocator}/payments/{locator} |
| Validate a Payment | PATCH/billing/{tenantLocator}/payments/{locator}/validate |
| Post a Payment | PATCH/billing/{tenantLocator}/payments/{locator}/post |
| Reverse a Posted Payment | PATCH/billing/{tenantLocator}/payments/{locator}/reverse |
| Reset a Validated Payment Back to Draft State | PATCH/billing/{tenantLocator}/payments/{locator}/reset |
| Discard a Payment | PATCH/billing/{tenantLocator}/payments/{locator}/discard |
| Set Payment Number | POST/billing/{tenantLocator}/payments/{locator}/number/set |
| Generate Payment Number | POST/billing/{tenantLocator}/payments/{locator}/number/generate |
| Execute Payment | PATCH/billing/{tenantLocator}/payments/{locator}/request |
| Cancel Payment | PATCH/billing/{tenantLocator}/payments/{locator}/cancel |
| Fail Payment | PATCH/billing/{tenantLocator}/payments/{locator}/fail |
| Fetch shortfall credits | GET/billing/{tenantLocator}/payments/{locator}/shortfallCredits/list |
| Preview Payment Validation | GET/billing/{tenantLocator}/payments/{locator}/previewValidate |
| Preview Payment Post | GET/billing/{tenantLocator}/payments/{locator}/previewPost |
Fetch
Fetch a Payment
fetchPayment/billing/{tenantLocator}/payments/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentsreadFetch Multiple Payments
fetchMultiplePayments/billing/{tenantLocator}/payments/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
offset | query | integer? | No | |
count | query | integer? | No | |
accountLocator | query | ulid? | No | |
targetContainerLocator | query | ulid? | No |
ListPageResponsePaymentResponsepaymentsread,listFetch Subpayments
fetchSubpayments/billing/{tenantLocator}/payments/{locator}/subpayments/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
offset | query | integer? | No | |
count | query | integer? | No |
ListPageResponsePaymentResponsepaymentsread,listFetch Payments With Number
fetchPaymentsWithNumber/billing/{tenantLocator}/payments/numbers/{paymentNumber}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
paymentNumber | path | string | Yes |
PaymentResponse[]paymentsread,listRequired properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | PaymentResponse[] |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
currency | string | |
paymentState | Enum draft | validated | requested | executing | posting | posted | failed | cancelled | reversing | reversed | discarded | |
amount | number | |
type | string | |
createdAt | datetime | |
createdBy | uuid | |
executionLog | PaymentRequestExecutionLogItem[] | |
shortfallCreditLocators | ulid[] | |
subpayments | SubpaymentResponse[] | |
targets | CreditItem[] |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
aggregatePaymentLocator | ulid? | |
externalCashTransactionLocator | ulid? | |
retryPlanName | string? | |
anonymizedAt | datetime? | |
nextRequestTime | datetime? | |
paymentMode | Enum? normal | aggregate | |
paymentNumber | string? | |
postedAt | datetime? | |
remainingAmount | number? | |
reversalReason | string? | |
reversedAt | datetime? | |
reversedBy | uuid? | |
validationResult | ValidationResult? | |
data | map<string, object>? |
Required properties
| Property | Type | Description |
|---|---|---|
subpaymentLocator | ulid | |
amount | number |
Required properties
| Property | Type | Description |
|---|---|---|
containerLocator | ulid | |
containerType | Enum invoice | account | subpayment | invoiceItem |
Optional properties
| Property | Type | Description |
|---|---|---|
amount | number? |
Required properties
| Property | Type | Description |
|---|---|---|
paymentRequestLocator | ulid | |
paymentRequestState | Enum pending | completed | failed | error | |
data | map<string, object> |
Optional properties
| Property | Type | Description |
|---|---|---|
note | string? | |
requestTime | datetime? | |
transactionId | string? |
Create and Update
Create a Payment
createPayment/billing/{tenantLocator}/paymentsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes |
A target with containerType: invoice can be an aggregate invoice locator. The amount is spread across its open contained invoices, earliest dueTime first, then smallest remaining amount. Overpayments are handled the same way they're handled with regular invoices.
Required properties
| Property | Type | Description |
|---|---|---|
amount | number | |
type | string | |
data | map<string, object> | |
targets | CreditItem[] |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
financialInstrumentLocator | ulid? | |
retryPlanName | string? | |
currency | string? | |
paymentMode | Enum? normal | aggregate | |
transactionMethod | Enum? ach | cash | eft | standard | wire | |
transactionNumber | string? | |
useDefaultFinancialInstrument | boolean? |
Update a Payment
updatePayment/billing/{tenantLocator}/payments/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
Required properties
| Property | Type | Description |
|---|---|---|
addTargets | CreditItem[] | |
removeData | map<string, object> | |
removeTargets | ulid[] | |
setData | map<string, object> |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
financialInstrumentLocator | ulid? | |
retryPlanName | string? | |
currency | string? | |
amount | number? | |
nextRequestTime | datetime? | |
paymentMode | Enum? normal | aggregate | |
transactionMethod | Enum? ach | cash | eft | standard | wire | |
transactionNumber | string? | |
type | string? | |
useDefaultFinancialInstrument | boolean? |
Update a Payment (overwrite extension data)
updatePaymentOverwriteData/billing/{tenantLocator}/payments/{locator}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
Validate a Payment
validatePayment/billing/{tenantLocator}/payments/{locator}/validateParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswritePost a Payment
postPayment/billing/{tenantLocator}/payments/{locator}/postParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteA target with containerType: invoice can be an aggregate invoice locator. The amount is spread across its open contained invoices, earliest dueTime first, then smallest remaining amount. Overpayments are handled the same way they're handled with regular invoices.
Reverse a Posted Payment
reversePayment/billing/{tenantLocator}/payments/{locator}/reverseParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
CreditDistributionReverseRequestPaymentResponsepaymentswriteReopening a contained invoice moves its aggregate invoice back to open.
Reset a Validated Payment Back to Draft State
resetPayment/billing/{tenantLocator}/payments/{locator}/resetParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteDiscard a Payment
discardPayment/billing/{tenantLocator}/payments/{locator}/discardParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteSet Payment Number
setPaymentNumber/billing/{tenantLocator}/payments/{locator}/number/setParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
paymentNumber | query | string | Yes |
PaymentResponsepaymentswriteGenerate Payment Number
generatePaymentNumber/billing/{tenantLocator}/payments/{locator}/number/generateParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswritePayment Requests
Execute Payment
executePayment/billing/{tenantLocator}/payments/{locator}/requestParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteCancel Payment
cancelPayment/billing/{tenantLocator}/payments/{locator}/cancelParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteFail Payment
failPayment/billing/{tenantLocator}/payments/{locator}/failParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PaymentResponsepaymentswriteShortfall Credits
Fetch shortfall credits
listShortfallCredits/billing/{tenantLocator}/payments/{locator}/shortfallCredits/listParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes | |
offset | query | integer? | No | |
count | query | integer? | No |
paymentsread,listRequired properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | 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? |
Payments by invoice
Fetch Payments For An Invoice
fetchPaymentsForAnInvoice/billing/{tenantLocator}/invoices/{locator}/payments/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 |
PaymentListResponseinvoicesread,listRequired properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | PaymentResponse[] |
Fetch Invoices Targeted By A Payment
fetchInvoicesTargetedByAPayment/billing/{tenantLocator}/payments/{locator}/invoices/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 |
InvoiceListResponsepaymentsread,listLists the invoices the payment was applied to. If the payment targeted an aggregate invoice, that aggregate invoice is listed alongside the regular invoices it settled. A payment made directly to a contained regular invoice lists only that regular invoice.
Payment Previews
Preview Payment Validation
previewPaymentValidate/billing/{tenantLocator}/payments/{locator}/previewValidateParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PreviewPaymentResponsepaymentsreadPreview Payment Post
previewPaymentPost/billing/{tenantLocator}/payments/{locator}/previewPostParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenantLocator | path | uuid | Yes | |
locator | path | ulid | Yes |
PreviewPaymentResponsepaymentsreadA target with containerType: invoice can be an aggregate invoice locator. The amount is spread across its open contained invoices, earliest dueTime first, then smallest remaining amount. Overpayments are handled the same way they're handled with regular invoices.
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
currency | string | |
paymentState | Enum draft | validated | requested | executing | posting | posted | failed | cancelled | reversing | reversed | discarded | |
amount | number | |
type | string | |
data | map<string, object> | |
createdAt | datetime | |
createdBy | uuid | |
credits | CreditWithBalance[] | |
shortfallCredits | ShortfallCreditPreviewResponse[] | |
targets | CreditItem[] |
Optional properties
| Property | Type | Description |
|---|---|---|
accountLocator | ulid? | |
aggregatePaymentLocator | ulid? | |
externalCashTransactionLocator | ulid? | |
invoices | ListPageResponseInvoicePaymentPreview? | |
paymentMode | Enum? normal | aggregate | |
postedAt | datetime? | |
remainingAmount | number? | |
validationResult | ValidationResult? | |
subpayments | PreviewPaymentResponse[]? |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
amount | number | |
type | Enum accountCreditBalance | invoiceCreditBalance | cash | creditCash | charge | credit | installmentItem | invoiceItem | account | policy | accountExpenseBalance | offset | claimCash | claimIndemnityExpense | claimAdjustmentExpense | claimRecoveryIncome | claimReserveLiability | claimReserveAsset | claimPaymentLiability | claimPaymentAsset |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
accountLocator | ulid | |
currency | string | |
shortfallCreditState | Enum draft | distributed | reversed | |
amount | number | |
creditType | Enum creditDistribution | disbursement | payment | subpayment | shortfallWriteOff | writeOff | |
targets | CreditItem[] |
Required properties
| Property | Type | Description |
|---|---|---|
listCompleted | boolean | |
items | InvoicePaymentPreview[] |
Required properties
| Property | Type | Description |
|---|---|---|
locator | ulid | |
accountLocator | ulid | |
invoiceState | Enum building | open | settled | discarded |
Optional properties
| Property | Type | Description |
|---|---|---|
amount | number? | |
remainingAmount | number? |