Callback
Unlike the previous methods which are called by the Online Shop, Callback
is called by an Online Installment loan System, while the information should be received and processed on an Online Shop side. This method gives a possibility to receive real-time information about the status change.
Callback URLs are assigned to each Online Shop when the latter is registered as a Merchant in a Bank system. Two kinds of Callback
URLs can be assigned in a Payment System to a Merchant:
After that each time when the Payment Status is changed, the Payment Details are sent via POST method on a Callback URL.
To confirm the successful receiving of a Callback method response, a Merchant should return an HTTP CODE 200. In case of the unsuccessful result of sending via POST method of the Callback, the method is called again with 15-second intervals until the number of attempts reaches 5 or Merchant returns an HTTP CODE 200 status. In case the Callback could not be successfully called (on a timeout or if Merchant responded with a code other than 200 HTTP code), a customer will be redirected to the reject_redirect_url and a callback is not sent anymore. In this case, the merchant should call an Installment Loan Details method to receive the status of the installment loan.
If you already use an Online Payment, the URL of the Installment Loan Callback will be the same as in the case of Online Payment, however, the parameters will be different.
Body:
statusstring
An installment loan status. Can take the following values:
- success – An installment loan process has been completed successfully.
- error - An installment loan process has been completed un-successfully
order_idstring
An order identifier that is returned to the Online Shop in the response of the Order request method.
shop_order_idstring
A Merchant’s payment identifier.
payment_methodstring
A payment method. In the case of the installment loan, the BOG_LOAN
value is always returned.
- REQUEST
POST / An URL assigned to an Online Shop when registered as a Merchant in a Bank system
Content-Type: application/x-www-form-urlencoded
{
"status": "success" | "error",
"order_id": "{order_id}",
"shop_order_id": "{shop_order_id}",
"payment_method": "BOG_LOAN"
}
Response
Http_Statusstring
- RESPONSE
{
"Http_Status":"200 OK"
}
Installment Loan Status Change callback
- RESPONSE
Content-Type: application/x-www-form-urlencoded
Request Method: POST
status: success | error
order_id: string
shop_order_id: string
payment_method: BOG_LOAN | UNKNOWN
Installment Loan Cancelation callback
- RESPONSE
Content-Type: application/x-www-form-urlencoded
Request Method: POST
status: reverse_success
order_id: string
shop_order_id: string
payment_method: BOG_LOAN