Thread tagged as: Question, Shop

perch shop checkout via api

I was able to complete the checkout via web.

now I need to do do same thing via api. every request would only have single item, to checkout.

request sent is product id, color, size, quantity, user id (customer id). api is suppose to add item to cart, I was able to do this using


Now I need to set shipping address for the order, and checkout without paypal. I know I could do below

perch_shop_checkout('manual', [
        'return_url' => '/shop/thanks',
            'cancel_url' => '/shop/cancel',

but , I believe I also need to attach address to the order? how do it do that?

is there anything else I am missing in above process?

sawan ruparel

sawan ruparel 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which API are you referring to?

Sorry, I was not clear.

I am suppose to make an API that will server a mobile app.

The api is suppose to add to cart, checkout and return order ID or invoice ID as response to the request.

So there is no user interaction or page reloads. It has to happen all based on "product_id" and member_email id that is being passed as request

Drew McLellan

Drew McLellan 2638 points
Perch Support

There's currently no way to do that without a form.