POST
/
orders
/
external
{
  "merchant_external_id": "merchant_123",
  "users": {
    "user_link_id": "link_abc123"
  },
  "transaction_total": 2550,
  "transaction_sub_total": 2300,
  "transaction_discount": 200,
  "order_external_id": "order_456789",
  "order_payment_id": "payment_xyz789",
  "line_items": [
    {
      "product_id": "prod_001",
      "product_name": "Premium Coffee",
      "product_price": 1200
    },
    {
      "product_id": "prod_002",
      "product_name": "Pastry",
      "product_price": 800
    }
  ]
}
{
  "code": "created",
  "message": "External order created successfully",
  "data": {
    "order_id": "benji_order_123456",
    "external_order_id": "order_456789",
    "merchant_id": "benji_merchant_789",
    "user_id": "benji_user_456",
    "total_amount": 2550,
    "status": "pending",
    "created_date": "2024-09-25T10:30:00.000Z"
  }
}
The Bearer token to be used on this API is your partner access token
This endpoint allows you to create an external order in the Benji platform. This is used to track orders from external systems and associate them with users for reward processing.

Request Body

user
object
required
User identification information. At least one of the following fields must be provided:
transaction_total
integer
required
The total transaction amount in cents (e.g., $1.50 = 150)
transaction_subtotal
integer
required
The subtotal transaction amount in cents (before taxes, fees, etc.)
transaction_discount
integer
The discount amount in cents, if any
order_external_id
string
required
The external order identifier from your system
order_payment_id
string
The payment identifier associated with this order
line_items
array
Array of line items in the order

Return values

code
string
Status code indicating the result of the operation
data
object
Response data containing the order information
{
  "merchant_external_id": "merchant_123",
  "users": {
    "user_link_id": "link_abc123"
  },
  "transaction_total": 2550,
  "transaction_sub_total": 2300,
  "transaction_discount": 200,
  "order_external_id": "order_456789",
  "order_payment_id": "payment_xyz789",
  "line_items": [
    {
      "product_id": "prod_001",
      "product_name": "Premium Coffee",
      "product_price": 1200
    },
    {
      "product_id": "prod_002",
      "product_name": "Pastry",
      "product_price": 800
    }
  ]
}
{
  "code": "created",
  "message": "External order created successfully",
  "data": {
    "order_id": "benji_order_123456",
    "external_order_id": "order_456789",
    "merchant_id": "benji_merchant_789",
    "user_id": "benji_user_456",
    "total_amount": 2550,
    "status": "pending",
    "created_date": "2024-09-25T10:30:00.000Z"
  }
}
User Identification: You must provide at least one of the user identification fields:
  • merchant_external_id: Use when you have the merchant’s customer ID
  • user_link_id: Use when you have a link ID from the Link User endpoint
  • user_id: Use when you have the Benji platform user ID directly
Amount Format: All monetary values should be provided in cents. For example:
  • $1.50 should be sent as 150
  • $25.99 should be sent as 2599
  • $100.00 should be sent as 10000
Make sure the order_external_id is unique within your system to avoid conflicts when creating orders.