<p>Quick answer.</p>

<p>Yes you can use Apple Pay with Craft Commerce and the first-party <a href="https://plugins.craftcms.com/commerce-stripe" rel="nofollow noreferrer">Stripe Gateway Plugin</a>.</p>

<p>In order to do that, you need to customise your template and add the functionality for the Payment Request button. What this does is more or less generating a charge promise token for Stripe (same way it does for card).</p>

<p>Charging the token is then handled by the gateway itself as you would with a card charge.</p>

<p>You can choose to display the button by checking if a relevant Payment API is supported with <a href="https://stripe.com/docs/js/payment_request/can_make_payment" rel="nofollow noreferrer">paymentRequest.canMakePayment() method</a>.</p>

<p>I hope this helps in terms of a high overview.</p>

<p>[EDIT]</p>

<p>The above answer was for use with Craft Commerce 2, as originally set by the question.</p>

<p>Requirement changed to Commerce 1.</p>

<p>The quick answer is still yes.
We have completed a similar task before (with Stripe Elements and Stripe Sources), though that's before SCA.
But Elements are SCA ready as far as I know and you need to use the PaymentIntents API PaymentMethods API.</p>

<p>Difference is that the main Stripe Gateway for commerce 1 (by omnipay) doesn't seem to support webhooks from Stripe, which informs your system whether a token (Source at the time) can be charged or not.</p>

<p>Hence, you need to build kind of your own plugin that loads an extra stripe gateway either new or extending the existing Stripe gateway class (extending is easier as you don't need to rebuild everything).
Might need to add a custom Payment Form to your plugin.</p>

<ul>
<li>You still need to build a custom template.</li>
<li>The template should use Stripe elements.</li>
<li>Logic is same, chargeable promise token which you need to charge.</li>
<li>Request for charging</li>
<li>Await webhook that notifies your system if your intent can be charged</li>
<li>And then continue with charging if available, otherwise inform user for any errors.</li>
</ul>

<p>That's still a high overview of how the process works.
You would need to use <a href="https://stripe.com/docs/payments/payment-intents" rel="nofollow noreferrer">Payment Intents API</a> and <a href="https://stripe.com/docs/payments/payment-methods" rel="nofollow noreferrer">Payment Methods API</a></p>

<p>[/EDIT]</p>

CC BY-SA 4.0
2020-02-20T06:46:34.210Z
Thanks so much for the clear answer!! I will work on it next week. Thank you!
Sam Cheung
CC BY-SA 4.0
2020-02-20T09:02:13.477Z
No problem at all. FYI, we handled the waiting for webhook process, by keeping the user on the checkout screen (with a spinner to show process being done) and hitting a custom endpoint of the plugin using AJAX that would inform us when the token can be charged before continuing. Feel free to mark it as accepted answer if everything worked for you.
RoussKS
CC BY-SA 4.0
2020-02-18T14:11:51.483Z
2020-02-19T15:48:49.767Z
2020-02-19T15:48:49.767Z
RoussKS
<p>Have you seen this plugin? -> <a href="https://plugins.craftcms.com/web-payments" rel="nofollow noreferrer">https://plugins.craftcms.com/web-payments</a></p>

<p>edit: this is an answer for Craft 3/Commerce 2</p>

CC BY-SA 4.0
2020-02-18T06:48:43.583Z
Yes, I read it. But, we are using Craft 2, not Craft 3...
Sam Cheung
CC BY-SA 4.0
2020-02-18T14:07:14.573Z
If you are using Craft Commerce 2, you should be using Craft CMS 3. The plugin doesn't need Craft Commerce. I believe you just got a bit confused there.
Answer below
RoussKS
CC BY-SA 4.0
2020-02-18T15:47:50.107Z
Wait, you can actually run Commerce 2 on Craft 2?
dmatthams
CC BY-SA 4.0
2020-02-19T06:44:56.950Z
Oh.. we are using Craft CMS 2.6.2997, Commerce 1.2.1351
Sam Cheung
CC BY-SA 4.0
2020-02-19T09:23:45.380Z
that kind of changes the whole answer to your query. it's still doable though.
RoussKS
CC BY-SA 4.0
2020-02-17T12:24:15.347Z
2020-02-18T15:48:27.597Z
2020-02-18T15:48:27.597Z
dmatthams
<p>We are using Stripe on our website. Craft CMS 2.6.2997 and Commerce 1.2.1351. Can we use the apple pay function? </p>

<p>I read the Stripe document(<a href="https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-testing-chrome" rel="nofollow noreferrer">https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-testing-chrome</a>). It seems possible to do that. But, I am not sure is it work on Commerce 2...</p>

<p>Anyone know?</p>

<p>Thanks!</p>

<plugin-craftcommerce><plugin-craftcommerce2>
Commerce 1 with Apple Pay, is it possible?
# Commerce 1 with Apple Pay, is it possible?

(Asked by: username_0 on 2020-02-14)

We are using Stripe on our website. Craft CMS 2.6.2997 and Commerce 1.2.1351. Can we use the apple pay function?

I read the Stripe document(<https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-testing-chrome>). It seems possible to do that. But, I am not sure is it work on Commerce 2...

Anyone know?

Thanks!

**Tags:** plugin-craftcommerce, plugin-craftcommerce2


---

## 2 answers

### Answer by username_1 on 2020-02-18. Score: 3 | Accepted answer

Quick answer.

Yes you can use Apple Pay with Craft Commerce and the first-party [Stripe Gateway Plugin](https://plugins.craftcms.com/commerce-stripe).

In order to do that, you need to customise your template and add the functionality for the Payment Request button. What this does is more or less generating a charge promise token for Stripe (same way it does for card).

Charging the token is then handled by the gateway itself as you would with a card charge.

You can choose to display the button by checking if a relevant Payment API is supported with [paymentRequest.canMakePayment() method](https://stripe.com/docs/js/payment_request/can_make_payment).

I hope this helps in terms of a high overview.

[EDIT]

The above answer was for use with Craft Commerce 2, as originally set by the question.

Requirement changed to Commerce 1.

The quick answer is still yes.
We have completed a similar task before (with Stripe Elements and Stripe Sources), though that's before SCA.
But Elements are SCA ready as far as I know and you need to use the PaymentIntents API PaymentMethods API.

Difference is that the main Stripe Gateway for commerce 1 (by omnipay) doesn't seem to support webhooks from Stripe, which informs your system whether a token (Source at the time) can be charged or not.

Hence, you need to build kind of your own plugin that loads an extra stripe gateway either new or extending the existing Stripe gateway class (extending is easier as you don't need to rebuild everything).
Might need to add a custom Payment Form to your plugin.

* You still need to build a custom template.
* The template should use Stripe elements.
* Logic is same, chargeable promise token which you need to charge.
* Request for charging
* Await webhook that notifies your system if your intent can be charged
* And then continue with charging if available, otherwise inform user for any errors.

That's still a high overview of how the process works.
You would need to use [Payment Intents API](https://stripe.com/docs/payments/payment-intents) and [Payment Methods API](https://stripe.com/docs/payments/payment-methods)

[/EDIT]

> **Comments:**
> **username_0**: Thanks so much for the clear answer!! I will work on it next week. Thank you!  
> **username_1**: No problem at all. FYI, we handled the waiting for webhook process, by keeping the user on the checkout screen (with a spinner to show process being done) and hitting a custom endpoint of the plugin using AJAX that would inform us when the token can be charged before continuing. Feel free to mark it as accepted answer if everything worked for you.  

---

### Answer by username_2 on 2020-02-17. Score: 1

Have you seen this plugin? -> <https://plugins.craftcms.com/web-payments>

edit: this is an answer for Craft 3/Commerce 2

> **Comments:**
> **username_0**: Yes, I read it. But, we are using Craft 2, not Craft 3...  
> **username_1**: If you are using Craft Commerce 2, you should be using Craft CMS 3. The plugin doesn't need Craft Commerce. I believe you just got a bit confused there. Answer below  
> **username_2**: Wait, you can actually run Commerce 2 on Craft 2?  
> **username_0**: Oh.. we are using Craft CMS 2.6.2997, Commerce 1.2.1351  
> **username_1**: that kind of changes the whole answer to your query. it's still doable though.  

---

