Skip to content

Commit ef6feae

Browse files
authored
Merge pull request #1494 from TChukwuleta/update_shopify_v2
update shopify v2 docs
2 parents 6634b36 + 53809ca commit ef6feae

File tree

2 files changed

+49
-7
lines changed

2 files changed

+49
-7
lines changed

docs/ShopifyV2.md

+49-7
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,38 @@ Before diving into the setup process, ensure you have the following:
3737

3838
## Set up a Shopify app
3939

40-
First we will create a new app in the Shopify partner portal. Make sure you are registered as a [Shopify partner](https://www.shopify.com/partners) (it's free to register).
40+
First, you need to setup a payment method on your [Shopify](https://www.shopify.com/) account.
41+
42+
1. In your Shopify admin page, click on `Settings` > `Payments` in the left sidebar, scroll down to "Manual payment methods", click on `(+) Manual payment method` and select `Create custom payment method` on the dropdown.
43+
2. In `Custom payment method name` fill in `Bitcoin with BTCPay Server`, optionally you can fill in other fields, but it's not required.
44+
3. Hit `Activate` and you've set up a payment method successfully.
45+
46+
:::tip
47+
"Custom Payment method name" **must** contain at least one of the following words (case-insensitive): `bitcoin`, `btcpayserver`, `btcpay server` or `btc` to work.
48+
:::
49+
50+
51+
Next we will create a new app in the Shopify partner portal. Make sure you are registered as a [Shopify partner](https://www.shopify.com/partners) (it's free to register).
4152

4253
1. On Shopify Partner [dashboard](https://partners.shopify.com), click on `Apps` > `All Apps` > `Create App` > `Create app manually`. Enter the name you want to call the app (e.g. BTCPay Server) and click `Create`.
4354
2. Once created displays your "Client ID" and "Client secret", which we need in a minute. Please note them down or come back to this page later.
4455
![Shopify-App: client id and secret](./img/shopifyv2/partner-app_client-id-secret.png)
45-
3. Click on the shopify partner logo on the to return to partners dashboard
46-
4. At the bottom of the page, click on "Settings"
56+
3. While in your just created app page, select API access on the left menu, scroll down to `Allow network access in checkout and account UI extensions` and grant network access. You should see the following screen once network access is granted
57+
![Shopify-App: Partner app network access](./img/shopifyv2/partner_app_network_access.png)
58+
4. Click on the shopify partner logo on the to return to partners dashboard
59+
5. At the bottom of the page, click on "Settings"
4760
![partners_settings.png](./img/shopifyv2/partners_settings.png)
48-
5. Scroll down to the bottom section of "CLI Token" and click on "Manage tokens"
61+
6. Scroll down to the bottom section of "CLI Token" and click on "Manage tokens"
4962
![partners_settings-cli-token.png](./img/shopifyv2/partners_settings-cli-token.png)
50-
6. On top right click on "Generate new token"
63+
7. On top right click on "Generate new token"
5164
![partners_create-cli-token.png](./img/shopifyv2/partners_create-cli-token.png)
52-
7. In the modal popup keep the default and click on "Generate token"
65+
8. In the modal popup keep the default and click on "Generate token"
5366
![partners_create-cli-token-duration.png](./img/shopifyv2/partners_create-cli-token-duration.png)
54-
8. Copy the token and note it next to client ID and client secret from above. This token is only shown once.
67+
. Copy the token and note it next to client ID and client secret from above. This token is only shown once.
5568
![partners_cli-token-created.png](./img/shopifyv2/partners_cli-token-created.png)
5669

5770

71+
5872
## Deploy the Shopify-BTCPay-app on your BTCPay Server
5973

6074
:::tip
@@ -196,6 +210,34 @@ When you click on it you can see the payment details:
196210
![BTCPay Server shopify step 38](./img/shopifyv2/invoice_payment_details.png)
197211

198212

213+
## FAQ
214+
215+
- What happens when an invoice is Invalid? The sum of confirmed payments up to the expiration is reflected on Shopify
216+
217+
- What if I mark an invoice as invalid in my BTCPay Server? BTCPay does nothing, so the Shopify order stays pending.
218+
219+
- What happens when an invoice is settled manually on BTCPay Server? The Shopify order is marked as fully paid in Shopify.
220+
221+
- What happens if the customer didn't pay? When the BTCPay invoice expires, the Shopify order is voided, and stock is returned.
222+
223+
- What happens if the customer did pay, but with insufficient fees for confirmation in a reasonable time? The BTCPay invoice becomes Invalid, and the Shopify order remains Payment Pending.
224+
225+
- What if the customer paid partially? The BTCPay invoice expires. The Shopify order stays Payment Pending or is marked Partially Paid based on confirmed payments at expiration.
226+
227+
- How to avoid partial payments? Partial payments often happen when customers pay from exchanges that deduct fees. You can set a small [underpayment tolerance](https://docs.btcpayserver.org/FAQ/Stores/#consider-the-invoice-paid-even-if-the-paid-amount-is-less-than-expected) in your store's settings to avoid this.
228+
229+
- How can I reshare an invoice link if the customer didn’t complete the payment? BTCPay Server stores the invoice link in Shopify order metafields when BTCPay is the selected payment method.
230+
231+
Retrieve metafields using Shopify’s API:
232+
```pwsh
233+
https://{SHOPNAME}.myshopify.com/admin/api/{VERSION}/orders/{ORDER-ID}/metafields.json
234+
```
235+
More details:
236+
1. [Shopify GraphQL API - Order Metafields](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#fields-metafields)
237+
2. [Shopify REST API - Order Metafields](https://shopify.dev/docs/api/admin-rest/2025-01/resources/metafield#get-orders-order-id-metafields).
238+
239+
240+
199241
## Troubleshooting
200242

201243
### How to update BTCPay Shopify app?
Loading

0 commit comments

Comments
 (0)