MCA Suite v2 Docs

Transactions

Add transactions in bulk

POST /v1/transactions

Each transaction in the array is processed independently -- some may succeed while others fail. Check transactions[i].success / .error in the response for per-item results.

Request

FieldTypeDescription
transactions*Transaction[]
transactions[].type*stringpayment, feePrincipal, feeLoan, discountPrincipal, or discountLoan.
transactions[].amount*number
transactions[].date*stringYYYY-MM-DD.
transactions[].dealIdstring
transactions[].merchantNamestring
transactions[].dealNamestring
transactions[].descriptionstringMax 100 characters.

Example

result = client.transactions.add_bulk([
    {"dealId": "k8fxfmo59ezdu", "type": "payment", "amount": 10.25, "date": "2024-01-15"},
])
print(result.successfulTransactions, "of", result.totalTransactions, "succeeded")

Example response

{
  "success": true,
  "message": "1 of 1 transactions processed successfully",
  "totalTransactions": 1,
  "successfulTransactions": 1,
  "failedTransactions": 0,
  "transactions": [
    { "dealId": "k8fxfmo59ezdu", "transactionId": "tx_abc123", "success": true, "error": null }
  ]
}