3️⃣Create Order
When a user selects an Optty integrated APM, you should send through the order via this method.
Last updated
When a user selects an Optty integrated APM, you should send through the order via this method.
Last updated
Merchant URL
https://api.qa.optty.com
Merchant URL
https://api.optty.com
POST
/orders
Once a user checks out and selects a payment method integrated via Optty, send the order information through this method
Authorization*
String
Bearer <token>
orderReference*
string
A unique order reference
bnplProvider*
enum
APM provider name (returned in GET Options). eg: KLARNA_US
purchaseCountry*
string
The country code the purchase is originating from in ISO 3166 alpha-2 format.
eg: US, AU, SG
purchaseCurrency*
string
The country currency the purchase is being made in, using ISO 4217 format. eg: USD, AUD, SGD
locale*
string
The country locale in RFC 1766 standard. eg: en_US
orderAmount*
number
The order amount, including tax, shipping and discount
eg: 14.99
orderItems*
Array
orderItems.name*
string
Name of item in the order eg: "Striped Dress Shirt"
orderItems.quantity*
number
Quantity of the item in the order
eg: 2
orderItems.sku*
number
SKU reference number
eg: "63223448M-1"
orderItems.unitPrice*
number
Price per unit for this item
orderItems.totalAmount*
number
Total amount for this item
taxAmount*
number
The tax amount for the order, pass 0 if none exists. eg: 3.00
shippingAmount*
number
The shipping amount for the order, pass 0 if none exists. eg: 5.00
discountAmount*
number
The discount amount for the order, pass 0 if none exists. eg: 3.00
customer*
object
Details of the customer that is placing the order
customer.firstName*
string
Customer's first name.
customer.lastName*
string
Customer's surname.
customer.email*
string
Customer's email address
customer.phoneNumber*
string
Customer's phone number
billingAddress*
object
Customer's billing address
billingAddress.firstName*
string
Customer's first name to use on billing address
billingAddress.lastName*
string
Customer's surname to use on billing address
billingAddress.email*
string
Email to use on billing address
billingAddress.phoneNumber*
string
Phone number to use on billing address
billingAddress.streetAddress*
string
First line of street name on billing address
billingAddress.streetAddress2*
string
Second line of street name on billing address
billingAddress.city*
string
City on billing address
billingAddress.country*
string
Country on billing address
billingAddress.region*
string
Region on billing address
billingAddress.postalCode*
string
Postcode on billing address
billingAddress.state*
string
State on billing address
shippingAddress
object
Customer's shipping address. Required for Klarna & Afterpay. Recommend sending for all APM's to help with approval rates.
shippingAddress.firstname*
string
Customer's first name to use on shipping address
shippingAddress.lastname*
string
Customer's surname to use on shipping address
shippingAddress.email*
string
Email to use on shipping address
shippingAddress.phoneNumber*
string
Phone number to use on shipping address
shippingAddress.streetAddress*
string
First line of street name on shipping address
shippingAddress.streetAddress2*
string
Second line of street name on shipping address
shippingAddress.city*
string
City on shipping address
shippingAddress.country*
string
Country on shipping address
shippingAddress.region*
string
Region on shipping address
shippingAddress.postalCode*
string
Post code on shipping address
shippingAddress.state*
string
State on shipping address
shippingType
string
Type of shipping service for this order
eg: "standard" , "express"
shippingMethod
enum
The shipping method for this order
[delivery, store, digital, pickup] delivery = normal shipping digital = intangible that doesn't require shipping store - pickup in store (should be store address) pickup - any pick up location
dynamicRedirectURL
string
Redirect to this URL once payment is completed
dynamicCallbackURL
string
Callback URL once payment is completed
sessionID
string
Session ID of the payment
customerToken
string
The <JWT Token> of the customer