I want to test create payment with RestAPI, but when I use the api at document (https://shopify.dev/api/admin-rest/2023-01/resources/payment#post-checkouts-token-payments) I get response 404 Not Found. I try with SDK (
new shopify.rest.Payment({session})) and have same response.
I searched this issue, I found that I have to turn on Sales Channel => Payment processing. Is it really necessary here? Because i only want test function but need Shopify review??
Hey @trendiitest - thanks for getting in touch. At the moment, these payment resources are restricted to Sales Channels only, and you must apply for approval to access the resources. There is a bit more information here, but the approval process is in place as there are certain requirements that are needed to be approved for access to the Sales Channel API.
That said, if you did want to test checkout functionality, you could make use of the Storefront API’s Checkout object through GraphQL. You could use the CheckoutCreate mutation to set up a test checkout and then use the CheckoutCompleteFree mutation to simulate a completed payment. It’s not the most ideal workaround, so I’m happy to send your feedback on to our team as well.
I can’t guarantee anything in terms of approval for the access scopes, but I do get where you’re coming from - it would be useful to be able to test the functionality, especially if you’re building a development store or an app to test infrastructure.
Hope this helps - let us know if we can clarify anything further for you.
1 Like