Unexpected billing attempt error when renewing a subscription for free (when total is $0)

Shopify Partner
5 0 1

Hi everyone!


I'm trying to renew a subscription for free, but I'm encountering an `UNEXPECTED_ERROR` error code in the created billing attempt. This issue occurs for both Bogus Testing Gateway and Stripe (test mode). However, as soon as I update the subscription contract so that its total is larger than $0, the renewal can be completed successfully (using the same payment method that previously failed).


Is it impossible to create a billing attempt when the subscription's total is equal to $0?


Here are the steps to replicate the issue:


1. Create a subscription contract.
2. Add a 100% manual discount for all line items.
3. Add a free shipping discount.
4. Create a billing attempt.


This results in the following error in the billing attempt object:

  "errorCode": "UNEXPECTED_ERROR",
  "errorMessage": "There was a problem processing the payment for this billing attempt"


Replies 4 (4)
Shopify Partner
21 3 3

If there's no payment to be collected what would be the purpose of making a billing attempt? My best guess is that the payment provider is blocking this transaction from going through. For example, Stripe enforces a minimum charge of USD $0.50.

Shopify Partner
5 0 1

I am creating a billing attempt because it seems to be the only way to place an order for a subscription. I had considered manually creating an order, but it appears impossible to replicate the anchors on the subscription's delivery policy.


Ideally, there would be a way to place an order and skip the billing attempt, but as far as I know, there is none.

Shopify Partner
127 18 36

It is possible to create a BA with a $0 cost. If you're just testing I'd use Shopify Payments in test mode. I'd bet that its got something to do with the payment gateways you're using. I didn't know that you could test subscriptions with the Bogus Gateway (thought it had to be one of the valid gateways).  I believe Stripe will let you but obviously there's something not working there either. Perhaps remove bogus gateway and then try Stripe.  And if that doesnt work remove stripe and I bet it'll work with Shopify Payments in test mode. 


also - make sure this flag is `true` on your shop and you're not missing something else.. `eligibleForSubscriptions` (though it should be if you're able to get to check out with a subscription product in the cart) 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Shopify Partner
5 0 1

I will definitely check this with Shopify Payments. I've also tested Stripe, which failed when the total was $0 but went through normally when the subscription total was $9.99. Anyway, it would be great if there was a way to support all subscription payment methods, but it's still better than nothing!


You can use the Bogus Gateway if you enable PayPal (with automated payments accepted), otherwise you will get an error that there are no payment methods available.


Edit: I can confirm that Shopify Payments works in this case.