# Shopify

The following document guides you through **setting up Bitcart with** [**Shopify**](https://www.shopify.com)**.**

### Prerequisites: <a href="#prerequisites" id="prerequisites"></a>

* Shopify account
* Bitcart - [self-hosted](https://docs.bitcart.ai/deployment) or run by a [third-party host](https://docs.bitcart.ai/deployment/thirdpartyhosting) v0.6.7.0 or later.
* [Created Bitcart store](https://docs.bitcart.ai/your-first-invoice#create-a-store) with [wallet set up](https://docs.bitcart.ai/your-first-invoice#creating-a-wallet)

{% embed url="<https://youtu.be/c09Av7SgaQM>" %}

### Setting up Bitcart with Shopify

1. In Shopify, go to Apps > and at the bottom of the page click on the `Develop apps for your store`.
2. If prompted, click on `Allow custom app development`
3. `Create an app` and name it
4. On the app page, in `Overview` tab, click on the `Configure Admin API scopes`
5. In the filter admin access scopes type in `Orders`
6. In `Orders` enable `read_orders` and `write_orders` and then click `Save`
7. Click on the `Install App` in the top right corner and when pop-up window appears click `Install`
8. Reveal `Admin API access token` and `copy` it.
9. In your Bitcart, go to Stores page and click on shopify integration icon.
10. Enter your shop name
11. In secret key field paste the `Admin API access token`
12. In the api key field paste the `API key` from Shopify.
13. In Shopify's `Store Settings > Checkout > Order status page > Additional Scripts` paste the script provided by Bitcart in Shopify Integration dialog when you click the copy script button (including the opening and closing tag `</script>`.
14. In Shopify's `Store Settings > Payments > Manual payment methods` add `manual payment method` then click `create custom payment method`
15. In `Custom payment method name` fill in `Bitcart`, optionally you can fill in other fields, but it's not required. Please see the message below about naming of a custom payment method
16. Hit `Activate` and you've set up Shopify and Bitcart successfully.

{% hint style="info" %}
Custom Payment method name **must** contain at least one of the following words: `bitcoin`, `bitcart`, `bitcart` or `btc` to work.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitcart.ai/integrations/shopify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
