For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact Us
Knowledge BaseProduct UpdatesAPI Documentation
Knowledge BaseProduct UpdatesAPI Documentation
    • Getting Started
  • API Reference
      • GETCheck if a transaction exists
      • POSTAdd a new transaction
      • PUTUpdate an existing transaction
      • DELSubmit a deletion request for a transaction and any related data
      • POSTAdd transactions in batch
      • PUTUpdate transactions in batch
Contact Us
LogoLogo
API ReferenceTransactions

Add a new transaction

POST
https://api.cable.tech/v2/transaction
POST
/v2/transaction
$curl -X POST https://api.cable.tech/v2/transaction \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "timestamp": "2024-01-15T09:30:00Z",
> "tx_id": "TX1234567890ABCDEF1234"
>}'
1{
2 "success": true,
3 "write_count": 1,
4 "message": "Transaction recorded successfully.",
5 "organization_id": "org_987654321"
6}
Was this page helpful?
Previous

Update an existing transaction

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

Transaction data to add. Amount and currency are required for new transactions. At least one of sender_id or receiver_id must be provided with their respective country codes.

timestampdatetimeRequired
When the transaction was processed in your system, in ISO 8601 format. For updates, use when the event occurred, not when you're reporting it.
tx_idstringRequired
Unique identifier for the transaction. This is the primary key for the transaction record and should be unique across all transactions. Updates to a transaction should be made using this identifier.
typeenumRequired
Transaction type. Required when creating new transactions, optional for updates.
Allowed values:
methodenumRequired
Payment method used for the transaction. Required when creating new transactions, optional for updates. Each method may have different processing times, fees, and regulatory requirements.
amountdouble or nullRequired

Transaction amount. Negative amounts are allowed for refunds, chargebacks, and credits. Zero amounts are allowed for auth-only, declined, and pre-authorization transactions. Required when creating new transactions, optional for updates.

currencystringRequiredformat: "iso-4217"
ISO 4217 currency code. Required when creating new transactions, optional for updates.
statusenumRequired
Transaction status. Required when creating new transactions, optional for updates.
is_testbooleanOptionalDefaults to false
If the transaction is test data, this should be set to true
amount_usddoubleOptional

Amount in USD, if not provided will be calculated using the latest exchange rate using data from Open Exchange Rates (https://openexchangerates.org)

sender_idstring or nullOptional

Identifier of the sender (e.g., account number, customer ID). This ID should match the identifier used in your customer data sent to Cable. Required if receiver_id is not provided.

sender_countrystringOptionalformat: "iso-3166-1"

ISO 3166-1 alpha-2 country code of the sender. Required when sender_id is provided.

receiver_idstring or nullOptional

Identifier of the receiver (e.g., account number, customer ID). Required if sender_id is not provided.

receiver_countrystringOptionalformat: "iso-3166-1"

ISO 3166-1 alpha-2 country code of the receiver. Required when receiver_id is provided.

Response

Transaction added successfully
successboolean
Indicates if the write operation was successful.
write_countinteger
The number of records written to the database.
messagestring
Provides additional information about the operation result.
organization_idstring
The organization ID for which the operation was performed.

Errors

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error