INVOICE_ALREADY_PAID error code: What's the expected way to handle this type of error?

Brian_S
Shopify Partner
84 12 24

We've recently seen a INVOICE_ALREADY_PAID billing attempt error code but it's unclear to me how Shopify expects a subscription app to handle this. The specific example we've seen is that PayPal shows a succesful payment, but Shopify returns the error code and as a result no Order is created. 

 

Merchants obviously won't know to fulfill unless there's an order, so is the expectation that Subscription apps create free orders with the correct line items when this error code happens?

 

Is there anything else (documentation/explanation) that I'm missing around this type of error?

 

Thanks!

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
awtomic.com
Replies 3 (3)
JasonYang
Shopify Staff
Shopify Staff
11 1 4

Hey Brian,

 

I will send you a message for more information regarding this, so we can investigate this a little further,

 

Thanks

JasonYang
Shopify Staff
Shopify Staff
11 1 4

Hey Brian, 

 

After looking at the billing attempt, we see the error message `Payment has already been made for this InvoiceID.`. This is something that is returned from Paypal response. I've found this where the customer could enable  ‘block accidental payments‘ option to enable duplicate invoice payments: https://www.measureddesigns.com/magento-2-paypal-payment-has-already-been-made-for-this-invoiceid/#:.... Maybe enabling this option for that customer might resolve this issue.

 

Thanks

 

Brian_S
Shopify Partner
84 12 24

Thanks for the help @JasonYang!

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
awtomic.com