Socotra
API ReferenceBilling API

Payments API

ActionEndpoint
Fetch a PaymentGET/billing/{tenantLocator}/payments/{locator}
Fetch Multiple PaymentsGET/billing/{tenantLocator}/payments/list
Fetch SubpaymentsGET/billing/{tenantLocator}/payments/{locator}/subpayments/list
Fetch Payments With NumberGET/billing/{tenantLocator}/payments/numbers/{paymentNumber}
Create a PaymentPOST/billing/{tenantLocator}/payments
Update a PaymentPATCH/billing/{tenantLocator}/payments/{locator}
Update a Payment (overwrite extension data)PUT/billing/{tenantLocator}/payments/{locator}
Validate a PaymentPATCH/billing/{tenantLocator}/payments/{locator}/validate
Post a PaymentPATCH/billing/{tenantLocator}/payments/{locator}/post
Reverse a Posted PaymentPATCH/billing/{tenantLocator}/payments/{locator}/reverse
Reset a Validated Payment Back to Draft StatePATCH/billing/{tenantLocator}/payments/{locator}/reset
Discard a PaymentPATCH/billing/{tenantLocator}/payments/{locator}/discard
Set Payment NumberPOST/billing/{tenantLocator}/payments/{locator}/number/set
Generate Payment NumberPOST/billing/{tenantLocator}/payments/{locator}/number/generate
Execute PaymentPATCH/billing/{tenantLocator}/payments/{locator}/request
Cancel PaymentPATCH/billing/{tenantLocator}/payments/{locator}/cancel
Fail PaymentPATCH/billing/{tenantLocator}/payments/{locator}/fail
Fetch shortfall creditsGET/billing/{tenantLocator}/payments/{locator}/shortfallCredits/list
Preview Payment ValidationGET/billing/{tenantLocator}/payments/{locator}/previewValidate
Preview Payment PostGET/billing/{tenantLocator}/payments/{locator}/previewPost

Fetch

Fetch a Payment

Fetch a PaymentfetchPayment
GET/billing/{tenantLocator}/payments/{locator}

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
read

Fetch Multiple Payments

Fetch Multiple PaymentsfetchMultiplePayments
GET/billing/{tenantLocator}/payments/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
offsetqueryinteger?No
countqueryinteger?No
accountLocatorqueryulid?No
targetContainerLocatorqueryulid?No
extendedqueryboolean?No
Security Group:payments
Permissions:
read,list

Fetch Subpayments

Fetch SubpaymentsfetchSubpayments
GET/billing/{tenantLocator}/payments/{locator}/subpayments/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
offsetqueryinteger?No
countqueryinteger?No
Security Group:payments
Permissions:
read,list

Fetch Payments With Number

Fetch Payments With NumberfetchPaymentsWithNumber
GET/billing/{tenantLocator}/payments/numbers/{paymentNumber}

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
paymentNumberpathstringYes
Response:PaymentResponse[]
Security Group:payments
Permissions:
read,list
ListPageResponsePaymentResponse

Required properties

PropertyTypeDescription
listCompletedboolean
itemsPaymentResponse[]
PaymentResponse

Required properties

PropertyTypeDescription
locatorulid
currencystring
paymentStateEnum draft | validated | requested | executing | posted | failed | cancelled | reversed | discarded
amountnumber
typestring
createdAtdatetime
createdByuuid
executionLogPaymentRequestExecutionLogItem[]
shortfallCreditLocatorsulid[]
subpaymentsSubpaymentResponse[]
targetsCreditItem[]

Optional properties

PropertyTypeDescription
accountLocatorulid?
aggregatePaymentLocatorulid?
externalCashTransactionLocatorulid?
retryPlanNamestring?
anonymizedAtdatetime?
nextRequestTimedatetime?
paymentModeEnum? normal | aggregate
paymentNumberstring?
postedAtdatetime?
remainingAmountnumber?
reversalReasonstring?
reversedAtdatetime?
reversedByuuid?
validationResultValidationResult?
datamap<string, object>?
SubpaymentResponse

Required properties

PropertyTypeDescription
subpaymentLocatorulid
amountnumber
CreditItem

Required properties

PropertyTypeDescription
containerLocatorulid
containerTypeEnum invoice | account | subpayment | invoiceItem

Optional properties

PropertyTypeDescription
amountnumber?
PaymentRequestExecutionLogItem

Required properties

PropertyTypeDescription
paymentRequestLocatorulid
paymentRequestStateEnum pending | completed | failed | error
datamap<string, object>

Optional properties

PropertyTypeDescription
notestring?
requestTimedatetime?
transactionIdstring?

Create and Update

Create a Payment

Create a PaymentcreatePayment
POST/billing/{tenantLocator}/payments

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
Security Group:payments
Permission:
write
PaymentCreateRequest

Required properties

PropertyTypeDescription
amountnumber
typestring
datamap<string, object>
targetsCreditItem[]

Optional properties

PropertyTypeDescription
accountLocatorulid?
financialInstrumentLocatorulid?
retryPlanNamestring?
currencystring?
paymentModeEnum? normal | aggregate
transactionMethodEnum? ach | cash | eft | standard | wire
transactionNumberstring?
useDefaultFinancialInstrumentboolean?

Update a Payment

Update a PaymentupdatePayment
PATCH/billing/{tenantLocator}/payments/{locator}

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write
PaymentUpdateRequest

Required properties

PropertyTypeDescription
addTargetsCreditItem[]
removeDatamap<string, object>
removeTargetsulid[]
setDatamap<string, object>

Optional properties

PropertyTypeDescription
accountLocatorulid?
financialInstrumentLocatorulid?
retryPlanNamestring?
currencystring?
amountnumber?
nextRequestTimedatetime?
paymentModeEnum? normal | aggregate
transactionMethodEnum? ach | cash | eft | standard | wire
transactionNumberstring?
typestring?
useDefaultFinancialInstrumentboolean?

Update a Payment (overwrite extension data)

Update a Payment (overwrite extension data)updatePaymentOverwriteData
PUT/billing/{tenantLocator}/payments/{locator}

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Validate a Payment

Validate a PaymentvalidatePayment
PATCH/billing/{tenantLocator}/payments/{locator}/validate

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Post a Payment

Post a PaymentpostPayment
PATCH/billing/{tenantLocator}/payments/{locator}/post

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Reverse a Posted Payment

Reverse a Posted PaymentreversePayment
PATCH/billing/{tenantLocator}/payments/{locator}/reverse

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Reset a Validated Payment Back to Draft State

Reset a Validated Payment Back to Draft StateresetPayment
PATCH/billing/{tenantLocator}/payments/{locator}/reset

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Discard a Payment

Discard a PaymentdiscardPayment
PATCH/billing/{tenantLocator}/payments/{locator}/discard

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Set Payment Number

Set Payment NumbersetPaymentNumber
POST/billing/{tenantLocator}/payments/{locator}/number/set

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
paymentNumberquerystringYes
Security Group:payments
Permission:
write

Generate Payment Number

Generate Payment NumbergeneratePaymentNumber
POST/billing/{tenantLocator}/payments/{locator}/number/generate

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Payment Requests

Execute Payment

Execute PaymentexecutePayment
PATCH/billing/{tenantLocator}/payments/{locator}/request

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Cancel Payment

Cancel PaymentcancelPayment
PATCH/billing/{tenantLocator}/payments/{locator}/cancel

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Fail Payment

Fail PaymentfailPayment
PATCH/billing/{tenantLocator}/payments/{locator}/fail

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
write

Shortfall Credits

Fetch shortfall credits

Fetch shortfall creditslistShortfallCredits
GET/billing/{tenantLocator}/payments/{locator}/shortfallCredits/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
offsetqueryinteger?No
countqueryinteger?No
Security Group:payments
Permissions:
read,list
ListPageResponseShortfallCreditResponse

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?

Payments by invoice

Fetch Payments For An Invoice

Fetch Payments For An InvoicefetchPaymentsForAnInvoice
GET/billing/{tenantLocator}/invoices/{locator}/payments/list

Parameters

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

Required properties

PropertyTypeDescription
listCompletedboolean
itemsPaymentResponse[]

Fetch Invoices Targeted By APayment

Fetch Invoices Targeted By A PaymentfetchInvoicesTargetedByAPayment
GET/billing/{tenantLocator}/payments/{locator}/invoices/list

Parameters

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

Payment Previews

Preview Payment Validation

Preview Payment ValidationpreviewPaymentValidate
GET/billing/{tenantLocator}/payments/{locator}/previewValidate

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
read

Preview Payment Post

Preview Payment PostpreviewPaymentPost
GET/billing/{tenantLocator}/payments/{locator}/previewPost

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:payments
Permission:
read
PreviewPaymentResponse

Required properties

PropertyTypeDescription
locatorulid
currencystring
paymentStateEnum draft | validated | requested | executing | posted | failed | cancelled | reversed | discarded
amountnumber
typestring
datamap<string, object>
createdAtdatetime
createdByuuid
creditsCreditWithBalance[]
shortfallCreditsShortfallCreditPreviewResponse[]
targetsCreditItem[]

Optional properties

PropertyTypeDescription
accountLocatorulid?
aggregatePaymentLocatorulid?
externalCashTransactionLocatorulid?
invoicesListPageResponseInvoicePaymentPreview?
paymentModeEnum? normal | aggregate
postedAtdatetime?
remainingAmountnumber?
validationResultValidationResult?
subpaymentsPreviewPaymentResponse[]?
CreditWithBalance

Required properties

PropertyTypeDescription
locatorulid
amountnumber
typeEnum accountCreditBalance | invoiceCreditBalance | cash | creditCash | charge | credit | installmentItem | invoiceItem | account | policy | accountExpenseBalance
ShortfallCreditPreviewResponse

Required properties

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

Required properties

PropertyTypeDescription
listCompletedboolean
itemsInvoicePaymentPreview[]
InvoicePaymentPreview

Required properties

PropertyTypeDescription
locatorulid
accountLocatorulid
invoiceStateEnum open | settled | discarded

Optional properties

PropertyTypeDescription
amountnumber?
remainingAmountnumber?

See Also

On this page