curl --request POST \
--url https://api.rootfi.dev/v4/ecommerce/transactions \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"company_id": 1089,
"data": [
{
"type": "PAYMENT",
"order_id": "ord_shopify_001",
"currency_id": "USD",
"amount": 97.19,
"status": "PAID",
"payment_method_type": "CARD",
"gateway": "shopify_payments",
"description": "Payment for order ORD-2024-001"
}
]
}
'{
"data": [
{
"rootfi_id": 8001,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.000Z",
"rootfi_company_id": 1089,
"platform_id": "pay_shopify_001",
"type": "PAYMENT",
"order_id": "ord_shopify_001",
"contact_id": "cus_001",
"currency_id": "USD",
"amount": 97.19,
"status": "PAID",
"payment_method_type": "CARD",
"gateway": "shopify_payments",
"description": "Payment for order ORD-2024-001",
"created_at": "2024-01-22T05:07:31.465Z",
"updated_at": "2024-01-22T05:07:31.000Z"
}
],
"sync_id": "sync_123456"
}Create a new transaction in the e-commerce platform.
curl --request POST \
--url https://api.rootfi.dev/v4/ecommerce/transactions \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"company_id": 1089,
"data": [
{
"type": "PAYMENT",
"order_id": "ord_shopify_001",
"currency_id": "USD",
"amount": 97.19,
"status": "PAID",
"payment_method_type": "CARD",
"gateway": "shopify_payments",
"description": "Payment for order ORD-2024-001"
}
]
}
'{
"data": [
{
"rootfi_id": 8001,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.000Z",
"rootfi_company_id": 1089,
"platform_id": "pay_shopify_001",
"type": "PAYMENT",
"order_id": "ord_shopify_001",
"contact_id": "cus_001",
"currency_id": "USD",
"amount": 97.19,
"status": "PAID",
"payment_method_type": "CARD",
"gateway": "shopify_payments",
"description": "Payment for order ORD-2024-001",
"created_at": "2024-01-22T05:07:31.465Z",
"updated_at": "2024-01-22T05:07:31.000Z"
}
],
"sync_id": "sync_123456"
}| Field | Type | Required | Description |
|---|---|---|---|
| company_id | integer | Yes | The rootfi_company_id to associate this transaction with |
| data | array | Yes | Array of transaction objects to create |
| data[].type | string | Yes | Type of transaction (PAYMENT, REFUND, CHARGEBACK, ADJUSTMENT) |
| data[].order_id | string | Yes | Reference to the associated Order |
| data[].contact_id | string | No | Reference to the Contact |
| data[].currency_id | string | Yes | ISO 4217 currency code (e.g., USD, EUR) |
| data[].amount | number | Yes | Transaction amount (always positive, use type to determine direction) |
| data[].status | string | No | Transaction status (REQUIRES_ACTION, PENDING, AUTHORIZED, PAID, FAILED, CANCELED, REFUNDED, UNKNOWN, REVERSED). Defaults to PENDING |
| data[].payment_method_type | string | No | Payment method used (CARD, BANK_TRANSFER, WIRE_TRANSFER, etc.) |
| data[].gateway | string | No | Payment processor or gateway name (e.g., “shopify”, “stripe”) |
| data[].gateway_transaction_id | string | No | Transaction ID from the payment gateway |
| data[].original_transaction_id | string | No | For refunds, reference to the original payment transaction |
| data[].description | string | No | Human-readable description of the transaction |
| data[].reason | string | No | Reason for the transaction (primarily used for refunds) |