Orders
Get Order By Id
Returns order details for a given order id. Useful for gathering details such as custom field data after a webhook event is received.
Request:
GET /order/{id}
Response:
200 OK
{
"data": {
"id": "odr_5b730d12253bb55f1ceb36f1",
"order_number": "N3788",
"created_at": "2018-08-14T17:10:50.972Z",
"sale_type": "virtual_terminal",
"customer": {
"id": "8042410",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
"addresses": []
},
"order_status": "paid",
"payment_status": "authorized",
"items": [
{
"offering_id": "o_5b0320f4253baf57c0f367e7",
"name": "Button Down Shirt",
"quantity": 2,
"price": 3,
"amount_subtotal": 6.06,
"custom_data": [],
"fees": [
{
"id": "fs_59389a39253baf43c8ec9468",
"name": "Processing Fee",
"value": "3%",
"amount_total": 0.18
}
],
"taxes": [
{
"id": "fs_58c87fa1253bb02fa04325d4",
"name": "Colorado Tax",
"value": "3%",
"amount_total": 0.18
}
],
"discount": {
"id": "fs_58c973e8253bc42fa060dd78",
"name": "Loyal Customer Discount",
"value": "2%",
"amount_total": 0.12
}
},
{
"offering_id": "o_5b5110c3253bb11260a201ec",
"name": "Shirt of the month club",
"quantity": 1,
"price": 34,
"amount_subtotal": 15.05,
"custom_data": [
{
"label": "Shirt Size",
"field_id": "5b730034253bb19ad49c3302",
"value": "Small"
}
],
"subscription_id": "sub_5b730d1a253bb55f1ceb36f4",
"proration": {
"full_amount": 34,
"period_days": 31,
"prorated_days": 14,
"period_start_date": "2018-07-28",
"start_date": "2018-08-14",
"end_date": "2018-08-28",
"discounted_proration_adjustment": 18.27
},
"recurrence": {
"day_of_month_type": "specific_day_of_month",
"specific_day_of_month": 28,
"frequency": "monthly",
"periods_between_occurrence": 1
},
"fees": [],
"taxes": [],
"discount": {
"id": "fs_58c973e8253bc42fa060dd78",
"name": "Loyal Customer Discount",
"value": "2%",
"amount_total": 0.68
}
}
],
"transactions": [
{
"id": 29124747,
"created_at": "2018-08-14T17:10:51.012Z",
"status": "authorized",
"funding": "payment",
"amount": 41.89,
"credit_card_account": {
"id": 7314072,
"last4": "7099",
"card_type": "master_card",
"expiration": {
"year": 2019,
"month": 10
}
},
"payment_type": "credit_card",
"payment_type_code": "Moto",
"payment_source": "virtual_terminal",
"auth_code": "573826",
"is_refund": false,
"salesperson": {
"id": 61288,
"user_name": "[email protected]",
"first_name": "Sally",
"last_name": "Sales"
},
"estimated_deposit_date": "2018-08-16T06:00:00Z",
"can_void_until": "2018-08-15T02:45:00Z",
"input_method": "key_entered"
}
],
"order_fees": [
{
"id": "fs_5a4c00bd253baf50404aafbd",
"name": "ship fee 5",
"amount_total": 20,
"taxes": [
{
"id": "fs_58c87fa1253bb02fa04325d4",
"name": "Colorado Tax",
"value": "3%",
"amount_total": 3
}
]
}
],
"taxes": [
{
"id": "fs_58c87fa1253bb02fa04325d4",
"name": "Colorado Tax",
"value": "3%",
"amount_total": 0.78
}
],
"amount_tax": 0.78,
"amount_tip": 0,
"amount_subtotal": 41.11,
"amount_total": 41.89,
"amount_paid": 41.89,
"amount_due": 0,
"amount_refunded": 0
}
}
Order Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier of order. |
order_number | string | Display number of order. |
created_at | datetime | Date and time order created. |
sale_type | string | PaySimple system from which the order was created (see Sale Types) |
customer | object | PaySimple Customer. |
customer.id | integer | Unique identifier of customer. |
customer.first_name | string | First name of customer. |
customer.last_name | string | Last name of customer. |
customer.email | string | Email of customer. |
customer.addresses | array | Shipping or service addresses collected at checkout (see Address Properties) |
order_status | string | Current state of order (see Order Status Types). |
payment_status | string | The state of the last payment made against the order (see Payment Status Types). If no payments have been made, this value will not be returned. |
items | array | Order line items (see Order Item Properties. |
transactions | array | Payments and refunds made on order (see Transaction Properties). |
order_fees | array | Order level fees charged (see Order Fee Properties). |
amount_tax | decimal | Total tax amount charged |
amount_tip | decimal | Total tip amount charged |
amount_subtotal | decimal | Total amount charged, not including tax |
amount_total | decimal | Total amount of order |
amount_paid | decimal | Amount of amount_total that has been paid |
amount_due | decimal | Balance due on order |
amount_refunded | decimal | Amount of payments that have been refunded to the customer |
Sale Types
Value | Description |
---|---|
virtual_terminal | Created by merchant in Point of Sale |
online_store | Created by customer in Online Store |
recurring_payment | Created by recurring payment |
payment_plan | Created by payment plan |
invoice | Created by paying invoice |
api | Created via API 4 |
ios | Created by mobile app using device running Apple iOS |
android | Created by mobile app using device running Android |
batch | Created by import batch |
subscription | Created by billing schedule |
order_details | Created by merchant from order details page |
embeddable | Created by embeddable such as buy now button |
Address Properties
Property | Type | Description |
---|---|---|
company_name | string | Company name of address |
address1 | string | Street address line one |
address2 | string | Street address line two |
city | string | City |
state | string | State |
zip_code | string | Postal code |
address_types | array | Type of address. Values: shipping , service |
Order Status Types
Value | Description |
---|---|
paid | Order is fully paid. |
unpaid | No succesful payments have been made on the order and there is an outstanding balance due. |
cancelled | Order cancelled. No more payments can be collected on the order. |
partially_paid | Successful payment(s) have been made on the order, however there is still an outstanding balance due. |
Payment Status Types
Value | Description |
---|---|
no_payment_required | Order created at checkout had only items scheduled for the future, thus no payment was required ($0 amount due). |
unknown | The initial stage for every transaction sent for authorization. The system assigns this status while waiting for an authorization response. In some rare cases, if communication is disrupted before the system gets a response, the transaction will remain in the unknown status. |
posted | Credit Card and ACH payments that have been entered in the system, but not yet settled. This is the initial status for an authorized but unsettled ACH transaction. |
settled | A settled ACH or Credit Card payment. |
failed | Attempted transactions that were never authorized or completed. |
voided | A voided ACH or Credit Card transaction. |
reversed | A transaction that has been reversed (refunded). When a settled transaction is refunded, the status of that transaction changes to reversed. Displays as status "Refunded" in the PaySimple UI. |
reverse_posted | The credit transaction generated when a settled ACH transaction is refunded. When the refund settles, the status changes to refund_settled. Displays as "Refund (Posted)" in the PaySimple UI. |
chargeback | An ACH payment being disputed by the customer. |
authorized | Credit card payments and refunds that have been authorized, but not yet submitted for processing. |
returned | ACH payments that were initially posted but ultimately unsuccessful for any reason other than non-sufficient funds or chargeback. |
reverse_n_s_f | An ACH transaction that failed because the customer had insufficient funds in the account to cover the payment. Displays as "Returned (NSF)" in the PaySimple UI. |
refund_settled | A settled Credit Card or ACH refund transaction. Displays as "Refund Settled" in the PaySimple UI. |
refund_scheduled | A refund is scheduled for the future |
Order Item Properties
Property | Type | Description |
---|---|---|
offering_id | string | Unique identifier of the offering (catalog item). |
name | string | Name of item purchased as defined in the catalog. |
quantity | integer | Number of items purchased |
price | decimal | Price of one item |
amount_subtotal | decimal | Total amount charged for catalog item, adding fees and subtracting discounts (not including taxes) |
custom_data | array | Custom field data collected at checkout (see Custom Field Data Properties) |
subscription_id | string | Id of billing schedule created by this item at checkout |
proration | object | Details of item proration (not returned if not recurring item or proration not enabled). |
proration.period_days | integer | Number of days in the billing cycle |
proration.prorated_days | integer | Number of days for which the item should be billed for in the cycle |
proration.period_start_date | date | First day in the billing cycle |
proration.start_date | date | First billable day |
proration.end_date | date | Last billable day |
proration.discounted_proration_adjustment | decimal | The amount the item was prorated (subtracted from full_amount), after any discounts are applied |
recurrence | object | Details of billing schedule recurrence, only returned if billing schedule created from item (See Recurrence Properties). |
fees | array | Fees applied to item (see Fee Properties) |
taxes | array | Taxes applied to item (see Tax Properties |
discount | object | Line item discount applied to item. Not returned if no discount applied. |
discount.id | string | Unique identifier of discount in catalog. |
discount.name | string | Name of discount in catalog. |
discount.value | string | Amount of discount in $ or % terms as defined in catalog. |
discount.amount_total | decimal | Amount subtracted from line item total from discount. |
Custom Field Data Properties
Property | Type | Description |
---|---|---|
label | string | Custom field name |
field_Id | string | Unique identifier of custom field in catalog |
value | string | Custom field value entered at checkout |
Recurrence Properties
Property | Type | Description |
---|---|---|
frequency | string | Values: daily , weekly , monthly , yearly |
occurrences | integer | Indicates number of payment schedules to run. If not provided, schedule will run until suspended or cancelled. |
periods_between_occurrence | integer | Indicates number of periods between schedule running. Example: value '2' would indicate 'every other month' when frequency is set to monthly . |
Weekly Recurrence Properties
Property | Type | Description |
---|---|---|
day_of_week | string | Values: sunday , monday , tuesday , wednesday , thursday , friday , saturday |
Yearly Recurrence Properties
Property | Type | Description |
---|---|---|
month | integer | Month of year to run. |
Monthly & Yearly Recurrence Properties
Property | Type | Description |
---|---|---|
day_of_month_type | string | Values: day_of_purchase , specific_day_of_month , day_pattern . |
specific_day_of_month | bool | Returned when day_of_month_type is specific_day_of_month . |
day_pattern | object | Returned when day_of_month_type is day_pattern |
Day Pattern Properties
Property | Type | Description |
---|---|---|
ordinal | string | Values: last , first , second , third , fourth |
day | string | Values: sunday , monday , tuesday , wednesday , thursday , friday , saturday , day , weekday , weekend_day |
Fee Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier of fee in catalog. |
name | string | Name of fee in catalog. |
value | string | Amount of fee in $ or % terms as defined in catalog. |
amount_total | decimal | Amount of fee charged. |
Tax Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier of tax in catalog. |
name | string | Name of tax in catalog. |
value | string | Amount of tax in % terms as defined in catalog. |
amount_total | decimal | Amount of tax charged. |
Transaction Properties
Property | Type | Description |
---|---|---|
id | integer | Unique identifier of transaction. |
created_at | datetime | Date and time transaction was created. |
status | string | Current state of transaction (see Payment Status Types |
funding | string | Type of funding for payment (see Funding Types) |
amount | decimal | Amount charged for payment |
credit_card_account | object | Credit card details (only returned if payment_type is credit_card) |
credit_card_account.id | integer | Unique id of customer credit card account |
credit_card_account.last4 | string | Last 4 digits of credit card PAN |
credit_card_account.card_type | string | Values: master_card , visa , discover , amex |
credit_card_account.expiration | object | Expiration date of card |
credit_card_account.expiration.year | integer | Expiration year of card |
credit_card_account.expiration.month | integer | Expiration month of card |
payment_type | string | Values: credit_card , ach , cash , check |
payment_type_code | string | Values: Moto or Swipe for credit card payments and WEB , PPD , CCD , TEL for ACH. |
payment_source | string | PaySimple system where the payment originated (see Payment Source Types) |
auth_code | string | Payment authorization code returned by processor. |
is_refund | boolean | True if payment is refund |
salesperson | object | User who made payment |
salesperson.id | integer | Unique id of user who made payment |
salesperson.user_name | string | Username of user who made payment |
salesperson.first_name | string | First name of user who made payment |
salesperson.last_name | string | Last name of user who made payment |
estimated_deposit_date | datetime | Estimated date funds will be deposited in payee's account. |
can_void_until | datetime | Time payment may be voided before it is submitted to the processor. |
input_method | string | How a credit card was entered. Values: key_entered , swipe |
Funding Types
Value | Description |
---|---|
payment | Customer payment made to merchant |
refund | Merchant initiated refund of previous payment |
credit | Merchant initiated payment to customer without previous transaction |
Payment Source Types
Value | Description |
---|---|
virtual_terminal | Created by merchant in Point of Sale |
online_store | Created by customer in eCommerce Online Store |
payment_form_store | Created by customer in eCommerce Payment Form |
subscription | Created by billing schedule |
order_details | Created by merchant from order details page |
embeddable | Created by embeddable such as buy now button |
process_one_time | Created by merchant in Collect Payment (classic) |
payment_form | Created by payment plan (classic) |
recurring_payment | Created by recurring payment (classic) |
payment_plan | Created by payment plan (classic) |
buyer_portal | Created by paying invoice (classic) |
batch_upload | Created by import batch (classic) |
api3 | Created via API version 3 |
api4 | Created via API version 4 |
ios_pos | Created by mobile app using device running Apple iOS |
android_pos | Created by mobile app using device running Android |
ios | Created by mobile app using device running Apple iOS |
android | Created by mobile app using device running Android |
Order Fee Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier of order fee in catalog |
name | string | Name of order fee in catalog. |
amount_total | decimal | Amount of order fee charged. |
taxes | array | Taxes charged on item (see Tax Properties) |
Updated over 6 years ago