curl --location 'https://api.techrar.com/order/v1/orders/checkout/' \
--header 'app-id: 4' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"source": "other",
"action": "hard",
"items": [
{
"item": {
"sku": "ggggdfaaaa",
"name_en": "test test",
"name_ar": "test test",
"type": "product",
"service_type": "delivery",
"price": 100.0
},
"qty": 1,
"auto_renew": false,
"date": null,
"time": null,
"donation": null
}
],
"customer_username": "966534501056",
"vouchers": ["testtest"],
"is_redeeming": false,
"location_id": null,
"branch_id": null,
"notes": "",
"gift_to_customer": null,
"custom_fields": {
"merchant_id": 1
},
"create_invoice": true,
"recurring_purchase": null
}'{
"vouchers": [],
"sub_total_amount": 100,
"shipping_amount": 0,
"setup_amount": 0,
"net_amount": 100,
"sub_total_discounts_amount": 0,
"shipping_discounts_amount": 0,
"total_discounts_amount": 0,
"wallet_redeem_amount": 0,
"cashback_amount": 0,
"total_amount": 100,
"total_amount_with_redeem": 100,
"payment_methods": [
{
"provider_id": "myfatoorah",
"methods": [
{
"id": 11,
"name_en": "Apple Pay",
"name_ar": "أبل الدفع",
"image": "https://demo.myfatoorah.com/imgs/payment-methods/ap.png"
},
{
"id": 2,
"name_en": "VISA/MASTER",
"name_ar": "فيزا / ماستر",
"image": "https://demo.myfatoorah.com/imgs/payment-methods/vm.png"
},
{
"id": 1,
"name_en": "KNET",
"name_ar": "كي نت",
"image": "https://demo.myfatoorah.com/imgs/payment-methods/kn.png"
}
]
}
],
"currency": "SAR",
"order": {
"id": 121,
"created_at": "2025-03-10T14:56:57.778556+03:00",
"status": "pending",
"sub_total_amount": 100,
"shipping_amount": 0,
"net_amount": 100,
"setup_amount": 0,
"sub_total_discounts_amount": 0,
"shipping_discounts_amount": 0,
"total_discounts_amount": 0,
"wallet_redeem_amount": 0,
"total_amount": 100,
"total_amount_with_redeem": 100,
"currency": "SAR",
"notes": "",
"items": [
{
"id": 150,
"item": {
"id": 83,
"custom_fields": null,
"images": [],
"discount": {
"is_applied": false,
"is_trial_applied": null,
"is_usage_price": false,
"price_after_discount_no_trial": 100,
"price_after_discount": 100
},
"stock": {
"in_stock": true,
"qty": 10
},
"modifiers": [
{
"id": 371,
"ordering": 0,
"name_en": "time",
"name_ar": "time",
"values": [
{
"id": 471,
"ordering": 0,
"name_en": "06:00:00 - 07:00:00",
"name_ar": "06:00:00 - 07:00:00"
},
{
"id": 956,
"ordering": 0,
"name_en": "07:00:00 - 08:00:00",
"name_ar": "07:00:00 - 08:00:00"
}
]
}
],
"variants": [],
"varies_on": "time",
"bundle_categories": [],
"plan_config": null,
"off_days": [
"Fri"
],
"off_dates": [],
"app_id": 4,
"ordering": 0,
"type": "booking",
"service_type": "access",
"sku": "new_class.sku2",
"price": 100,
"name_en": "The new Class",
"name_ar": "The new Class",
"description_en": "",
"description_ar": "",
"is_plan_only": false,
"is_plan_enabled": false,
"served_from_date": null,
"served_to_date": null,
"served_from_time": "07:00:00",
"served_to_time": "08:00:00",
"categories": []
},
"name_en": "The new Class",
"name_ar": "The new Class",
"price_before_discount": 100,
"price_after_discount": 100,
"qty": 1,
"net_price": 100,
"voucher_discounts_amount": 0,
"total_price": 100,
"auto_renew": false,
"date": "2025-03-11",
"time": null,
"parent_order_item": null
}
],
"custom_fields": {
"merchant_id": 1
}
},
"checkout_url": "http://localhost:8000/order/v1/checkout/121/?lang=en"
}