Run an auth only transaction

You may want to authorize a transaction (auth only) and capture it at a later time.

Please note that auth only transaction(s) are currently only available through the following alternative payment methods (APMs):

You can run an auth only transaction using any of the three integration methods, depending on the payment method:

Multi Iframe (Express APM) for Auth Only

To run an auth only transaction using the multi iframe (also known as Express APM), follow the steps below.

  1. Prepare Your Checkout Page

    Follow steps 1-2 of the Express APM tutorial.

  2. Request an Express Iframe URL

    Follow step 3 of the Express APM tutorial.

    Include isAuthOnly: true in the body of your request.

    If the APM supports it, you can also include Pay Later messaging.

    Example Request
    curl -X POST https://api.nexiopaysandbox.com/apm/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "data": {
        "amount": 4.00,
        "currency": "USD",
        "customer": {
          "orderNumber": "12345678",
          "firstName": "John",
          "lastName": "Doe",
          "email": "[email protected]",
          "billToCountry": "US"
        },
        "totalTaxAmount": 0,
        "cart": {
          "items": [
            {
              "item": "E200",
              "description": "Platinum set",
              "quantity": 2,
              "price": 2
            }
          ]
        }
      },
      "customerRedirectUrl": "https://[your-ecommerce-website]",
      "uiOptions": {
        "displaySubmitButton": true
      },
      "isAuthOnly": true
    }'
    

    A successful response includes the expressIFrameUrl. Copy or store this for use in step 3.

    Example 200 Response
    {
      "expiration": "2021-07-22T20:49:50.000Z",
      "token": "54a0106y-7750-45b1-961e-29ad95763a23",
      "expressIFrameUrl": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106y-7750-45b1-961e-29ad95763a23",
      "redirectUrls": [
        {
          "paymentMethod": "klarna",
          "url": "https://api.nexiopaysandbox.com/apm/v3/popup?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=klarna"
        }
      ],
      "buttonIFrameUrls": [
        {
          "paymentMethod": "klarna",
          "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&  paymentMethod=klarna"
        },
        {
          "paymentMethod": "braintreePayPal",
          "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=braintreePayPal"
        }
      ],
      "scriptUrl": "https://api.nexiopaysandbox.com/apm/v3/scripts?token=54a0106y-7750-45b1-961e-29ad95763a23"
    }
    

  3. Complete the Payment Process

    Follow steps 4-6 of the Express APM tutorial.

    A successful auth only transaction returns a status of authOnlyPending or authOnly.

Individual Iframe (Button URLs) for Auth Only

To run an auth only transaction through an APM using the button iframe URLs, follow the steps below.

  1. Prepare Your Checkout Page

    Follow steps 1-3 of the Button Iframe URLs tutorial.

  2. Request the APM Button Iframe URLs

    Follow step 4 of the Button Iframe URLs tutorial.
    Include isAuthOnly: true in the body of your request.

    If the APM supports it, you can also include Pay Later messaging.

    Example Request
    curl -X POST https://api.nexiopaysandbox.com/apm/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "data": {
        "amount": 4.00,
        "currency": "USD",
        "customer": {
          "orderNumber": "12345678",
          "firstName": "John",
          "lastName": "Doe",
          "email": "[email protected]",
          "billToCountry": "US"
        },
        "totalTaxAmount": 0,
        "cart": {
          "items": [
            {
              "item": "E200",
              "description": "Platinum set",
              "quantity": 2,
              "price": 2
            }
          ]
        }
      },
      "customerRedirectUrl": "https://[your-ecommerce-website]",
      "isAuthOnly": true
    }'
    

A successful request returns an array of buttonIFrameUrls. This array is a list of all APMs currently enabled on your merchant account. Copy the url associated with the wanted payment method.

Example 200 Response
{
  "expiration": "2021-07-22T20:49:50.000Z",
  "token": "54a0106y-7750-45b1-961e-29ad95763a23",
  "expressIFrameUrl": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106y-7750-45b1-961e-29ad95763a23",
  "redirectUrls": [
    {
      "paymentMethod": "klarna",
      "url": "https://api.nexiopaysandbox.com/apm/v3/popup?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=klarna"
    }
  ],
  "buttonIFrameUrls": [
    {
      "paymentMethod": "klarna",
      "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=klarna"
    },
    {
      "paymentMethod": "braintreePayPal",
      "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=braintreePayPal"
    }
  ],
  "scriptUrl": "https://api.nexiopaysandbox.com/apm/v3/scripts?token=54a0106y-7750-45b1-961e-29ad95763a23"
}

  1. Complete the Payment Process

    Follow steps 5-7 of the Button Iframe URLs tutorial.

    A successful auth only transaction returns a status of authOnlyPending or authOnly.

    Note: If the customer selected PayPal (with Braintree) as the payment method, then, in the event posted to your window, the response includes an apm.token parameter. Save the apm.token value somewhere in order to use it again (probably similar to how you save TokenEx tokens already).

Redirect URLs for Auth Only

To run an auth only transaction through an APM using the redirect URLs, follow the steps below.

  1. Prepare Your Checkout Page

    Follow steps 1-2 of the Redirect URLs tutorial.

  2. Request the Redirect URL

    Follow step 3 of the Redirect URLs tutorial.
    Include isAuthOnly: true in the body of your request.

    If the APM supports it, you can also include Pay Later messaging.

    Example Request
    curl -X POST https://api.nexiopaysandbox.com/apm/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "data": {
        "amount": 4.00,
        "currency": "USD",
        "customer": {
          "orderNumber": "12345678",
          "firstName": "John",
          "lastName": "Doe",
          "email": "[email protected]",
          "billToCountry": "US"
        },
        "totalTaxAmount": 0,
        "cart": {
          "items": [
            {
              "item": "E200",
              "description": "Platinum set",
              "quantity": 2,
              "price": 2
            }
          ]
        }
      },
      "customerRedirectUrl": "https://[your-ecommerce-website]",
      "isAuthOnly": true
    }'
    

    A successful request returns an array of redirectUrls. This array is a list of all APMs currently enabled on your merchant account. Copy the url of the APM you want (for use in step 3).

    Example 200 Response
    {
      "expiration": "2021-07-22T20:49:50.000Z",
      "token": "54a0106y-7750-45b1-961e-29ad95763a23",
      "expressIFrameUrl": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106y-7750-45b1-961e-29ad95763a23",
      "redirectUrls": [
        {
          "paymentMethod": "klarna",
          "url": "https://api.nexiopaysandbox.com/apm/v3/popup?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=klarna"
        },
        {
          "paymentMethod": "payPal",
          "url": "https://www.api.nexiopaysandbox.com/v3/popup?token=79001ef6-fb40-4917-b8ae-2294fdfe1cf2&paymentMethod=payPal"
        }
      ],
      "buttonIFrameUrls": [
        {
          "paymentMethod": "klarna",
          "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=klarna"
        },
        {
          "paymentMethod": "braintreePayPal",
          "url": "https://api.nexiopaysandbox.com/apm/v3?token=54a0106b-7750-45b1-961e-29ad95763a23&paymentMethod=braintreePayPal"
        }
      ],
      "scriptUrl": "https://api.nexiopaysandbox.com/apm/v3/scripts?token=54a0106y-7750-45b1-961e-29ad95763a23"
    }
    

  3. Complete the Payment Process

    Follow steps 4-6 of the Redirect URLs tutorial.
    A successful auth only transaction returns a status of authOnlyPending or authOnly.


Did this page help you?