Skip to content

Endpoints

Order

Orders are a fundamental concept of the API.
Each checkout is associated with an order, and any changes (such as a price adjustment) require a new order be created via the order endpoint.

Orders are the source of truth for your transaction requests.

Order status

Order statuses indicate the state of an order as a customer progresses through iwocaPay’s signup and payment process.

CREATED

PENDING

UNSUCCESSFUL

APPROVED

SUCCESSFUL

StatusDescription
CREATEDInitial state: The order has been created via the API.
PENDINGThe customer has started the signup process.
APPROVEDThe customer has been approved for the order amount.
SUCCESSFULThe customer has completed the order.
UNSUCCESSFULThe customer was not approved, or an error occurred.

Creating an order

Use this endpoint to create a new order. The response body contains details about the newly created order.

Endpoint

POST /api/lending/edge/ecommerce/seller/<supplier_uuid>/order/

Request and response

{
"data": {
"amount": 12000.0,
"reference": "#481",
"allowed_payment_terms": ["PAY_LATER"]
}
}
FieldTypeDescription
amountFloatThe monetary amount for the order, in GBP.
referenceStringA unique reference for the order.
allowed_payment_termsArray, options: "PAY_NOW", "PAY_LATER"Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] if not provided.

Retrieving an order

Use this endpoint to retrieve an order from iwocaPay.

Endpoint

GET /api/lending/edge/ecommerce/order/<order_id>/

Request and response

{
"data": {
"id": "aaaa-bbbb-cccc",
"amount": 12000.0,
"reference": "#123",
"redirect_url": "https://yoursite.co.uk/?orderId=aaaa-bbbb-cccc",
"pricing": {
"representative_interest": 0.0,
"promotions": []
},
"pay_link_id": "xxxx-yyyy-zzzz",
"seller_name": "fridges and co.",
"status": "CREATED",
"allowed_payment_terms": ["PAY_LATER", "PAY_NOW"]
}
}
FieldTypeDescription
idStringA UUIDv4 string. A unique reference for the order.
amountFloatThe monetary amount for the order, in GBP.
referenceStringThe order’s reference.
redirect_urlStringURL to redirect the customer to upon order completion, including orderId as a search parameter.
pricingPricingConfigurationDetails about promotions or interest-free options for the order.
pay_link_idStringA UUIDv4 string. A unique ID for the associated pay link.
seller_nameStringThe name of the supplier company.
statusEnum, options: "CREATED", "PENDING", "UNSUCCESSFUL", "APPROVED", "SUCCESSFUL"The current status of the order.
allowed_payment_termsArray, options: "PAY_NOW", "PAY_LATER"Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] if not provided.