.. _api_v4_process-recurring-payment: /api/v4/process-recurring-payment ##################################### .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^^^^^ | If request is accepted with no errors, the Payment Gateway finds the recurring payment profile by the provided recurring-payment-id and initiates a new recurring transaction using the payment data saved in this profile. | Process recurring payment 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-payment_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-payment/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/process-recurring-payment/ENDPOINTID` .. _api_v4_process-recurring-payment_request_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded and :ref:`Authorization headers`. .. list-table:: :widths: 30, 50, 20 :header-rows: 1 :class: longtable * - 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-payment_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. * - :code:`status` - If request is accepted, this parameter has :code:`processing` value. This is not a transaction status. * - :code:`serial-number` - Unique number assigned by Payneteasy server to particular request from the Connecting Party. Request Example ^^^^^^^^^^^^^^^^^^^^ .. code-block:: none POST /paynet/api/v4/process-recurring-payment/ HTTP/1.1 User-Agent: curl/8.4.0 Accept: */* Authorization: OAuth oauth_consumer_key="ErwinTestMerchant", oauth_nonce="XGsxKTfd4uiaQKOSyXkHQwKxFqLCEKRz", oauth_signature="KX7KEjFUEJo8rLJ2PvusGDlu5cxqMm%2BU%2Bn%2F1KxH18QUeZ57QghfnXyiXKCxwAr76uxMk9X10QL8YI4kuEHVmxThIomtIZML3yRLESneHNqZzlwXvTSG5o%2B7DTSdAeNGZ40PIbF4XAUzwp%2FQbpYGWBS4Yk36%2BPQbziJlsFa21gRo7e03fizxPEIYi1algEqOT5uu%2F07Yci6NsSyGGMGo4vyDhqPMLuDcaTeO%2Fzr51RfRa4jh2bT4tUriZLVrjYP0AJeHGlZdosTkqEyVAz5Q5yD67xmjUGlW4luezOWdR70wrfQ8JZ7QuXzueAb9TqyZfi%2BvCD4MrhXG299ujWUUtZ%2F8qi09p%2F7GmBiFSud7wgMjPGOC%2BijBEFIpsfiBFzd6%2FX7MBLAdTpHXrExT2C71dJysde31isAMVuIIuvXogY7YE0ZttWY1oYqcWDNSWXsUx5pQTjbBf1vyJB3CqtAFVFi6LwckqsYTAXkxfp%2B2IgFFhadEvf35XzFPv%2FEjsTqRLJuPYBa85mK9vaY7WJRtX89TjSdEPulFnz1EEFg5KHe5WxVp9GFw2XqLneqBu%2FwGAGg3NXRumBMHK3E%2Bh96cVdU5b3AkqVjS2Q36jpQtAhUIIGYyT02n4W9avhw2cHCJzErqGjALHJjkFQD1bhDRKyTm1Fqeh%2BplDaPwDKjy5EHY%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1721316898", oauth_version="1.0" Content-Length: 407 Content-Type: application/x-www-form-urlencoded Connection: keep-alive recurring-payment-id=1492124 &amount=10 &client-orderid=1575634981130 Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: none HTTP/1.1 200 Server: server Date: Thu, 18 Jul 2024 15:35:46 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive Keep-Alive: timeout=60 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: 110 type=process-recurring-payment-response &serial-number=00000000-0000-0000-0000-000002f36d8d &status=processing Fail Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: none HTTP/1.1 500 Server: server Date: Thu, 18 Jul 2024 15:39:05 GMT Content-Length: 61 Connection: keep-alive Keep-Alive: timeout=60 X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [b2a06c5a-c770-4c01-b32c-e4fcb1da4cd6] Request Builder ^^^^^^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/examples/V4RecurProcess.html