.. _/api/v2/payout/form/: /api/v2/payout-form #################### .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^ Payout-form is initiated through :code:`HTTPS POST` request by using :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`OAuth HMAC-SHA1` for authentication. See :ref:`statuses`. .. _api_v2_payout_form_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/payout-form/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v2/payout-form/ENDPOINTID` * - :ex:`https://sandbox.payneteasy.com/paynet/api/v2/payout-form/group/ENDPOINTIDGROUPID` - :ex:`https://gate.payneteasy.com/paynet/api/v2/payout-form/group/ENDPOINTGROUPID` .. _api_v2_payout_form_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded and :ref:`Authorization headers`. | Ask support manager if conditional fields are required for integration. .. list-table:: :widths: 35, 50, 20 :header-rows: 1 :class: longtable * - Parameter Name - Description - Value * - :code:`client_orderid` - Connecting Party's order identifier. - | ``Necessity``: Required | ``Type``: String | ``Lenght``: 128 * - :code:`amount` - Amount to be charged. The amount has to be specified in the highest units with . delimiter. For instance, 10.5 for USD means 10 US Dollars and 50 Cents. - | ``Necessity``: Required | ``Type``: Numeric | ``Lenght``: 10 * - :code:`currency` - Currency the transaction is charged in (three-letter currency code). Sample values are: USD for US Dollar EUR for European Euro. - | ``Necessity``: Required | ``Type``: String | ``Length``: 3 * - :code:`order_desc` - Brief order description. - | ``Necessity``: Required | ``Type``: String | ``Length``: 65K * - :code:`ipaddress` - Receiver’s IP address (IPv4 or IPv6). - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 7-45 * - :code:`purpose` - Payout purpose. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`server_callback_url` - | URL, where the transaction status is sent to. Connecting Party may use server callback URL for custom processing of the transaction completion, e.g. to collect payment data in the Connecting Party’s information system. For the list of parameters which come along with server callback to :ex:`server_callback_url` refer to :ref:`Connecting Party callback parameters`. This parameter can be sent instead of :ex:`notify_url`. If :ex:`server_callback_url` is sent, Payment Gateway sends callback notification only when original transaction receives final status. If :ex:`notify_url` is sent, Payment Gateway sends callback notification once the original transaction receives final status, and about every future update for this original transaction (reversal, chargeback, etc). - | ``Necessity``: Optional | ``Type``: String | ``Length``: 1024 * - :code:`notify_url` - | URL, where the transaction status is sent to. Connecting Party may use notify URL for custom processing of the transaction completion, e.g. to collect payment data in the Connecting Party’s information system. For the list of parameters which come along with server callback to :ex:`notify_url` refer to :ref:`Connecting Party callback parameters`. This parameter can be sent instead of :ex:`server_callback_url`. If :ex:`notify_url` is sent, Payment Gateway sends callback notification once the original transaction receives final status, and about every future update for this original transaction (reversal, chargeback, etc). If :ex:`server_callback_url` is sent, Payment Gateway sends callback notification only when original transaction receives final status. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 1024 * - :code:`redirect_url` - | URL, where the Receiver is redirected to upon completion of the transaction. Please note that redirection is performed in any case, no matter whether transaction is :ex:`approved`, :ex:`declined` in any other final :ref:`status`. | Connecting Party must not use the parameters come along with the redirect HTTP Request to treat the status of the transaction. Instead Connecting Party can utilize :ex:`server_callback_url` or :ref:`status API command`. Pass :ex:`https://doc.payneteasy.com` if you have no need to return Receiver anywhere. Use either :ex:`redirect_url` or combination of :ex:`redirect_success_url` and :ex:`redirect_fail_url`, not both. - | ``Necessity``: Required if both redirect_success_url and redirect_fail_url are missing | ``Type``: String | ``Length``: 1024 * - :code:`redirect_success_url` - | URL, where the Receiver is redirected to when transaction status is :ex:`approved` (See :ref:`status list`). | Connecting Party must not use the parameters come along with the redirect HTTP Request to treat the status of the transaction. Instead Connecting Party can utilize :ex:`server_callback_url` or :ref:`status API command`. Otherwise put :ex:`https://doc.payneteasy.com` if there is no need to redirect Receiver anywhere. Use either combination of :ex:`redirect_success_url` and :ex:`redirect_fail_url` or :ex:`redirect_url`, not both. - | ``Necessity``: Required if :ex:`redirect_url` parameter is missing | ``Type``: String | ``Lenght``: 1024 * - :code:`redirect_fail_url` - | URL, where the Receiver is redirected to when transaction status is not :ex:`approved` (See :ref:`status list`). | Connecting Party must not use the parameters come along with the redirect HTTP Request to treat the status of the transaction. Instead Connecting Party can utilize :ex:`server_callback_url` or :ref:`status API command`. Pass :ex:`https://doc.payneteasy.com` if you use non-3DS schema for transactions processing and you have no need to return Receiver anywhere. Use either combination of :ex:`redirect_fail_url` and :ex:`redirect_success_url` or :ex:`redirect_url`, not both. - | ``Necessity``: Required if :ex:`redirect_url` parameter is missing | ``Type``: String | ``Length``: 1024 * - :code:`account_number` - Account number. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :code:`account_name` - Bank account. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 512 * - :code:`ewallet_wallet` - E-wallet ID. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`crypto_wallet_address` - Address of crypto wallet. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 64 * - :code:`bank_name` - Bank Name. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 512 * - :code:`bank_branch` - Bank Branch Name. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 512 * - :code:`bank_code` - Bank code. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :code:`bank_address1` - Bank address. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`bank_zip_code` - Bank postal ZIP code. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :code:`bank_province` - Bank province. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`bank_area` - Bank area. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`bank_city` - Bank city. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`routing_number` - Routing number used to identify specific bank branches in China. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :code:`legal_person_name` - Name on the legal document. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`legal_person_document_number` - Number of legal document. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_first_name` - Receiver first name, also can be sent as :code:`first_name`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_last_name` - Receiver last name, also can be sent as :code:`last_name`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_birthday` - Receiver birthday, also can be sent as :code:`birthday`. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 30 * - :code:`receiver_country_code` - Receiver country code, also can be sent as :code:`country`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 3 * - :code:`receiver_state` - Receiver state, should be provided for countries that have states (USA, Canada, Australia), also can be sent as :code:`state`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 4 * - :code:`receiver_city` - Receiver city, also can be sent as :code:`city`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_zip_code` - Receiver zip code, also can be sent as :code:`zip_code`. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 32 * - :code:`receiver_address1` - Receiver address, also can be sent as :code:`address1`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`receiver_phone` - Receiver phone, also can be sent as :code:`phone`. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 128 * - :code:`receiver_email` - Receiver E-mail, also can be sent as :code:`email`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_identity_document_id` - Receiver identity document identifier, also can be sent as :code:`identity_document_id`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`receiver_identity_document_number` - Receiver identity document number, also can be sent as :code:`identity_document_number`. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`merchant_data` - Any additional information for this transaction which may be useful in Connecting Party's external systems, e.g. :ex:`VIP customer`, :ex:`TV promo campaign lead`. Will be returned in Status response and Connecting Party's Callback. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 65k * - :code:`merchant_form_data` - Parameters sent in merchant_form_data API parameter are parsed into macros with the same name, the parameter is url-encoded, example: :ex:`testparam%3Dtest1%26mynewparam%3Dtest2` and is parsed into :ex:`$MFD_testparam = test1` and :ex:`$MFD_mynewparam = test2` macros in the form. Parameter name characters[a-zA-Z0-9], parameter value characters[a-zA-Z0-9], control characters [=&], 2MB max size. For example, this parameter can be used to display payment form in light/dark mode depending on the value passed by Connecting Party (e.g. pass :code:`merchant_form_data=theme%3Ddark` in request and :ex:`$MFD_theme` macro placeholder on payment form will be changed to :ex:`dark`. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 2M * - :code:`preferred_language` - Preferred language. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 2 Response Parameters ^^^^^^^^^^^^^^^^^^^ .. note:: | Response has a 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: 30, 70 :header-rows: 1 :class: longtable * - Parameter Name - Description * - :code:`type` - The type of response. May be :ex:`async-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:`paynet-order-id` - Order id assigned to the order by Payneteasy. * - :code:`merchant-order-id` - Connecting Party order id. * - :code:`serial-number` - Unique number assigned by Payneteasy server to particular request from the Connecting Party. * - :code:`error-message` - If status is :ex:`error` this parameter contains the reason for decline or error details. * - :code:`error-code` - The error code is case of :ex:`error` status. * - :code:`redirect_url` - The URL to the page where the Connecting Party should redirect the client's browser. Connecting Party should send :ex:`HTTP 302` redirect. Request Example ^^^^^^^^^^^^^^^ .. code-block:: guess POST /paynet/api/v2/payout-form/39529 HTTP/1.1 Host: sandbox.doc2.com User-Agent: curl/8.12.1 Accept: */* Authorization: OAuth realm="",oauth_version="1.0",oauth_consumer_key="merchantlogin",oauth_timestamp="1753337681",oauth_nonce="T5v7kcMBsgi",oauth_signature_method="HMAC-SHA1",oauth_signature="wTTQQiN%2F2bGjfCTcSAQ3ZhAHMLw%3D" Content-Length: 249 Content-Type: application/x-www-form-urlencoded Connection: keep-alive account_number=1234567890 &order_desc=Test_Order_Description &amount=100 &bank_branch=test_branch &bank_name=test_bank &client_orderid=12345 ¤cy=USD &oauth_consumer_key=merchantlogin &oauth_nonce=T5v7kcMBsgi &oauth_signature_method=HMAC-SHA1 &oauth_timestamp=1753337681 &oauth_version=1.0 Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Thu, 24 Jul 2025 06:45:56 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: 142 type=async-response &serial-number=00000000-0000-0000-0000-000002f3b45d &merchant-order-id=12345 &paynet-order-id=7366391 &end-point-id=132490 Fail Response Example ^^^^^^^^^^^^^^^^^^^^^ .. code-block:: guess HTTP/1.1 403 Server: server Date: Thu, 24 Jul 2025 06:26:23 GMT Content-Type: application/x-www-form-urlencoded;charset=UTF-8 Connection: keep-alive Keep-Alive: timeout=60 X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Length: 102 type=error &serial-number=00000000-0000-0000-0000-000002f3b456 &error-message=Forbidden &error-code=-1 Test Scenario ^^^^^^^^^^^^^ Different Payout transaction statuses can be received on sandbox, depending on the :code:`account_number` value passed in Payout request. Testing :ex:`account_number` values: * :ex:`account_number` = 1234567890 to get APPROVED * :ex:`account_number` = 0987654321 to get DECLINED * :ex:`account_number` = 1987654321 to get PROCESSOR_INTERNAL_ERROR Postman Collection ^^^^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/Postman/Postman_payout_form.html Request Builder ^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/examples/payout_Debug.html