.. _api_v4_process-recurring-payments: /api/v4/process-recurring-payments ######################################### .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^^^^^^^^^^^^^ | If request is accepted with no errors, the Payment Gateway finds the recurring payment profiles for each provided recurring-payment-id and initiates new recurring transactions using the payment data saved in each profile. | Process recurring payment Multiple is initiated through :code:`HTTPS POST` request by using :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`RSA-SHA256` for authentication. .. _api_v4_process-recurring-payments_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/v4/process-recurring-payments/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/process-recurring-payments/ENDPOINTID` .. _api_v4_process-recurring-payments_request_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded and :ref:`Authorization headers`. | Below is a description of each parameter that can be included in the CSV and added to :code:`payload` parameter which will be used in the request. .. list-table:: :widths: 30, 50, 20 :header-rows: 1 :class: longtable * - CSV Parameter Name - Description - Value * - :code:`client-orderid` - Connecting Party order ID. - | ``Necessity``: Required | ``Type``: String | ``Length``: 128 * - :code:`recurring-payment-id` - Recurring ID assigned to the order by QA. - | ``Necessity``: Required | ``Type``: String | ``Length``: 10 * - :code:`amount` - Amount of currency must be the same as currency on the project assigned. Upon reaching finish date, Recurring payment will go into stop status. Supported for SRC and DST type. Required if :code:`amount-from` and :code:`amount-to` or :code:`amount-sequence` are not used. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 10 .. _api_v4_process-recurring-payments_response_parameters: 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: 35, 65 :header-rows: 1 :class: longtable * - Response Parameters - Description * - :code:`type` - The type of response. Example: :ex:`process-recurring-payment-response`, :ex:`validation-error`, :ex:`error`. If type equals :ex:`validation-error` or :ex:`error`, :ex:`error-message` and :ex:`error-code` parameters contain error details. Multiple error codes may be received: :ex:`200`, :ex:`403`, and :ex:`500`. For the :ex:`500` error code, an additional error ID will be returned. * - :code:`status` - See :ref:`status_list` for details * - :code:`serial-number` - Unique number assigned by Payneteasy server to particular request from the Merchant Request Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | **Step 1.** Create a CSV with the provided structure: .. code-block:: none "client-orderid";"recurring-payment-id";"amount" | **Step 2.** Encode CSV to base64 with the following command: .. code-block:: none base64 process-recurring-payments-example.csv | **Step 3**. Assign the :ex:`base64` encoded value to :code:`payload` parameter and send the request: .. code-block:: none POST /paynet/api/v4/process-recurring-payments/ HTTP/1.1 Host: sandbox.payneteasy.com User-Agent: curl/8.4.0 Accept: */* Content-Type: application/x-www-form-urlencoded Authorization: OAuth oauth_consumer_key="ErwinTestMerchant",oauth_signature_method="RSA-SHA256",oauth_timestamp="1727177782",oauth_nonce="Js4dwXkF8eI",oauth_version="1.0",oauth_signature="EGLiLoJJsZzZ4LgTdexkExuNCeyJEkSYuQwsrLMTvucJiIoG2rXL%2FaIkwnXwY6ncXS%2BopSYszmvAE1KnR316YxfyPzvgwO7LkrCE9r80yEfYuGOjwdB7fqvCyYtPqylS7MJ0%2BJM1EIowuWkiwURLqU3mG4J00t1Kl7CRrsjT9nwKoj8mRrljb1St3rAh8bJ7SsdKKQwir1Va6t0cuVMxjsUHJqCtztoCXAPj%2BRz4UKrjbQnwNvJ1MfOnTyeRXTAJgGg7XwctumcG5W2vfuKICwEUQ9S95jxXIci%2FmHuA8gkV7DmfolT1CnxDYzhJwvspvg9BP%2FFVxOGjUTEKDwNhCX5BB3B6EUkyEFI79V8tAtUdUy%2FzRmChPA%2FYvyBky8egkVXoKgwoUHiTQ5ITEhbzCTLjuVm9J%2FEwqVHQkwPbn6T5aTcvQBoMkDtZ70qm7J73wPKuN%2B7S%2Fi0SBc6gwGyu6G%2FfXYu%2BvDY8Ihtd6HRUC59sUYQ6D3tVbh8CE4W9tF1UiXCAoPehdBga%2BR6WUq%2FnD%2FRFrBDZ2Y%2Bz%2FMGhjQHBNZu%2B5z4JjNn7QusHpO1ZwvrI1kSlK79toVOiwVX%2FcP4H5M20s5EPjvSrcc2tnqQSUUOLFGyRFObQgs7kmBxUjEMXbVh9QXlIBdSvy4S8PkFnqYjVLh2aNgTpw%2BgB8RrZ1MY%3D" Content-Length: 888 Connection: keep-alive payload=cmVjdXJyaW5nLXBheW1lbnQtaWQ7Y2xpZW50LW9yZGVyaWQ7cGF5bWVudC1kZXNjcmlwdGlvbjtmaXJzdC1uYW1lO2xhc3QtbmFtZTthZGRyZXNzMTtjaXR5O3ppcC1jb2RlO2NvdW50cnk7c3RhdGU7cGhvbmU7ZW1haWw7Y3VzdG9tZXItaXA7YW1vdW50O2N1cnJlbmN5O3B1cnBvc2U7bm90aWZ5LXVybDtzc247YmlydGhkYXkNCjE0OTIyODY7MTIzNDU2Nzg5MDtPdXIgZ29vZHM7Sm9objtTbWl0aDsxMjM0IFBlYWNlIHN0cmVldDtDaGljYWdvOzEyMzQ1NjtVUztJTDsxMjM0NTY3ODtqb2huLnNtaXRoQGV4YW1wbGUuY29tOzEuMi4zLjc7MTA7VVNEO05vIHB1cnBvc2UgYXQgYWxsO2h0dHA6Ly9leGFtcGxlLmNvbS9wcm9jZXNzLW1lOzEyMzQ7MDIuMDEuMTk4MA0K Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: | The successful response has empty body and HTTP code 200. .. code-block:: none HTTP/1.1 200 Server: server Date: Tue, 24 Sep 2024 09:47:01 GMT Content-Length: 0 Connection: keep-alive Keep-Alive: timeout=60 X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Strict-Transport-Security: max-age=31536000 Fail Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: | The unsuccessful response has empty body and HTTP code 403. .. code-block:: none HTTP/1.1 403 Server: server Date: Wed, 25 Sep 2024 08:46:12 GMT Content-Length: 0 Connection: keep-alive Keep-Alive: timeout=60 X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Request Builder ^^^^^^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/examples/V4RecursProcess.html