Skip to content

Endpoints

These endpoints create and retrieve orders. For what an order is and how its status moves through the lifecycle, see Orders.

Use this endpoint to create an order. The response body contains details about the created order.

POST /api/lending/edge/ecommerce/seller/<supplier_uuid>/order/
{
"data": {
"amount": 12000.0,
"reference": "#481",
"allowed_payment_terms": ["PAY_LATER"],
"webhook_url": "https://example.com/iwocapay/webhooks",
"redirect_url": "https://example.com/iwocapay/order-complete"
}
}
FieldTypeDescription
amountFloatThe monetary amount for the order, in GBP.
referenceStringA unique reference for the order.
allowed_payment_termsArray, options: "PAY_NOW", "PAY_LATER"Optional. Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] if not provided.
webhook_urlStringOptional. A URL to receive webhooks for this order as its status changes.
redirect_urlStringOptional. The URL the customer lands on after completing checkout, for this order. Overrides your account’s default redirect URL, and defaults to it if not provided.

Use this endpoint to retrieve an order from iwocaPay.

GET /api/lending/edge/ecommerce/order/<order_id>/
{
"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.

Use this endpoint to cancel an order. The order’s status is set to UNSUCCESSFUL and its cancelled_at field is timestamped.

You can cancel orders in CREATED, PENDING, APPROVED, or UNSUCCESSFUL status. You cannot cancel an order that has reached SUCCESSFUL — at that point the customer has been funded and you have been paid.

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