OGWUGO API DOCUMENTATION

  1. Home
  2. Docs
  3. OGWUGO API DOCUMENTATION
  4. Ogwugo Food
  5. Checkout >> create invoice from cart

Checkout >> create invoice from cart

Checkout endpoints creates invoice number and returns the details with invoice amount the user is expected to pay(this comes with shipping fee and transaction fees added.)

PATH

[POST]  /checkout/non_local/invoice/creating 

PARAMETERS:

Param type required comment
cart_id
int 1
user_id int 1
user_new_address
bool 1 1 or 0: if user will enter new address during this checkout, set this to 1 then provide the address details
shipping_address
payment_method
delivery_time
shipping_company
int 1
title
str title of address (eg home)
address
str
city
int
phone str comment
latitude
str
longitude
str comment
ogwugo_area_location
int comment
buyer_pickup
int 1 if buyer choose to pick order from store post

buyer_pickup = 1, default = 0.
NB: not all store support buyer_pickup
in store profile, check if
buyer_pickup = 1, before you allow buyer to select this option.
buyer_pickup (required)  [0 by default] -- buyer_pickup is posted as 1 if and only if store profile allow pickups and user select pick up from store.

watch it, buyer is only allowed to choose pickup if store.buyer_pickup == 1 (endpoint /stores/sinlge/{store_id})

 

NB: for checkout you will need, delivery time, payment_method etc. get them from the bellow documentation link.

warning: in ogwugo domain, each restaurant profile return list of shipping company, you will not use the shippers returned in the info below.

CART CHECK OUT INFOS

ogwugo_area_location

Get All Ogwugo Locations

 

RESPONSE:

{
    "data": [
        {
            "invoice_id": "1",
            "user_id": "43567",
            "invoice_number": "ogw1000454333", // unique id used for card payment posting
            "amount": "5000", // along with shipping fee
            "with_paystack_fee": "5250", // if user will use card payment, we have added the bank fee here.. pass to paystack direct.
             .
             .
             .
             .
             ,

        }
    ],
    "status": "success",
    "message": "",
    "error": {
        "detail": "",
        "code": "202"
    }
}
Was this article helpful to you? Yes No

How can we help?