Create an Authorize

Changed on

This endpoint authorizes a transaction.

post/

Request

  • Base URL
    https://api.tap.company/v2/authorize
  • URL
    https://api.tap.company/v2/authorize/
  • Auth
    API key in header Authorization

Headers

lang_codestring

change the language in the redirection page to "en" or "ar"

Request body

amountinteger

The amount to be authorized in decimal format. (Eg: 3.990)

currencystring

The currency in which the amount should be authorized in standard 3 digit ISO currency code. (Eg: USD)

customer_initiatedboolean

This parameter determines whether the charge was initiated by customer or not

threeDSecureboolean

The 3D Secure request status for a particular authorized payment. Values can either be true or false.

save_cardboolean

The credit card of the payer can be saved for future transactions. Values can be either true or false.

statement_descriptorstring

The text that appears on the customer's bank/card statement for this charge, e.g., "TAP*SUBSCRIPTION".

authorize_debitboolean

A boolean parameter that accepts values true or false. If set to true, the API will process the transaction even if it is not supported by the payment network. It is important to note that currently, this feature is only supported for mada transactions.

Response

200

OR
OR

Example response

{
  "id": "auth_TS065220221533k5FK1505634",
  "object": "authorize",
  "api_version": "V2",
  "method": "CREATE",
  "status": "INITIATED",
  "amount": 1,
  "currency": "KWD",
  "threeDSecure": true,
  "statement_descriptor": "sample",
  "transaction": {
    "timezone": "UTC+03:00",
    "created": "1652628832666",
    "url": "https://sandbox.payments.tap.company/test_gosell/v2/payment/response.aspx?tap_auth=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yqjGjChH5aTk%3d&sess=6mXrG%2fSKpa0%3d&token=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yee5pNiSxqVQ28X2kDyKgPg%3d%3d",
    "expiry": {
      "period": 30,
      "type": "MINUTE"
    },
    "amount": 1,
    "currency": "KWD"
  },
  "reference": {
    "transaction": "txn_0001",
    "order": "ord_0001"
  },
  "response": {
    "code": "100",
    "message": "Initiated"
  },
  "receipt": {
    "email": true,
    "sms": true
  },
  "customer": {
    "first_name": "Test",
    "last_name": "Test",
    "email": "test@test.com",
    "phone": {
      "country_code": "965",
      "number": "50000000"
    }
  },
  "source": {
    "object": "source",
    "id": "src_card"
  },
  "redirect": {
    "status": "PENDING",
    "url": "http://your_website.com/redirecturl"
  },
  "post": {
    "status": "PENDING",
    "url": "http://your_website.com/posturl"
  },
  "auto": {
    "status": "PENDING",
    "type": "VOID",
    "time": 100
  },
  "metadata": {
    "udf1": "test_data_1",
    "udf2": "test_data_2",
    "udf3": "test_data_3"
  }
}

Changes

    • breaking

      added subschema #1 subschema #2: initiated with payment agreement subschema #3: authorized response with payment agreement to the response body oneOf list for the response status

    • breaking

      the response's body type changed from object to no type for status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      api operation id create-a-connect-url removed and replaced with create-an-authorize

    • info

      added the new optional header request parameter lang_code

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      the request property / became optional

    • info

      the request property default value changed from http://example.com/postUrl to http://your_website.com/posturl

    • info

      the request property default value changed from http://example.com/redirectUrl to http://your_website.com/redirecturl

    • info

      added the optional property to the response with the status