Endpoints
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 statuses indicate the state of an order as a customer progresses through iwocaPay’s signup and payment process.
| Status | Description |
|---|---|
CREATED | Initial state: The order has been created via the API. |
PENDING | The customer has started the signup process. |
APPROVED | The customer has been approved for the order amount. |
SUCCESSFUL | The customer has completed the order. |
UNSUCCESSFUL | The customer was not approved, or an error occurred. |
Use this endpoint to create a new order. The response body contains details about the newly created order.
POST /api/lending/edge/ecommerce/seller/<supplier_uuid>/order/{ "data": { "amount": 12000.0, "reference": "#481", "allowed_payment_terms": ["PAY_LATER"] }}| 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" | Allowed payment methods. Defaults to ["PAY_NOW", "PAY_LATER"] 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. |