After receiving a payment from a client or if it is impossible to make a payment, {{project}} calls the Result URL of the store and sends information about the payment result to it using the Request Method method
Upon receipt of this request, the merchant must take the necessary actions to transfer the goods or services to the buyer, if the payment was successful. If pg_can_reject is equal to 1 and the merchant cannot accept the payment (for example, the ticket reservation has expired), it must respond with a rejected status, and {{project}} will reject the payment. In this case, the pg_description field from the merchant response is shown to the user as the reason for the refusal
Result URL on the merchant side must be public, without authorization.
If the merchant's server is not available at the time the Result URL is called, or if the response from the server was not 200, {{project}} will make repeated attempts to call it every half an hour for 2 hours, even if the pg_lifetime account expires
If the first attempt to call Result URL is unsuccessful, then the payment is not canceled, and in subsequent calls Result URL does not allow the merchant to refuse the payment
The store must be prepared for the Result URL to be called repeatedly for the same payment
Retry responses must match the original response, even if the pg_lifetime transaction has expired
Merchant response to result_url:
ok - payment accepted
rejected - payment refusal if pg_can_reject is equal to 1
error - error in data interpretation
The rejected status can be returned by the merchant only if the pg_can_reject parameter equal to 1 was specified in the incoming request from the gate, otherwise, regardless of the merchant's response, the payment will be considered completed
If the merchant refused the payment (rejected answered), the buyer is redirected to Failure URL, otherwise - to Success URL
Request
Body Params multipart/form-data
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location-g--request POST '{{result_url}}' \
--form'pg_order_id="123456789"' \
--form'pg_payment_id="12345"' \
--form'pg_amount="500"' \
--form'pg_currency="KZT"' \
--form'pg_net_amount="482.5"' \
--form'pg_ps_amount="500"' \
--form'pg_ps_full_amount="500"' \
--form'pg_ps_currency="KZT"' \
--form'pg_description="Purchase in the online store Site.kz"' \
--form'pg_result="1"' \
--form'pg_payment_date="2019-01-01 12:00:00"' \
--form'pg_can_reject="1"' \
--form'pg_user_phone="7077777777777"' \
--form'pg_user_contact_email="mail@customer.kz"' \
--form'pg_testing_mode="1"' \
--form'pg_captured="0"' \
--form'pg_card_id="1234"' \
--form'pg_card_token="ef741cfc-f85e-41a0-84e6-2ba964912182"' \
--form'pg_card_pan="5483-18XX-XXXX-0293"' \
--form'Merchant parameters="";type=* All fields passed from the merchant's website that do not have the pg_ prefix.' \
--form 'pg_discount_percent="1.0"' \
--form 'pg_discount_amount="5"' \
--form 'pg_payment_method="bankcard"' \
--form 'pg_card_exp="03/23"' \
--form 'pg_card_owner="Ivan Ivanov"' \
--form 'pg_card_brand="VI"' \
--form 'pg_salt="some random string"' \
--form 'pg_sig=""'