On-Ramp Fan Tokens

Integrating the Socios.com On ramp Fan Token

Implement the On-Ramp Fan Token flow

Our On-Ramp Fan Token is an extension of the Partner web app. This feature will allow your users to buy the Fan Token of one team.

To integrate it into your website or mobile app, you only need your Partner URL and a few parameters (all others parameters can be combined with the followings).

https://[Partner Shortname].socios.com/

You must use your Partner URL in an iframe, a modal or a WebView.

Then, add a few dedicated parameters:

ParameterValueDescription

on_ramp_token

true

Mandatory. Set it to true to trigger the On-Ramp Fan Token flow.

purchase_qty

0 -> infinite

Optional. User will be able to change it when they arrive on the flow.

fiat_currency_code

'EUR', 'USD', 'GBP', 'BRL', 'TRY', 'KRW'

Optional.

For instance, ACM would have the following URL to redirect to the ACM On-Ramp Fan Token flow with 34 pre-populated ACM tokens to buy and with USD FIAT currency:

https://acm.socios.com/?on_ramp_token=true&purchase_qty=34&fiat_currency_code=USD

Get informed once the user has finalised their transaction

The window that triggers the On-Ramp flow can listen to the message event from a postMessage and the onRampTokenPaymentStatus code, in order to retrieve when the user has finalised their transaction, and to see how many fan tokens they have bought.

We would strongly recommend to double check the information you will receive with the Wallet endpoint in order to confirm the data is valid.

Here is how you should handle it, making sure you are listening to the right event.data and the right event.origin:

window.addEventListener(
  "message",
  (event) => {
    if (
      event.data !== "onRampTokenPaymentStatus" ||
      event.origin !== "https://gateway-capsicum.socios.com"
    )
      return;

    <HERE do a refetch or whatever is needed>
  },
  false
); 

Last updated