Checking the status of the SBP payment
To check, you need to send a request to https://api.1payment.com/status_payment
With the following parameters:
partner_id
- 1234 (Partner ID)order_id
- 8p3brmb19gfg0sg8gcwhws8kgc748s87 (payment id received during initiation)user_data
- 12345 (payment id on the partner's side, used if theorder_id
parameter is not specified)sign
- (sign)
Example:
https://api.1payment.com/status_payment?partner_id=1234&order_id
=8p3brmb19gfg0sg8gcwhws8kgc748s87&sign=d724e1e6453a43397bb2aa6d6be9cc06
sign
(sign)
is calculated as follows: md5 from the string "status_payment + concatenation of all
parameters = value in alphabetical order in ascending order with separator
& + API Key" (except for the parameter sing)
For the query above, the string from which the md5 will be taken, is of the following form:
status_paymentorder_id
=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234[API_Key]
The system will respond with JSON, Where:
payment_type
- sbp, payment type (see payment types)project_id
- Project IDorder_id
- Payment ID from the requestuser_data
- id passed when creating the paymentstatus
- payment status (2 - waiting for payment confirmation, 3 - Successful payment, 4 - payment refusal)status_description
- status text description (PENDING, SUCCESS, FAILURE, respectively)init_time
- payment creation timestatus_time
- time of statusmerchant_price
- payment amountuser_price
- partner contributionscurrency
- payment currency (three-letter code ISO 4217 )account
- sbpstatus_code
- the field will contain an error code (if possible) if the payment is refused