Overview

This method allows merchants to confirm the payment process, resulting in a finalised Laybuy order.

If the customer`s order has changed on the merchant site since the Laybuy order was created, the merchant should restart the process by creating a new order.

Important : Merchants have three options when confirming an order, depending on the level of validation required against the original order that was sent to Laybuy.
Merchants can specify :

    • The payment token only,
    • or The payment token and payment amount,
    • or The payment token,
    • payment amount,
    • and order items.

Important: This method is idempotent for a limited period. Duplicate requests to confirm an single order (by payment token) will return the same response for a period, after which any duplicate requests will result in an error.

Important: confirm/Order needs to pass currencies.

Example request - token only

Specifying only the payment token will bypass any additional checks. The amount from the original order will be assumed to be correct, and that the order items have not changed.

{
	"token":"frOilqUU0DboUCiyRtnzH1VdBXnrj7kD39NWhgsD"
}

Example request - token and amount

Specifying the amount will cause an additional check to ensure that the amount specified matches the amount on the original order.

{
	"token":"frOilqUU0DboUCiyRtnzH1VdBXnrj7kD39NWhgsD",
	"amount":79.95,
	"currency":"NZD"
}

Example request - token, amount and items

Specifying the amount and items will cause additional checks to ensure that the amount specified matches the amount on the original order, and that the order items have not changed (excluding changes to item descriptions).

{
	"token":"frOilqUU0DboUCiyRtnzH1VdBXnrj7kD39NWhgsD",
	"amount":79.95,
	"currency":"NZD"
	"items":[
		{
			"id":"4470356028717",
			"description":"Blue Widget",
			"quantity":2,
			"price":76.95
		},
		{
			"id":"SHIPPING",
			"description":"Shipping",
			"quantity":1,
			"price":3.00
		},
	]
}

Response data

See the response fields and data returned by the interface and their descriptions on the right - >

Example response

{
	"result":"ERROR",
	"error":"Invalid payment token specified"
}

Example response - error (insufficient funds)

{
	"result":"DECLINED",
	"error":"The payment was declined"
}

Example response - success

{
	"result":"SUCCESS",
	"orderId":100036
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!