I need to test a feature that queries Shopify Payments disputes via the Admin GraphQL API, but I can’t get any dispute data onto my dev store to test against.
I tried enabling Shopify Payments test mode and using the documented test card (4000000000000259) to simulate a “disputed transaction,” but checkout on my dev store only recognizes the Bogus Gateway and rejects that card (“this store doesn’t accept Visa”).
Is there a supported way to get Shopify Payments active in test mode on a dev store so that dispute-simulation card actually works, or any other way to create real dispute records for testing? Thanks!
The Shopify CLI can generate a sample disputes/create webhook payload (shopify app webhook trigger --topic disputes/create) so you can test your app’s handling logic against realistic-shaped data without needing a live dispute. It won’t populate shopifyPaymentsAccount.disputes for a live GraphQL query against your dev store, but if your feature’s real job is reacting to dispute events (rather than polling the list), this sidesteps the whole test-mode problem entirely.
thanks, but my feature isn’t webhook-based. i need actual dispute records so my admin graphql query (shopifyPaymentsAccount.disputes) returns data. is there any way to create dispute records on a dev store, or is a live store with real shopify payments disputes the only option?
Hey @Simo_Aissaoui
thanks for reaching out
I think I may have found the step that’s easy to miss here. Enabling test mode doesn’t automatically activate Shopify Payments as the checkout provider.
After enabling test mode, return to Settings > Payments. Shopify Payments might still show as Inactive. In the Your shop is ready to use Shopify Payments section, click Activate, as shown in the attached screenshot. This removes Bogus Gateway as the payment provider and activates the Shopify Payments gateway in test mode:
You should then be able to place a checkout order over $1 USD using card 4000000000000259, a future expiry date, and a valid test CVC. If the store uses manual capture, capture the transaction. The dispute should then be available through shopifyPaymentsAccount.disputes.
Test card details: https://help.shopify.com/en/manual/payments/shopify-payments/testing-shopify-payments
Hope this helps!
@Wes-Dev-Shopify you’re a lifesaver thank you so much