POST <https://api.buildnow.sa/v2/bnpl/purchase-orders/>
This API creates a Buy Now Pay Later (BNPL) purchase order. The purchase order includes a list of items, shipment address, and optional metadata. Additional validations ensure secure and accurate order creation.
| Header Name | Value |
|---|---|
| Authorization | Bearer <your_access_token> |
| Content-Type | application/json |
| Field | Type | Description | Required |
|---|---|---|---|
| total_price | Decimal | The total price of the order (including VAT). | Yes |
| sub_total | Decimal | The sub-total price of the order (excluding VAT). | Yes |
| vat_rate | Decimal | The VAT rate applied to the order. Defaults to 15.00. |
No |
| vat_amount | Decimal | The VAT amount calculated for the order. | Yes |
| metadata | JSON | Additional metadata about the order (optional). | No |
| partner_order_reference | String | A unique reference for the order from the partner's side. | Yes |
| webhook_url | URL | The webhook URL to which order updates will be sent. Can be blank. | Yes |
| redirection_url | URL | The URL to redirect the user after completing the order. Can be blank. | Yes |
| items | Array of Objects | A list of items included in the purchase. | Yes |
| shipment_address | Object | The shipment address for the order | Yes |
Below are the fields for each item items:
| Field | Type | Description | Required |
|---|---|---|---|
| price | Decimal | The unit price of the item. | Yes |
| sub_total | Decimal | The sub-total price for the item (excluding VAT). | Yes |
| total_price | Decimal | The total price for the item (including VAT). | Yes |
| vat_rate | Decimal | The VAT rate applied to the item. | No |
| vat_amount | Decimal | The VAT amount calculated for the item. | No |
| sku | String | The SKU (Stock Keeping Unit) of the item. | Yes |
| name | String | The name of the item. | Yes |
| name_en | String | The English name of the item (optional). | No |
| quantity | Integer | The quantity of the item being purchased. | Yes |
| unit | String | The unit of measurement for the item (e.g., kg, pcs). |
Yes |
| description | String | A description of the item. | No |
| metadata | JSON | Additional metadata about the item (optional). | No |