.. _/api/v4/payout/: /api/v4/payout ############################## .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^^^^^^^^^^^^^ Payout is initiated through :code:`HTTPS POST` request by using :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`RSA-SHA256` for authentication. .. _payout/apis: 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/ENDPOINTID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/payout/ENDPOINTID` * - :ex:`https://sandbox.payneteasy.com/paynet/api/v4/payout/group/ENDPOINTGROUPID` - :ex:`https://gate.payneteasy.com/paynet/api/v4/payout/group/ENDPOINTGROUPID` .. _payout_parameters: Request Parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: | Request must have content-type=application/x-www-form-urlencoded and :ref:`Authorization headers`. .. 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 | ``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:`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:`credit_card_number` - Customer's credit card number. **Note: For the scenario of payment to a card inside the system, this card will be considered as a source, and all processing limits, lists and fraud scoring will be applied to it as a source card.** - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 20 * - :code:`card_printed_name` - Customer's full name, as printed on the card. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 128 * - :code:`expire_month` - Credit card expiration month. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 2 * - :code:`expire_year` - Credit card expiration year. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 4 * - :code:`cvv2` - Receiver's CVV2 code. CVV2 (Card Verification Value) is a three- or four-digit number AFTER the credit card number in the signature area of the card. - | ``Necessity``: Conditional | ``Type``: Numeric | ``Length``: 3-4 * - :code:`account_number` - Account Number. - | ``Necessity``: Conditional | ``Type``: String | ``Length``: 32 * - :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_middle_name` - Receiver middle name, also can be sent as :code:`middle_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_recurring_payment_id` - Payer’s tokenized cardholder's data ID, referred as Recurring Payment ID (RPI). Send either :code:`card_recurring_payment_id` or combination of :code:`credit_card_number`, :code:`card_printed_name`, :code:`expire_month` and :code:`expire_year`, not all. To create :code:`card_recurring_payment_id` see :ref:`api-v4-card-ref-id`. **Note: For the scenario of payment to a card inside the system, this card will be considered as a source, and all processing limits, lists and fraud scoring will be applied to it as a source card.** - | ``Necessity``: Conditional | ``Type``: Long * - :code:`recurring-payment-id` - Recurring Payment ID can be sent instead of cardholder data. Customer Data can be updated via :ref:`/api/v4/update-recurring-payment/`. Recurring Payment ID creation is initiated through :code:`HTTPS POST` request by using :ref:`URLs` and the :ref:`parameters` specified below. Use :ref:`RSA-SHA256` for authentication. - | ``Necessity``: Conditional | ``Type``: Long \* Ask Support Manager if Conditional fields are Required for integration. 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 Response 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/39915 HTTP/1.1 Host: sandbox.payneteasy.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="b5E31Tw6SVjauE29uOf2jOLnuUSXmVdE", oauth_signature="WrW79JHNUVwDRhCGWQYgaN6xmJXpQxy8XSNyCOL6b2Wyf7V5BWGMe2TZa1bjC9ZeO0Q3FcQxeGGHv0%2F7hsMAsJNQEET321VNsbDwao2Ep%2Bp7eoYiGYrVveSrSW1diCrBf3AJYJZM0PTJ67Sl8XyeTVBHT4kpC5qBu3xDQ3aFfKnmRTmn9fiVsYsYu3DQrsHM1K9uAoltGt3Muz0kCDZ3MWNGrNqtdpWuar8HRQD3kckcPjuN9D6VrSuQm9eLx27G%2FvkiP%2BZ44i8ghIUp61NWSrJ4Ky69JiZ%2FoaVVmUTEaanc%2F%2B%2BQT6jBwWy%2Bb%2FTLUrxtSakeNfcjn1JVwRf4aCX2fhyG5ozH%2BjiXF6eRb83WVqBUAwykSq35pLU3Vmua3pKMKAJK1ZRDZdjGrT50KJg5tBniC4JFzdQqjQf%2FhFnDYodfIK3S2qZo%2FD3Bmlya46iEcK6SAQdNBBQue3E5Qi8FEHYrY1o7K8wDyzT1QzqqHF%2BQdmXcElSGu9ge0Y655%2BbGtXhnsUWnKEO0NGqErvAwzm7yUg0e5QWHVf505aE7pr5K4z%2Fzj7AvkuD7R1savqam%2BnnuSfq1E%2BnnnN7mTcC0g18Sr38vdTshcGq99YW3xWKc%2FpuooZYdYa5A6u46o%2BREZSTCD2XexcV49%2F9eVn3xdoTXYq4NISJSY8U7ThKnr0g%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1677831012", oauth_version="1.0" Content-Length: 150 Content-Type: application/x-www-form-urlencoded Connection: close account_name=1234 &account_number=1234 &amount=10.42 &client_orderid=1 ¤cy=USD &routing_number=15 &server_callback_url=https%3A%2F%2Fhttpstat.us%2F200 Success Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: javascript HTTP/1.1 200 Server: server Date: Fri, 03 Mar 2023 08:10:34 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: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002e2c322 &merchant-order-id=1 &paynet-order-id=6982864 &end-point-id=39915 Fail Response Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: guess HTTP/1.1 403 Forbidden Server: server Date: Thu, 25 Aug 2022 06:50:16 GMT Content-Type: text/html Content-Length: 735 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 403

Access is denied

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.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_Debug.html