Specifying your own CSS file

Nexio provides the option to provide a custom CSS file so that you can match your site's style.

To do so, follow the steps below:

  1. Host your CSS file, available publicly.

  2. Send a POST request to the Create one-time-use token endpoint.

    • Include the uiOptions.css parameter in the body of the request and set the value to the URL of the CSS file to use for the iframe.
    Example Request
    curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]' \
      -d '{
        "uiOptions": {
          "css": "https://tester.nexiopaysandbox.com/static/ecom-example1.css"

    The response includes a token parameter. Encoded within this value is the URL of the CSS file. Save this token for use in the next step.

    Example 200 Response
      "expiration": "2018-09-18T15:43:05.664Z",
      "fraudUrl": "https://api.nexiopaysandbox.com/pay/v3/fingerprint?token=01080f80-76b8-4363-845d-67e8623bf170",
      "token": "830d36f6-a5e3-4455-9600-3a55b63e2fc2"

  3. Request the iframe to display on the page using the token from the response in step 2.

    For example, the following request uses the token to return the HTML for an iframe for a checkout page for a card, with the style from the CSS file you specified in step 2.

    Example Checkout with Card Iframe Request
    curl -X GET https://api.nexiopaysandbox.com/pay/v3?token=830d36f6-a5e3-4455-9600-3a55b63e2fc2'