How to use
Create a request and pass the returned request_id to the widget as requestId. Order parameters stay on that request and are not passed into the SDK.
Embed
<div id="switchere" style="min-height: 400px; max-width: 448px; width: 100%;"></div>
<script src="https://sandbox.switchere.com/js/ramp-sdk-builder.js"></script>
<script>
window.switchereRamp.init({
el: '#switchere',
requestId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});
</script>
<div id="switchere" style="min-height: 400px; max-width: 448px; width: 100%;"></div>
<script src="https://switchere.com/js/ramp-sdk-builder.js"></script>
<script>
window.switchereRamp.init({
el: '#switchere',
requestId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});
</script>
| Name | Required | Description |
|---|---|---|
| el | yes | CSS selector of the element the widget is rendered into. |
| requestId | request_id from Request create. |
Redirect
You can also redirect the user to the buy-sell page and pass the same request_id. The page fills in the request data automatically.
https://sandbox.switchere.com/buysell?request_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://switchere.com/buysell?request_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx