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",
  "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>"
  },
  "invoice_currency": "USD",
  "subtotal": 10.99,
  "discount": 0.99,
  "shipping_and_handling": 0,
  "total": 10.99,
  "line_items": {
    "items": [
      {
        "amount": 123,
        "quantity": 123,
        "tax_code": "TPP",
        "product_id": "<string>",
        "external_id": "<string>"
      }
    ]
  },
  "tax_collected": 123,
  "invoice_type": "SALE",
  "source_platform": "RAZORPAY"
}'
{
  "data": {
    "id": "2535af08-a139-4d0c-9827-1651e46dfbcf",
    "corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
    "transacted_at": "2023-12-25",
    "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>"
    },
    "invoice_currency": "USD",
    "subtotal": 10.99,
    "discount": 0.99,
    "shipping_and_handling": 0,
    "total": 10.99,
    "line_items": {
      "items": [
        {
          "amount": 123,
          "quantity": 123,
          "tax_code": "TPP",
          "product_id": "<string>",
          "external_id": "<string>"
        }
      ]
    },
    "tax_collected": 123,
    "transaction_status": "LOCKED",
    "invoice_type": "SALE",
    "source_platform": "RAZORPAY"
  },
  "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.

transacted_at
string
required

ISO 8601 formatted date string indicating date on which the transaction took place. If tax calculations need to be based on a different date, please contact our team for assistance.

customer_details
object
required

Customer details for this transaction.

invoice_currency
string
required

ISO 4217 alpha-3 currency code for the transaction.

subtotal
number
required

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

total
number
required

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

line_items
object
required
tax_collected
number
required

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

invoice_type
enum<string>
required

Type of the transaction. Currently sales and refund transactions are supported.

Available options:
SALE,
REFUND
discount
number

Total discount amount applied to the subtotal.

shipping_and_handling
number

Total shipping and handling charges.

source_platform
enum<string>

The platform from which the transaction originated. This is useful for tracking transactions from different platforms.

Available options:
RAZORPAY,
OTHER

Response

200
application/json
Transaction creation response
data
object
message
string