Synswi
  1. Transactions
Synswi
  • Invoice
    • Get invoice by id
      GET
    • Get invoices
      GET
    • Create an invoice
      POST
    • Pay an invoice
      POST
    • Send Invoice
      POST
    • Update an invoice
      POST
  • Payment instruments
    • Create a payment instrument
    • Get payment instruments
      GET
    • Get a payment instrument by id
      GET
  • Transactions
    • Get a transaction by id
      GET
    • Get transactions
      GET
    • Create a transaction
      POST
  1. Transactions

Create a transaction

POST
https://api-sandbox.synswi.com/transactions

Request

Body Params application/json
accountId
string 
required
The accountId used to process the transaction.
serialNumber
string 
optional
Serial number of the device used to process transactions. Required if channel is in person
amount
integer 
required
Amount of the transaction in cents
channel
enum<string> 
required
Online or in person
Allowed values:
onlinein person
paymentInstrumentId
string 
optional
required when channel is online
type
enum<string> 
required
Pull transaction is used to accept payments. Push transaction is used to send payments.
Allowed values:
pullpush
referenceId
string 
optional
Idempotency key used to prevent duplicates
method
enum<string> 
required
The payment method. Can be ach or card.
Allowed values:
cardach
Example
{
    "amount": 2060,
    "paymentInstrumentId": "payment-instrument-eb769f34-b952-4ea0-ae4e-4666c1737995",
    "accountId": "{{accountId}}",
    "type": "pull",
    "method": "card",
    "channel": "online",
    "referenceId": "12113ff9daddda1dsx314d33",
    "tags": {
        "invoiceId": "test-invoice"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-sandbox.synswi.com/transactions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 2060,
    "paymentInstrumentId": "payment-instrument-eb769f34-b952-4ea0-ae4e-4666c1737995",
    "accountId": "acc-c068c34e-b12d-48b1-bc5f-c85edag8tgiut",
    "type": "pull",
    "method": "card",
    "channel": "online",
    "referenceId": "12113ff9daddda1dsx314d33",
    "tags": {
        "invoiceId": "test-invoice"
    }
}'

Responses

🟢200Success
application/json
Body
id
string 
required
accountId
string 
required
amount
integer 
required
channel
string 
required
createdAt
string 
required
currency
string 
required
method
string 
required
paymentInstrumentId
string 
required
referenceId
string 
required
status
string 
required
statusReason
string 
optional
type
string 
required
Example
{
    "id": "transaction-98a14246-1ca7-4e4f-ac6b-b19a540580f8",
    "accountId": "acc-c068c34e-b12d-48b1-bc5f-c85edae9fc9b",
    "amount": 200,
    "channel": "online",
    "createdAt": "2025-01-15T01:59:14.793Z",
    "currency": "USD",
    "method": "card",
    "paymentInstrumentId": "payment-instrument-7ca318bc-e84c-4c02-a1da-d520a05a8f68",
    "referenceId": "12113ff9a1131433",
    "status": "succeeded",
    "statusReason": "transaction succeeded",
    "type": "pull"
}
Previous
Get transactions
Built with