Overview

This method allows merchants to define a Laybuy order and create a new payment process.
If successful, the merchant should store the token within their system and redirect the customer to the payment URL provided in the response in order to initiate the payment interface.
When a new order is created, any active orders for the same customer (based on the email address) for the merchant will be cancelled. Any further interactions with any cancelled order will result in an error.
If the customer`s order changes on the merchant site after the Laybuy order is created, the merchant should restart the process by creating a new order.

Example Request (Typical)

{
	"amount": 156.90,
	"currency": "NZD",
	"merchantReference": "17125026",
	"origin": "ABCPOS",
	"originData": {
		"branch": "Redvale",
		"callbackUrl": "https://abcretail.com/order/17125026"
	},
	"customer": {
		"phone": "0219876543"
	}
}

Response Data

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

Example response - Error

{
	"result": "ERROR",
	"error": "Amount is below the minimum"
}

Example response - Success

{
	"result": "SUCCESS",
	"token": "frOilqUU0DboUCiyRtnzH1VdBXnrj7kD39NWhgsD",
	"paymentUrl": "https://payment.laybuy.com/pay/frOilqUU0DboUCiyRtnzH1VdBXnrj7kD39NWhgsD"
}

Cancel order

OVERVIEW

This method allows merchants to explicitly cancel the payment process for an unconfirmed Laybuy order.

END POINT

Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!