Create Order
This page will provide the description for each individual fields
See also the Order response object.
Placing an Order
POST
https://api.qa.optty.com/orders/
Placing an Order
POST
https://api.qa.optty.com/orders/
For live environment please use https://api.optty.com
Headers
Authentication*
string
Authorization: Bearer <token>
Headers
Authentication*
string
COv8JBe4ooYw
Parameters
Content Type: application/json
Field
Type
Description
orderReference
required
string
A unique order reference.
bnplProvider
required
enum
enum The Payment Method provider to place the order against.
eg:
KLARNA_US
LATITUDEPAY_AU
KLARNA_AU
OPENPAY_UK
purchaseCountry
required
string
The country code the purchase is originating from, in
eg: (US, AU, SG)
purchaseCurrency
required
string
The country currency the purchase is being made in, using ISO 4217 format.
eg: (USD, AUD, SGD)
locale
required
string
The country locale in RFC 1766 standard.
eg: (en_US)
orderAmount
required
number
The order amount, including tax, shipping and discount.
eg: 14.99
orderItems
required
Array of objects
Header A list of order items.
orderItems.name
required
string
The name of the order item.
eg: "Optty T-Shirt"
orderItems.quantity
required
number
The quantity of the order item. Must be an integer.
eg: 1
orderItems.sku
required
number
The SKU (product code) of the order item.
eg: "69309284M-1"
orderItems.unitPrice
required
number
The price per unit.
eg: 9.99
orderItems.totalAmount
required
number
The total cost of the item eg: 9.99.
orderItems.type
optional
string
The type of item e.g Flights.
orderItems.departureDate
optional
string
The departure date for items of type flight
orderItems.flightNumber optional
string
The flight number for items of type flight
orderItems.origin optional
string
The origin for items of type flight.
orderItems.destination optional
string
The destination for items of type flight.
orderItems.title optional
string
The title for the order item.
orderItems.unitAmount optional
number
Amount on unit.
orderItems.unitTaxAmount optional
number
Tax on unit.
orderItems.unitDiscountAmount optional
number
Discount on unit.
taxAmount
required
number
The tax amount for the order, pass 0 if don't have any.
eg: 3.00
shippingAmount
required
number
The shipping amount for the order, pass 0 if don't have any.
eg: 5.00
discountAmount
required
number
The discount amount for the order pass 0 if don't have any.
eg: 3.00
customer
required
object
The customer placing the order. All sub-fields are required.
customer.firstName
required
string
The customer’s first name.
customer.lastName
required
string
The customer’s last name.
customer.email
required
string
The customer email.
customer.phoneNumber
required
string
The customer’s phone number.
billingAddress
required
object
Header Customer's billing address
billingAddress.title
optional
string
The customer title
billingAddress.firstName
required
string
The customer’s first name.
billingAddress.lastName
required
string
The customer last name.
billingAddress.email
required
string
The customer email.
billingAddress.phoneNumber
required
string
The customer phone number.
billingAddress.streetAddress
required
string
The customer billing address line 1
billingAddress.streetAddress2
required
string
The customer billing address line 2
billingAddress.city
required
string
The customer billing address city
billingAddress.country
required
string
The customer billing address country. In ISO 3166 format
billingAddress.state
required
string
The customer billing address state
eg: "NSW", Send Country Code if do not have a state
billingAddress.region
required
string
eg: "Oceania" , Send country name if do not have a region.
billingAddress.postalCode
required
string
The customer billing address postal code
eg: "2000"
shippingAddress
conditional
object
Customer's shipping address
required for Klarna, AfterPay
*Recommend sending shipping fields, with most Payment Providers. It might help with the approval rate.
shippingAddress.title optional
string
Recipient title.
shippingAddress.firstName
conditional
string
Recipient’s first name
shippingAddress.lastName
conditional
string
Recipient’s last name
shippingAddress.email
conditional
string
Recipient's email
shippingAddress.phoneNumber
conditional
string
Recipient's phone number
shippingAddress.streetAddress
conditional
string
The customer shipping address line 1
shippingAddress.streetAddress2
conditional
string
The customer shipping address line 2
shippingAddress.city
conditional
string
The customer shipping city
shippingAddress.state
conditional
string
The customer shipping address state
eg: "NSW", Send Country Code if do not have a state
shippingAddress.country
conditional
string
The customer shipping address country. In ISO 3166 format
shippingAddress.region
conditional
string
eg: "Oceania" , Send country name if do not have a region.
shippingAddress.postalCode
conditional
string
The customer shipping address postal code
eg: "2000"
shippingType
conditional
string
The shipping type for this order
eg: "normal", "express"
shippingMethod
conditional
enum
The shipping method for this order
[delivery, store, digital, pickup] delivery - normal shipping digital - intangible that not required shipping store - pick up in store (should be store address) pickup - any pick up location
dynamicRedirectUrl optional
string
Redirect url to once a payment is completed
dynamicCallbackUrl optional
string
Callback url once payment is completed
sessionId
optional
string
The session ID of the payment.
customerToken
optional
string
cancellationTimeout optional
number
The cancellation timeout for the order.
autoCapture optional
boolean
Determine if payment should be auto captured or not
Full Example
Last updated