OGWUGO API DOCUMENTATION

  1. Home
  2. Docs
  3. OGWUGO API DOCUMENTATION
  4. Ogwugo Gas
  5. Ckechout

Ckechout

The checkout process  is is to collect the cart_id apply buyer delivery address, payment_method and more to it Generate an invoice and return the invoice with all fee, total, shipping fee, etc. such that the user can pay the invoice.

the checkout data do not come from gas trail enpoint

method: POST

path:

/checkout/non_local/invoicing/create

 

DataType [default] Detail
cart_id int. req
user_id  int.
shipping_address int. req.
payment_method int. req
delivery_time int. req
comment str.
shipping_fee double. optional
total_amount double. optional
user_new_address boolean(true(1),false(0)) reg
reg
. reg
. reg

During checkout user may decide to add new address. then set “user_new_address=1” else “user_new_address=0”

// if we are having new address from user. if user_new_address = 1, we collect the address inputted by the user at checkout and also store it as the user address.. provide the following details then:

          title    str  [title of address eg my house]
          address  str    reg
          city int reg
          phone    str    reg
          latitude str
          longitude str
          ogwugo_area_location INT required

 

RESPONSE:

{
    "data": [
        {
            "invoice_id": "1",
            "user_id": "ogwugo",
            "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"
    }
}

in the response you see “with_paystack_fee

this is the total amount plus paystack transaction fee added, should user will pay with paystack, you already have the figure to post to paystack.

 

Was this article helpful to you? Yes No

How can we help?