support chat guru told me to create a topic here to get more help.
So my hosted payment gateway works fine so far.
Now I am at the point where I want to check if the shop has auth only or auth + capture active in its checkout settings.
But the parameter list https://help.shopify.com/api/sdks/hosted-payment-sdk/api-reference/request-values doesnt show me a param that indicates if there is auth only or auth + capture.
How can I decide what to do ?
Or isnt this possible in HPG ?
Next step would be refunds... If guess there is no transaction created on HPG, so I cant do a refund on refunds.json or transaction.json endpoint.
Did someone ever try to do a refund on HPG API ?
Most tries ended in 402 Error due to no transaction created. But this seems to be normal on HPG.
Isnt it possible to do a full or partial refund on a HPG Order via API ?
If I do so in shop admin it seem to be possible, but I want to do it with API,
because there might be a refund or chargeback from gateway side which needs to be synced to shopify.
Maybe some can help me.
Did you get any answer on this?
Is there any way to integrate a hosted payment page with full offsite redirection in Shopify AND being able to handle manual capture and refunds through Shopify's back office at the same time?
It seems not possible through Hosted Payment SDK. But is there any other way to achieve this?
Thanks in advance for your help!
sadly I got no reply on my question.
I found out that there seems to be no solution to handle offsite payments inside shopify.
There is no indication that shows me if the trx is preauth or preauth + capture.
Looks like its even impossible to handle chargebacks or refunds from outside.
There is only the way to activate things from shopify and react with the webhooks in external systems.
The other ways doesnt work until now.
I never got a successful refund over api. always some kind of error.
The support told me that hosted payments wont create such a transaction like the inbound payments.
So there isnt a way to refund them over api.
maybe this will come in future.. i hope.
Sorry for this bad news.
If you will find out something different, I would be grateful to read about your solution.
Thank you for your response.
I'm afraid there's no solution indeed…
I had a look on the Active Merchant's Offsite Payments library (which is the one on which the Hosted Payment SDK is based on) and it doesn't seem to handle refunds/captures.
I'll let you know if I find something, and please let me know you find a solution.
did you find any solution to this problem?
I have experienced the same issue and I just can't accept why it is not possible to
handle online Captures and Refunds using Hosted Payment Gateway.
The Transaction Type is always set to "Sale", I was unable to force the Transaction Type to Authorization.
If I use an integrated Gateway (ex. Bogus), then it works as expected, but with the Hosted Payment SDK I could not make it to work.
I have also written to email@example.com and have a long conversation with the support team, but they were not so helpful I wished. They were not sure If I will be able to do that after upgrading my dev store to Basic Plan.
I did that, but I still doesn't work. I was also adviced to contact the Shopify Expert for more information, but unfortunately I didn't get any reply on this. I just cannot accept why the Shopify Support is so poor organized, it is just so unacceptable.
The only thing, which we could you is the WebHooks in the Notification Settings, but it is not good enough, because we cannot affect the created backend transaction in the Shopify Admin (It is being created before the hook is sent and we will not be able to simulate Capture Hook, because the transaction type is always set to Sale)
Please, reply If someone finds a solution to this.
If you wish to process an authorization transaction via the Hosted Payments SDK, you'll need to specify the x_result=pending parameter. To transition this to a paid order on Shopify, you'll need to POST back to the callback_url with x_result=completed.
There is currently no support for this in the Shopify admin panel. Your users will need to manage these actions outside of Shopify and have your gateway application POST back to Shopify to transition the financial status accordingly.
that is actually the same what I do when updating the Payment Status.
First of all I use the the x_result as pending using the complete_url then in Shopify the transaction type is
set to Sale and the Payment Status to Pending.
After sending a Post Request with x_result=completed using the callback_url then the Payment Status is set to Paid.
There is no way to control the transaction type to authorize from outside (we need to display "Authorized" as Payment Status)
Do you know if this feature will be integrated soon in the Shopify Admin or not, because our Clients insist on having this feature. We must handle these backend transctions directly in our API.
Here is a link to another topic, in which Jordan (API Support Specialist) has answered that:
Though, this is something we will certainly look into building out.
I will highly appreciate your help about that.
Thanks in advance!