I am currently using BlueSnap to sell some physical goods using the BuyNow page in my website. I show the shopper the estimated price for shipping and I alert them in advance that a potential surcharge may apply when considering their shipping address and other variables.
I would like to be able to charge the shopper this small amount after the purchase, without involving them again and asking them to re-enter their payment details. I know that BlueSnap has a mechanism for this, which involves some API encrypted token, but I couldn't find the full manual how to do it anywhere.
I'm currently not using the API, but if it's the only way I could make the effort to build an integration. Ideally something in the control panel would be better for me. I would appreciate any documentation or code example to explain exactly what I can do, and any restrictions that may apply.
In order to charge shoppers a manual charge, you will need some permissions and roles in the system - for that I would recommend contacting BlueSnap before any other integration effort takes place.
Assuming you have the necessary roles, you could go in one of two ways, effectively:
Virtual Terminal
The virtual terminal of BlueSnap can be a powerful tool. Once you have the correct roles enabled, login to your control panel. Go to the Settings menu in the top right corner and choose Virtual Terminal Settings:
Now in the VT settings page, find the Shopper ID field and set it to "Show":
Then press submit. Now in the virtual terminal you could create manual charges for existing shoppers, using their ID. To find out their ID, you can look in the reports of previous sales available in the control panel. Once you go to the virtual terminal and put in their shopper ID, you can click on the "BuyNow" button and finish the purchase on the shopper's behalf, without a need to ask them anything.
API
BlueSnap offers API for vaulted shopper in the Payment API and Shopper in the Extended API. If you want to write an integration to handle this, the relevant code is:
https://developers.bluesnap.com/v8976-Extended/docs/create-shopper https://developers.bluesnap.com/v8976-JSON/docs/create-vaulted-shopper
You can also create the shoppers using the BuyNow - they will be automatically created with the purchase and you can retrieve their ID via the control panel or via the API, using the invoice id:
https://developers.bluesnap.com/v8976-JSON/docs/retrieve https://developers.bluesnap.com/v8976-Extended/docs/retrieve-order
Once you have their shopper ID, you can use it to create a charge on their behalf by using the create transaction with returning shopper/vaulted shopper:
https://developers.bluesnap.com/v8976-JSON/docs/auth-capture (look for examples with vaulted shopper) https://developers.bluesnap.com/v8976-Extended/docs/create-order
In this case too, you will not require the shopper to approve the new charge.
I hope this helped!