Praxis Wiki logo

Cashier API Zero-Authorization


OVERVIEW

In the context of the payment industry, zero-authorization refers to a type of transaction in which no authorization request is sent to the card issuer for approval before the transaction is processed. This type of transaction is typically used for small-value transactions or for recurring payments, where the risk of fraud is considered to be low.

A merchant may want to perform a zero-authorization card transaction in order to:

  • Verify a card – A merchant may want to move a potential customer to the next stage in the sales cycle by asking them to supply their card details. This allows the merchant to verify the existence of a card without charging it as well as testing the customer’s level of commitment to eventually completing the sale.
  • Save card details for future usage. So the transaction can be used as reference one to perform Subsequent Merchant-Initiated Transactions.

PARAMETERS

To perform Zero-Authorization transaction Cashier API request should be sent with the following parameters:

{
  "intent": "authorization",
  "amount": 0,
  "gateway": [hash],
  "payment_method": "Credit Card", 
  "mit": {
    "type": "initial",
    "expiry": [in days]
  }
  // *for now it’s supported only by Nuvei PSP (Safecharge) integrations
  // ** Gateway or Payment Method 'Credit Card' should be presentend in request
}

REQUEST

{
    "merchant_id": "Test-Integration-Merchant",
    "application_key": "Sandbox",
    "intent": "authorization",
    "currency": "EUR",
    "amount": 0,
    "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
    "mit": {
      "type":"initial", 
      "expiry":365
    },
    "locale": "en-GB",
    "customer_token": null,
    "customer_data": {
        "country": "GB",
        "first_name": "John",
        "last_name": "Johnson",
        "dob": "12\/31\/1980",
        "email": "[email protected]",
        "phone": "44201112222",
        "zip": "WC2N 5DU",
        "state": "JS",
        "city": "London",
        "address": "Random st., 12\/3",
        "profile": 1
    },
    "notification_url": "https:\/\/api.merchant.com\/v1\/deposits\/tx-1560610955",
    "return_url": "https:\/\/merchant.com\/payment_result\/tx-1560610955",
    "order_id": "test-1560610955",
    "payment_method": "Credit Card",
    "withdrawal_request_id": null,
    "variable1": "your variable",
    "variable2": "if that is not enough, you can pass even one more variable",
    "variable3": null,
    "version": "1.3",
    "timestamp": 1590611635
}

RESPONSE

{
  "status": 0,
  "description": "Success",
  "redirect_url": "https://some_url",
  "customer": {
    "customer_token": "2d8ffcb532ffa63f9af3b349bfac85d7",
    "country": "GB",
    "first_name": "John",
    "last_name": "Johnson",
    "avs_alert": 0,
    "verification_alert": 0
  },
  "session": {
    "auth_token": "jxc***Li9",
    "intent": "authorization",
    "session_status": "open",
    "order_id": "test-1678182726",
    "currency": "USD",
    "amount": null,
    "conversion_rate": "1.000000",
    "processed_currency": "USD",
    "processed_amount": 0,
    "payment_method": "Credit Card",
    "gateway": "7793a029e517a916ab6e6d9874b459f4",
    "cid": "1",
    "variable1": "your variable",
    "variable2": "if that is not enough, you can pass even one more variable",
    "variable3": null
  },
  "timestamp": 1590611635,
  "version": "1.3"
}