Create
POST/transactions
Creates a transaction.
Body ParametersJSON
amount: string
Transaction amount, as a string in the smallest unit of the currency (for example, cents for USD). Can be positive or negative.
external_id: string
User-provided unique ID.
posted: string
Timestamp when the transaction was posted. Uses ISO 8601 format.
formatdate-time
Returns
Create
curl https://api.us-west-2.fragment.dev/transactions \
-H 'Content-Type: application/json' \
-d '{
"account": {},
"allocations": [
{
"amount": "1000",
"invoice_id": "inv_abc123",
"type": "invoice_payin",
"user": {
"id": "user_abc123"
}
}
],
"amount": "-1000",
"currency": "USD",
"external_id": "bank_txn_123",
"posted": "2024-01-13T00:00:00Z"
}'{
"data": {
"id": "txn_dHhuX2ZyYWdfMDAx",
"account": {
"id": "ext_account_YWJjMTIz",
"external_id": "acct_external_123"
},
"allocations": [
{
"amount": "1000",
"invoice_id": "inv_abc123",
"type": "invoice_payin",
"user": {
"id": "user_abc123",
"external_id": "user_ext_001"
}
}
],
"amount": "-1000",
"created": "2024-01-13T00:00:00Z",
"currency": "USD",
"external_id": "bank_txn_123",
"posted": "2024-01-13T00:00:00Z",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"unallocated_amount": "-1000",
"version": 1,
"modified": "2024-01-13T00:00:00Z"
}
}Returns Examples
{
"data": {
"id": "txn_dHhuX2ZyYWdfMDAx",
"account": {
"id": "ext_account_YWJjMTIz",
"external_id": "acct_external_123"
},
"allocations": [
{
"amount": "1000",
"invoice_id": "inv_abc123",
"type": "invoice_payin",
"user": {
"id": "user_abc123",
"external_id": "user_ext_001"
}
}
],
"amount": "-1000",
"created": "2024-01-13T00:00:00Z",
"currency": "USD",
"external_id": "bank_txn_123",
"posted": "2024-01-13T00:00:00Z",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"unallocated_amount": "-1000",
"version": 1,
"modified": "2024-01-13T00:00:00Z"
}
}