.. _/api/v4/payout-by-ref/: /api/v4/payout-by-ref/ ################################## .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^^^^^^^^^^^^^^^ Payout By Reference is initiated through :code:`HTTPS POST` request by using :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`RSA-SHA256` for authentication. .. _payout-by-ref_api: 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/payout-by-ref/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/payout-by-ref/ENDPOINTID` * - :ex:`https://sandbox.payneteasy.com/paynet/api/v4/payout-by-ref/group/ENDPOINTGROUPID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/payout-by-ref/group/ENDPOINTGROUPID` .. _payout-by-ref_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded and :ref:`Authorization headers`. .. note:: | Ask Support Manager if Conditional fields are Required for integration. .. list-table:: :widths: 25, 45, 25 :header-rows: 1 :class: longtable * - Parameter Name - Description - Value * - :code:`client_orderid` - Connecting Party's order identifier. - | ``Necessity``: Required | ``Type``: String | ``Length``: 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 | ``Length``: 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:`destination-card-ref-id` - Card reference id to destination card, obtained at Card Registration step. For the scenario of payment to a card inside the system, this card will be considered as a destination, and all processing limits, lists and fraud scoring will be applied to it as a destination card. - | ``Necessity``: Required | ``Type``: Numeric | ``Length``: 20 * - :code:`order_desc` - Brief order description. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 64 * - :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``: 128 * - :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``: 128 * - :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``: Optional | ``Type``: String | ``Length``: 128 * - :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``: Optional | ``Type``: String | ``Length``: 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 there is no need to redirect Receiver anywhere. Use either combination of :ex:`redirect_fail_url` and :ex:`redirect_success_url` or :ex:`redirect_url`, not both. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 1024 * - :code:`account_number` - Account Number. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 24 * - :code:`account_name` - Bank account. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 128 * - :code:`ewallet_type` - Type of e-wallet. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 64 * - :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``: 255 * - :code:`bank_branch` - Bank Branch Name. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`bank_code` - Bank code. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :code:`bank_city` - Bank city. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`bank_address1` - Bank address. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`bank_zip_code` - Bank postal ZIP code. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`bank_province` - Bank province. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`bank_area` - Bank area. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 255 * - :code:`routing_number` - Routing number used to identify specific bank branches in China. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 16 * - :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``: 256 * - :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 Callback. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 64k * - :code:`bank_bic` - BIC of the receiver’s bank. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 128 * - :code:`receiver_inn` - Receiver’s INN. - | ``Necessity``: Optional | ``Type``: String | ``Length``: 128 * - :code:`customer_level` - Customer level in CMS system - | ``Necessity``: Optional | ``Type``: Varchar | ``Length``: 32 * - :code:`customer_id` - Customer ID in CMS system. Required if transaction goes via CMS (Payment Gateway mode) - | ``Necessity``: Optional | ``Type``: Int | ``Length``: 10 * - :code:`merchant_customer_identifier` - Merchant Customer ID in CMS system. Required if transaction goes via CMS (CRM mode) - | ``Necessity``: Optional | ``Type``: Varchar | ``Length``: 64 * - :code:`card-ref-id` - Card reference ID used in subsequent recurring payments. Card reference ID can be created with :ref:`v4 tokenization request` or :ref:`v2 tokenization request`. - | ``Necessity``: Conditional | ``Type``: Long 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: 30, 70 :header-rows: 1 :class: longtable * - Payout Request Parameters - 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. Request Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: guess POST /paynet/api/v4/payout-by-ref/121799 HTTP/1.1 Host: sandbox.payneteasy.com User-Agent: curl/8.4.0 Accept: */* Authorization: OAuth oauth_consumer_key="ErwinTestMerchant", oauth_nonce="8qsDrhiDelGHlxY01aDjCh44u7isXJjL", oauth_signature="WpbNcRxNSDW%2BdJgftRc%2BAN0oe8KAP4CNpUkxjxStFYZEU9Vo%2F7uk9dSKEG%2B76C%2FdlzemILaRmikQqZg93ZK1cibT8zy97uYVDdWVmY2obDSOVb8UipGjt2KFUyKr4awHW9xH%2BTzbR%2FMXwm3y%2Fx2RotElZWxumsL37P5Q%2BCquoAGcO6jjkvkkSH9P4lBYKSmwhfqD4O%2Br8FB3exzNzl2FFBTwLp4ch2G9Cis5a0CkVrpjDB%2FbbbrOutbNPZYhtH45rNz91QAbpvNJ91XjVwxiCm4lCldIO66gF73GQNSFKVG1mstc%2B941Dj1bVhXWQQW%2F9TyPiXfWGP8szg18rwsTHbj1zKCRIaw%2FqVbrOBPhbo%2BJjGMZp2hB1ei0%2FUPIkjeIZkWD2NgJRQEniJfjU7AlILs91augm50fPwWR5JiOuE5uSvwM6VWgXMpYe4USb819ZAK%2BFYTRI%2BenrycFZHmY%2BafOlaOHFtpnbn8FsrzzNbOvGXmXCt2xXAQTaORqMeLRRtkD3DY4rJa8qeO0zYnmT4ZhKsFZjImDdonA3WTG8G7awP9W0RKhHlUGwGaugRWbdPjSbGMhAzs58Y9ptvExr6GwAHhJU1RbzfWL4wCzVbH8%2BAC6I0OrkB13tw2eXP4yIPtEC7iGu%2FkElGz4OrwFEU6cUcEDpeEOmA2%2Fe%2BZFK0w%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1721975900", oauth_version="1.0" Content-Length: 74 Content-Type: application/x-www-form-urlencoded Connection: keep-alive amount=10.42 &client_orderid=1 ¤cy=USD &destination-card-ref-id=1461897 Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Fri, 26 Jul 2024 06:39:23 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: 138 type=async-response &serial-number=00000000-0000-0000-0000-000002f36e41 &merchant-order-id=1 &paynet-order-id=7363634 &end-point-id=121799 Fail Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Fri, 26 Jul 2024 06:42:43 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: 170 type=validation-error &serial-number=00000000-0000-0000-0000-000002f36e42 &error-message=Project+with+currency+USD+does+not+apply+request+with+currency+AZN &error-code=16 Postman Collection ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. raw:: html :file: ../_static/Postman/Postman_payout.html Request Builder ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Insert PKCS#1 PEM private key for sandbox environment in the field below. Request builder supports up to 4096 key length. .. raw:: html :file: ../_static/examples/V4Payout-by-ref_Debug.html