POST
/
transactions
curl --request POST \
  --url https://base_url/api/v1/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
  "transacted_at": "2023-12-25",
  "tax_date_override": "2023-12-25",
  "invoice_currency": "USD",
  "subtotal": 1,
  "discount": 0.99,
  "shipping_and_handling": 1,
  "total": 1,
  "tax_collected": 1,
  "transaction_type": "SALE",
  "calculation_id": "<string>",
  "customer_details": {
    "shipping_address": {
      "address_line_1": "1776 Main St",
      "address_line_2": "Apt. #123",
      "address_line_3": "<string>",
      "postal_code": "90401",
      "city": "Santa Monica",
      "state": "CA",
      "country": "US"
    },
    "customer_id": "<string>",
    "customer_external_id": "<string>"
  },
  "line_items": {
    "items": [
      {
        "amount": 1,
        "quantity": 2,
        "tax_collected": 1,
        "tax_code": "<string>",
        "product_id": "<string>",
        "product_sku": "<string>",
        "exemption_type": "PURPOSE_RESALE"
      }
    ]
  },
  "exemption_type": "PURPOSE_RESALE"
}'
{
  "data": {
    "id": "2535af08-a139-4d0c-9827-1651e46dfbcf",
    "corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
    "transacted_at": "2023-12-25",
    "tax_date_override": "2023-12-25",
    "invoice_currency": "USD",
    "subtotal": 1,
    "discount": 0.99,
    "shipping_and_handling": 1,
    "total": 1,
    "tax_collected": 1,
    "transaction_type": "SALE",
    "transaction_status": "LOCKED",
    "calculation_id": "<string>",
    "customer_details": {
      "shipping_address": {
        "address_line_1": "1776 Main St",
        "address_line_2": "Apt. #123",
        "address_line_3": "<string>",
        "postal_code": "90401",
        "city": "Santa Monica",
        "state": "CA",
        "country": "US"
      },
      "customer_id": "<string>",
      "customer_external_id": "<string>"
    },
    "source_platform": "RAZORPAY",
    "line_items": {
      "items": [
        {
          "amount": 123,
          "quantity": 123,
          "tax_collected": 123,
          "tax_code": "<string>",
          "product_id": "<string>",
          "product_sku": "<string>",
          "exemption_type": "PURPOSE_RESALE"
        }
      ]
    },
    "exemption_type": "PURPOSE_RESALE",
    "parent_invoice_id": "<string>"
  },
  "message": "Successfully created transaction."
}

Authorizations

Authorization
string
header
required

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

Body

application/json
corporation_id
string
required

The unique identifier for the corporation associated with this transaction.

Example:

"b6d009b0-d174-463f-b030-94643c28e209"

transacted_at
string
required

ISO 8601 formatted date string indicating date on which the transaction took place.

invoice_currency
string
required

ISO 4217 alpha-3 currency code for the transaction.

Example:

"USD"

transaction_type
enum<string>
required

Type of the transaction. Must be SALE on this endpoint. Refund transactions should be created using /transactions/refund-transactions.

Available options:
SALE,
REFUND
customer_details
object
required
line_items
object
required
tax_date_override
string

ISO 8601 formatted date string indicating the date on which the tax liability should be recognized for filings and for nexus tracking, if different from the transacted_at date.

subtotal
number

Total amount before tax, shipping, handling, and discounts.

Required range: x >= 0
discount
number

Total discount amount applied to the transaction.

Required range: x >= 0
Example:

0.99

shipping_and_handling
number

Total shipping and handling charges.

Required range: x >= 0
total
number

This is the total amount charged to the customer, which includes the subtotal, shipping and handling fees, tax, and reflects any applied discounts.

Required range: x >= 0
tax_collected
number

Numeric value representing the amount of sales tax paid by the customer for this transaction.

Required range: x >= 0
calculation_id
string

Optional ID of a previous calculation used for this transaction.

exemption_type
enum<string>

If this field is present, this transaction will be considered exempt.

Available options:
PURPOSE_RESALE,
ENTITY_TYPE_NONPROFIT,
GOVERNMENT,
MANUFACTURER,
AGRICULTURAL,
OTHER

Response

200
application/json
Transaction creation response
data
object
message
string
Example:

"Successfully created transaction."