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" }}| Field | Type | Description |
|---|---|---|
amount | Float | The monetary amount for the order, in GBP. |
reference | String | A unique reference for the order. |
allowed_payment_terms | Array, options: "PAY_NOW", "PAY_LATER" | Optional. Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] if not provided. |
webhook_url | String | Optional. A URL to receive webhooks for this order as its status changes. |
redirect_url | String | Optional. 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. |
{ "data": { "id": "aaaa-bbbb-cccc", "amount": 12000.0, "reference": "#481", "order_url": "https://www.iwoca.co.uk/pay/order/abc/landing/", "status": "CREATED", "allowed_payment_terms": ["PAY_LATER", "PAY_NOW"] }}| Field | Type | Description |
|---|---|---|
id | String | A UUIDv4 string. A unique reference for the order. |
amount | Float | The monetary amount for the order, in GBP. |
reference | String | The order’s reference. |
redirect_url | String | URL to redirect the customer to upon order completion, including orderId as a search parameter. |
pricing | PricingConfiguration | Details about promotions or interest-free options for the order. |
pay_link_id | String | A UUIDv4 string. A unique ID for the associated pay link. |
seller_name | String | The name of the supplier company. |
status | Enum, options: "CREATED", "PENDING", "UNSUCCESSFUL", "APPROVED", "SUCCESSFUL" | The current status of the order. |
allowed_payment_terms | Array, options: "PAY_NOW", "PAY_LATER" | Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] 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"] }}| Field | Type | Description |
|---|---|---|
id | String | A UUIDv4 string. A unique reference for the order. |
amount | Float | The monetary amount for the order, in GBP. |
reference | String | The order’s reference. |
redirect_url | String | URL to redirect the customer to upon order completion, including orderId as a search parameter. |
pricing | PricingConfiguration | Details about promotions or interest-free options for the order. |
pay_link_id | String | A UUIDv4 string. A unique ID for the associated pay link. |
seller_name | String | The name of the supplier company. |
status | Enum, options: "CREATED", "PENDING", "UNSUCCESSFUL", "APPROVED", "SUCCESSFUL" | The current status of the order. |
allowed_payment_terms | Array, 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>/