支払いのステータス をどのように知ることができるか教えてください。
こんにちは、スマレジのチームの皆様へ
取引登録APIを呼び出しましたが、200のステータスが返ってきました。
これは取引の登録が完了したことを意味しますが、支払いが完了したわけではありません。認識が合ってますか?
もし認識が合っていれば、支払いのステータス(支払いが行われたかどうか)をどのように知ることができるか教えてください。
どうもありがとうございます!
こんにちは、スマレジのチームの皆様へ
取引登録APIを呼び出しましたが、200のステータスが返ってきました。
これは取引の登録が完了したことを意味しますが、支払いが完了したわけではありません。認識が合ってますか?
もし認識が合っていれば、支払いのステータス(支払いが行われたかどうか)をどのように知ることができるか教えてください。
どうもありがとうございます!
答え
@miniique_suzuki
スマレジ側は決済サービス側で決済が済んでいるかどうかに関わらず取引を立てることができます。
またスマレジに取引登録が完了したということと決済サービス側で決済が完了したことは別の意味となります。
そのため基本的には決済が完了してから取引登録していただければと存じますが、
もし決済完了前にスマレジにデータを登録したい場合は仮販売機能や取置き機能をご利用ください。
仮販売、取置きについては以下のヘルプサイトをご参照ください。
◇取引を事前登録する(仮販売機能)
https://help.smaregi.jp/hc/ja/articles/217327597
◇取置き販売をする
https://help.smaregi.jp/hc/ja/articles/202423876
Thank you for your reply!
I saw your comment on another post in English and I don't know Japanese so please allow me to ask in English.
My situation is I want to implement payment by Smaregi from my system. Click payment on my system, call Smaregi API then got payment status from Smaregi
So as you said If I want to register data in Smaregi before payment is completed, I should call register reserve API (API: /transactions/layaways)
After registering the reserve successfully, pending transactions will be displayed on POS, then complete payment by Tap [Checkout] to complete the checkout (as described on https://help.smaregi.jp/hc/ja/articles/202423876)
After that, from my system, how can I know if user completed payment on POS? Any API to get payment status or webhook?
And what happens on POS if I call register transaction API?
@miniique_suzuki
pending transactions will be displayed on POS, then complete payment by Tap [Checkout] to complete the checkout
Is it correct to say that the payment is completed when this operation is performed?
By using the Webhook(pos:layaway) and the API(getLayawayById), it is possible to determine if a transaction has been checked out.◎process
(1) When a layaway registration, Webhook(pos:layaway) will send with ["action": "created"].
(2) When a user checks out by invoking the arrangement, Webhook(pos:layaway) will send with ["action": "edited"].
(3) Call the API(getLayawayById) with "with_layaway_pick_up=all" to check if "layawayPickUp" exists.→If it is ["layawayPickUp": null], not yet checked out.
If the information is included, it has been checked out.If already checked out, you can also call the API(getTransactionId) based on the "transactionHeadId" in "layawayPickUp" to check the information of the transaction.Please refer to the following for API Reference.
◇Webhook(layaway)
https://www1.smaregi.dev/apidoc/#operation/webhook-transactions-layaway
◇API(getLayawayById)
https://www1.smaregi.dev/apidoc/#operation/getLayawayById
Thank you for your reply and sorry for bothering you again.
pending transactions will be displayed on POS, then complete payment by Tap [Checkout] to complete the checkout
So it is incorrect to say that payment is completed when click on checkout?
I checked on Smaregi app, and see the payment, choose payment, and go to the screen as below image, click on excute to complete payment. Is it right?
If yes, what webhook will be used for this?
I checked the webhook and It seem "settlement process" webhook with event "pos:adjustments" is suitable with payment https://www1.smaregi.dev/apidoc/#operation/webhook-adjustments
But It doesn't send transactionId.
So please help me correct how can I know if the payment is completed (with what transaction ID)?
Thank you so much!
@miniique_suzuki
The term "adjustments" in Smaregi refers to the process by which store staff counts the number of money in the cash drawer after the close of business and reconciles it to the day's sales proceeds.
Thus, the fact that a transaction has been posted to Smaregi has nothing to do with the settlement of "pos:adjustments.
"Tap [Checkout] and the transaction will be registered at Smaregi.
Basically, the process is to deposit the money, then check out and register the transaction Smaregi.
Therefore, checkout is only done after the deposit is confirmed.You are currently considering the use of webhooks.
What kind of system operation are you considering, and what are the details of the checkout process?