Tips & Tricks

Collection of helpful snippets that might help you solve most common integration problems.


Widget

Controlling widget's z-index

Sometimes your page can have elements with a greater z-index css setting than elements of the widget. They will be displayed by the browser above widget elements and can cause confusion for the users. We recommend setting the widget's overlay z-index property to a value higher than anything you have in your application.

var widget = new RampInstantSDK({...});
widget.domNodes.overlay.style.zIndex = 1000;
widget.show();

Releasing purchases manually (Staging environment ONLY!)

You can release purchases manually on staging environments. You need purchase id and purchaseViewToken to do it. Both of those values are available via SDK events and webhooks.

$ curl -X POST "https://api-instant-staging.supozu.com/api/widget/testing/purchase/ID/release?secret=purchaseViewToken"
...