srob
srob

Reputation: 135

Adding a Custom API Function After Shopify Checkout

I am trying to implement a way to capture a customer's account information, product information, and purchase information whenever they do a checkout. I'm planning to use this information to do a POST request into my own separate database.

I wanted to know if it is possible to go into the code for checkout and implement this? Does this require a specfic plan to be on and would I have access to modify the checkout code?

Thanks for your assistance,

Upvotes: 1

Views: 1058

Answers (2)

Nguyen Duy Phong
Nguyen Duy Phong

Reputation: 124

  • You can use webhook like "bknights" mentioned above.
  • But there's a note: you just only capture order-information AFTER customer complete checkout successfully. So there's no way to capture unless customer complete current checkout.
  • More... on the link https://docs.shopify.com/api/reference/webhook: you can see hooks for Checkouts "create/delete/update", NOT a hook like "type on checkout".

Upvotes: 0

bknights
bknights

Reputation: 15402

This just requires setting up a private app and installing a web hook.

A private app lets you set up access keys for using the API. In your store:

  • click Apps
  • In the upper right of the App page click "Private Apps"
  • upper right again click "Create Private App"

For the web hooks see: https://docs.shopify.com/api/reference/webhook

Upvotes: 1

Related Questions