Introduction
Welcome to the Synder Transaction API! This API provides a single endpoint
/transactionApiImport/transactions that accepts POST requests to create new transactions
directly in your Synder account. Depending on the type field you pass in the
JSON body (PAYMENT, EXPENSE, REFUND, or
DEPOSIT), the API will record that specific transaction type in Synder along
with all associated details, including line items, fees, taxes, shipping information, and more.
Synder consolidates these financial events, making it easier to integrate with your accounting, billing, or e-commerce platforms. All transactions will appear in your Synder transactions tab, allowing you to keep track of various financial activities in one centralized location.
Basic Request Structure
All requests to create a transaction in Synder must:
- Use the POST HTTP method
- Include a valid authentication header (
X-SYNDER-AUTH) - Contain a JSON body conforming to the schema definitions outlined in this documentation
Authentication
To secure your requests, the Synder Transaction API expects an API key to be provided in the
header named X-SYNDER-AUTH. The server checks this header for validity. If it’s
missing or invalid, the API will respond with an HTTP 401 status code
(Unauthorized).
Example header:
POST /transactionApiImport/transactions HTTP/1.1
Host: go.synder.com
Content-Type: application/json
X-SYNDER-AUTH: <YOUR_API_KEY>
Tutorials
Below are common use cases for the Synder Transaction API. Each tutorial demonstrates how to structure the JSON payload for different transaction types. When you submit them, they’ll be added to your Synder account automatically.
1. Create a Payment
{
"transactionId": "1001",
"type": "PAYMENT",
"number": "INV-1001",
"grossTotal": 305,
"currency": "USD",
"date": "09/15/2023",
"person": {
"name": "Alice Johnson",
"email": "alice.johnson@example.com"
},
"exchangeRate": 1,
"fee": {
"amount": 5,
"currency": "USD",
"description": "Processing fee",
"exchangeRate": 1
},
"tax": {
"amount": 27.3,
"percent": 10,
"applyAfterDiscount": true,
"description": "Sales Tax",
"inclusive": false
},
"discount": {
"amount": 32,
"description": "Total discounts applied"
},
"tips": {
"amount": 5,
"description": "Thank you!"
},
"note": "Payment received",
"lineItems": [
{
"amount": 100,
"quantity": 2,
"unitPrice": 50,
"description": "High-quality widget",
"discount": {
"amount": 10,
"description": "Promotional discount"
},
"item": {
"name": "Widget A",
"sku": "WA-100"
},
"tax": {
"amount": 9,
"percent": 10,
"applyAfterDiscount": true,
"description": "Sales Tax",
"inclusive": false
}
},
{
"amount": 180,
"quantity": 3,
"unitPrice": 60,
"description": "Premium widget",
"discount": {
"amount": 15,
"description": "Bulk purchase discount"
},
"item": {
"name": "Widget B",
"sku": "WB-200"
},
"tax": {
"amount": 16.5,
"percent": 10,
"applyAfterDiscount": true,
"description": "Sales Tax",
"inclusive": false
}
}
],
"billingAddress": {
"city": "New York",
"country": "USA",
"line1": "123 Main Street",
"line2": "Suite 500",
"postalCode": "10001",
"region": "NY"
},
"shipping": {
"amount": 20,
"carrier": "FedEx",
"description": "Standard shipping",
"trackingNumber": "TRACK12345",
"address": {
"city": "New York",
"country": "USA",
"line1": "456 Elm Street",
"line2": "Apt 8B",
"postalCode": "10002",
"region": "NY"
},
"discount": {
"amount": 2,
"description": "Shipping promotion"
},
"tax": {
"amount": 1.8,
"percent": 10,
"applyAfterDiscount": true,
"description": "Sales Tax",
"inclusive": false
}
}
}
2. Create a Deposit
{
"transactionId": "4001",
"type": "DEPOSIT",
"number": "DEP-4001",
"grossTotal": 500,
"currency": "USD",
"date": "09/18/2023",
"person": {
"name": "David Lee",
"email": "david.lee@example.com"
},
"note": "Initial deposit for services",
"lineItems": [
{
"amount": 500,
"quantity": 1,
"unitPrice": 500,
"description": "Deposit for upcoming project",
"item": {
"name": "Service Deposit"
}
}
]
}
3. Create an Expense
{
"transactionId": "2001",
"type": "EXPENSE",
"number": "EXP-2001",
"grossTotal": 75,
"currency": "USD",
"date": "09/16/2023",
"person": {
"name": "Bob's Supplies",
"email": "contact@bobssupplies.com"
},
"note": "Office supplies purchase",
"lineItems": [
{
"amount": 25,
"quantity": 5,
"unitPrice": 5,
"description": "A4 size paper reams",
"item": {
"name": "Paper Reams"
}
},
{
"amount": 50,
"quantity": 2,
"unitPrice": 25,
"description": "Black ink cartridges",
"item": {
"name": "Ink Cartridges"
}
}
]
}
4. Create a Refund
{
"transactionId": "3001",
"type": "REFUND",
"number": "REF-3001",
"grossTotal": 150,
"currency": "USD",
"date": "09/17/2023",
"person": {
"name": "Charlie Smith",
"email": "charlie.smith@example.com"
},
"note": "Refund issued",
"lineItems": [
{
"amount": 50,
"quantity": 1,
"unitPrice": 50,
"description": "Refunded widget",
"item": {
"name": "Widget A"
}
},
{
"amount": 100,
"quantity": 2,
"unitPrice": 50,
"description": "Refunded premium widget",
"item": {
"name": "Widget B"
}
}
]
}
Example cURL Command
Here’s how you might send a cURL request to create a Payment transaction in Synder:
curl -X POST "https://go.synder.com/transactionApiImport/transactions" \
-H "Content-Type: application/json" \
-H "X-SYNDER-AUTH: <YOUR_API_KEY>" \
-d '{
"transactionId": "1001",
"type": "PAYMENT",
"number": "INV-1001",
"grossTotal": 305,
"currency": "USD",
"date": "09/15/2023",
"person": {
"name": "Alice Johnson",
"email": "alice.johnson@example.com"
}
// ...other fields...
}'
Try It Out (Swagger UI)
Use the interactive Swagger UI below to explore the Synder Transaction API’s endpoints, view required parameters, and make test requests directly into your Synder account.
Error Handling
The API may respond with different HTTP status codes and error messages:
- 200 OK – Transaction created successfully in Synder.
- 400 Bad Request – Invalid or missing fields in the request body.
- 401 Unauthorized – API key missing or invalid in the
X-SYNDER-AUTHheader. - 503 Service Unavailable – Server error or downtime. Please try again later.
Wrapping Up
With the Synder Transaction API, you can automate how financial transactions are recorded
within your Synder workspace. By leveraging the various type values
(PAYMENT, EXPENSE, REFUND, DEPOSIT)
and providing detailed information such as line items, fees, taxes, and shipping data,
you can ensure your Synder records are always up to date and accurate.
If you have any questions or need support, please check our developer resources or reach out to our support team at help@synder.com. Happy integrating!