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
| Field | Type | Description |
|---|---|---|
| transactions* | Transaction[] | |
| transactions[].type* | string | payment, feePrincipal, feeLoan, discountPrincipal, or discountLoan. |
| transactions[].amount* | number | |
| transactions[].date* | string | YYYY-MM-DD. |
| transactions[].dealId | string | |
| transactions[].merchantName | string | |
| transactions[].dealName | string | |
| transactions[].description | string | Max 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 }
]
}