.. _/api/v2/get-card-info/: /api/v2/get-card-info ###################### .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^ For integration purposes use staging environment :code:`HTTPS POST` request to the :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`SHA-1` for authentication. See :ref:`statuses`. .. _api_v2_get-card-info_request_url: API URLs ^^^^^^^^ .. note:: | The path in API URL should not be hardcoded, as it may be changed in future. .. list-table:: :widths: 50, 50 :header-rows: 1 :class: longtable * - Integration - Production * - :ex:`https://sandbox.payneteasy.com/paynet/api/v2/get-card-info/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v2/get-card-info/ENDPOINTID` * - :ex:`https://sandbox.payneteasy.com/paynet/api/v2/get-card-info/group/ENDPOINTGROUPID` - :ex:`https://gate.payneteasy.com/paynet/api/v2/get-card-info/group/ENDPOINTGROUPID` .. _api_v2_get-card-info_request_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded. .. list-table:: :widths: 30, 45, 25 :header-rows: 1 :class: longtable * - Parameter Name - Description - Value * - :code:`login` - Connecting Party's login name. - | ``Necessity``: Mandatory | ``Type``: String | ``Length``: 20 * - :code:`cardrefid` - Card reference ID obtained at :ref:`Card Registration Stage`. - | ``Necessity``: Mandatory | ``Type``: String | ``Length``: 20 * - :code:`control` - | Checksum generated by :ref:`SHA-1`. Control string is represented as concatenation of the following parameters: | 1. Request parameter: :ex:`login` | 2. Request parameter: :ex:`cardrefid` | 3. :ex:`merchant_control` (Control key assigned to Connecting Party account in the Payneteasy gateway system). - | ``Necessity``: Mandatory | ``Type``: String | ``Length``: 128 .. _api_v2_get-card-info_response_parameters_url: Response Parameters ^^^^^^^^^^^^^^^^^^^ .. note:: | Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value. .. list-table:: :widths: 25, 75 :header-rows: 1 :class: longtable * - Information Response Parameters - Description * - :code:`type` - | The type of response. May be :ex:`get-card-info-response`, :ex:`validation-error`, :ex:`error`. | If type equals :ex:`error`, :ex:`error-message` and :ex:`error-code` parameters contain error details. * - :code:`serial-number` - Unique number assigned by Payneteasy server to particular request from the Connecting Party. * - :code:`card-printed-name` - Card holder's name. * - :code:`bin` - Bank Identification Number. * - :code:`last-four-digits` - The last four digits of :ex:`PAN`. * - :code:`expire-year` - Card expiration year. * - :code:`expire-month` - Card expiration month. * - :code:`result-3d` - 3DS completion result. * - :code:`error-message` - If status is :ex:`validation-error` or :ex:`error` this parameter contains the reason for decline or error details. * - :code:`error-code` - The error code is case of :ex:`validation-error` or :ex:`error` status. Request Example ^^^^^^^^^^^^^^^ .. code-block:: text POST /paynet/api/v2/get-card-info/46750 HTTP/1.1 Host: https://sandbox.payneteasy.com User-Agent: curl/7.85.0 Accept: */ Content-Length: 77 Content-Type: application/x-www-form-urlencoded Connection: close &login=Test &cardrefid=1461665 &control=f8ffd7dac9e334799862da0e9190387510d43ff7 Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Thu, 02 Feb 2023 11:21:39 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 193 type=get-card-info-response &serial-number=00000000-0000-0000-0000-000002e0d218 &card-printed-name=CARD+HOLDER &bin=453897 &last-four-digits=6732 &expire-year=2099 &expire-month=12 &result-3d=F Fail Response Example ^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Thu, 02 Feb 2023 11:26:22 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 136 type=validation-error &serial-number=00000000-0000-0000-0000-000002e0d21f &error-message=End+point+with+id+99999+not+found &error-code=3 Postman Collection ^^^^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/Postman/Postman_recurrent.html Request Builder ^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/examples/recurrent_transaction_Get_Card_Info_Debug.html