Skip to main content

Documentation

Completion

Send a request to run a completion on device.

    • panFirstSix

    • First six letters of PAN from response e.g. 123456******7890 input: "123456"

    • panLastFour

    • Last four letters of PAN from response e.g. 123456******7890 input: "7890"

    • authCode

    • nput authCode from original transaction

    • stan

    • Input Stan from original transaction.

    • cardLength

    • Input length of card e.g. 123456******7890 input: "16"

    • amount

    • The amount represented with two minor units, e.g. 12 EUR is 1200.

    • disablePrinting

    • Indicates if to print a receipt.

    • referenceId

    • Optional reference from merchants.

    • language

    • The language that the PAX POS will use to display information on the device. One of the following:

      • en_GB

      • ar_EG

      • da_DK

      • de_DE

      • es_ES

      • fi_FI

      • hi_IN

      • is_IS

      • nb_NO

      • nl_NL

      • pi_PL

      • pt_PT

      • ru_RU

      • sl_SI

      • sv_SE

      • zh_CN

    • voucherCode

    • A Mastercard voucher code is a unique alphanumeric code that can be used to redeem a specific value or discount on purchases made with a Mastercard, typically provided as part of a promotion or reward program.

    • whitelistAids

    • Specify the AIDs that are allowed to be used in the transaction, terminal config needs a predefined list of AIDs to be able to use this feature

    • whitelistBins

    • Specify the BINs that are allowed to be used in the transaction, terminal config needs a predefined list of BINs to be able to use this feature.

    • callbackUrl

    • The URL that CloudLinkApi will use to return information to the caller.

    • deviceToken

    • The token of a PAX POS device.

    • correlationId

    • An ID provided by the caller. Will be returned in the callback for message matching. In a cancel request, use the value from the sale/refund that is being cancelled.

    • timeToLive

    • If the request has not reached the PAX POS device within this time, the request will be deleted and no reversal action is required by the caller. If not set the default value is 5 seconds.

    • endStateApplication

    • Deprecated - Do not use. End state application is the name of the application that is supposed to be active on the POS device once the transaction has been processed.

    • type

    • Example: https://tools.ietf.org/html/rfc7231#section-6.5.1

    • title

    • Bad Request

    • status

    • 400

    • detail

    • DeviceId not registered

    • message

    • Unauthorized

    • message

    • Server Error

  • /completion

  • 202 Accepted completion

  • curl -X
    post https://CloudLinkApi/completion
    -H 'X-API-KEY: your-access-key-here'
    -d '{
         "panFirstSix": "123456",
         "panLastFour": "7890",
         "authCode": "123456",
         "stan": "99",
         "cardLength": "16",
         "amount": "100",
         "disablePrinting": true,
         "referenceId": "merchant-ref-number-abc123",
         "language": "en_GB",
         "voucherCode": null,
         "whitelistAids": null,
         "whitelistBins": null,
         "callbackUrl": "http://example.com/webhook-endpoint",
         "deviceToken": "b16526c3447ba6cea4818d",
         "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
         "timeToLive": 5,
         "endStateApplication": null
    }
    ' 
  • {
      "message": "Accepted"
    }
  • 400 Bad Request

  • curl -X
    post https://CloudLinkApi/completion
    -H 'X-API-KEY: your-access-key-here'
    -d '{  
          "panFirstSix": "123456",
          "panLastFour": "7890",
          "authCode": "123456",
          "stan": "99",
          "cardLength": "16",
          "amount": "100",
          "disablePrinting": true,
          "referenceId": "merchant-ref-number-abc123",
          "language": "en_GB",
          "voucherCode": null,
          "whitelistAids": null,
          "whitelistBins": null,
          "callbackUrl": "http://example.com/webhook-endpoint",
          "deviceToken": "b16526c3447ba6cea4818d",
          "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
          "timeToLive": 5,
          "endStateApplication": null
    }
    ' 
  • {
      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
      "title": "Bad Request",
      "status": 400,
      "detail": "DeviceId not registered"  
    }
  • 401 Unauthorized completion

  • curl -X
    post https://CloudLinkApi/completion
    -H 'X-API-KEY: your-access-key-here'
    -d '{  
          "panFirstSix": "123456",
          "panLastFour": "7890",
          "authCode": "123456",
          "stan": "99",
          "cardLength": "16",
          "amount": "100",
          "disablePrinting": true,
          "referenceId": "merchant-ref-number-abc123",
          "language": "en_GB",
          "voucherCode": null,
          "whitelistAids": null,
          "whitelistBins": null,
          "callbackUrl": "http://example.com/webhook-endpoint",
          "deviceToken": "b16526c3447ba6cea4818d",
          "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
          "timeToLive": 5,
          "endStateApplication": null
    }
    ' 
  • {
      "message": "Unauthorized"
    }
    
  • 500 Server Error

  • curl -X
    post https://CloudLinkApi/completion
    -H 'X-API-KEY: your-access-key-here'
    -d '{  
          "panFirstSix": "123456",
          "panLastFour": "7890",
          "authCode": "123456",
          "stan": "99",
          "cardLength": "16",
          "amount": "100",
          "disablePrinting": true,
          "referenceId": "merchant-ref-number-abc123",
          "language": "en_GB",
          "voucherCode": null,
          "whitelistAids": null,
          "whitelistBins": null,
          "callbackUrl": "http://example.com/webhook-endpoint",
          "deviceToken": "b16526c3447ba6cea4818d",
          "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
          "timeToLive": 5,
          "endStateApplication": null
    }
    ' 
    
  • {
      "message": "Server Error"
    }