Order Request
By calling this method an Online Shop sends the payments details, technical parameters, and a payment amount to an Installment Loan Server. To proceed further in case of the successful operation, a customer should be redirected to an Online Payment Webpage as per a REDIRECT
URL returned in a links
parameter
Header
Content-Typerequiredapplication/json
AuthorizationrequiredBearer <jwt_token>
Bearer <jwt_token>
, where the jwt_token is a value returned in an access_token parameter from the Authentication Method Response
Body
intentrequiredstring
defines which payment method is used by the customer for payment. When using the Installment Loan Integration LOAN
value should be always passed in this element
installment_monthrequiredstring
An installment loan duration in months selected by the customer. To receive the installment loan duration in months and type you should use a loan calculator service
installment_typerequiredstring
An installment loan type selected by the customer
shop_order_idrequiredstring
A Payment Identifier from an Online Shop system (i.e.: An ID of a shopping Basket).
success_redirect_urlrequiredstring
An address (URL) of a webpage of the Online Shop to which a customer will be redirected on the successful activation of the installment loan. After the activation of the installment loan, a callback is sent to a Merchant which should return a 200
HTTP code and upon receiving this code a customer will be redirected to the success_redirect_url. A customer will be redirected to the reject_redirect_url
if the Merchant returns a code other than 200 HTTP as a response on a callback. In this case, the status will remain ‘success’ and Merchant should call an Installment Loan Details Service to retrieve an updated status
fail_redirect_urlrequiredstring
An address (URL) of a webpage of the Online Shop to which a customer will be redirected if the activation of the installment loan fails
reject_redirect_urlrequiredstring
An address (URL) of a webpage of the Online Shop to which a customer will be redirected in case of a failure other than the activation of the installment loan or if Merchant returns a code other than 200 HTTP as a response on a callback, or if a callback has a timeout response
validate_itemsoptionalboolean
Based on this parameter a total amount of the products cost from the cart is compared to a total amount of an order. Value if omitted: true
true
a total amount of the products cost from the cart will be compared to a total amount of an order and an error will occur in case of differencefalse
a total amount of the products cost from the cart will not be compared to a total amount of an order, but the cost of each product from the cart should be greater than 0
localeoptionalka
defines the language of the Online Installment Loan Webpage on which a customer will be redirected. At the moment it may have only a ka
– Georgian value
purchase_unitsrequiredarray
contains information about the Installment Loan Amount and currency
amountrequiredobject
currency_coderequiredstring
valuerequirednumber
cart_itemsrequiredarray
A list of the products purchased in the Online Shop within the given payment which contain a following attributes
total_item_amountrequiredstring
item_descriptionrequiredstring
total_item_qtyrequirednumber
item_vendor_coderequiredstring
product_image_urloptionalstring
item_site_detail_urloptionalstring
- REQUEST
POST /v1/installment/checkout HTTP/1.1
Content-Type: application/json
Authorization: Bearer <jwt_token>
{
"intent": "LOAN",
"installment_month": 6,
"installment_type": "STANDARD",
"shop_order_id": "123456",
"success_redirect_url": "https://demo.ipay.ge/success",
"fail_redirect_url": "https://demo.ipay.ge/fail",
"reject_redirect_url": "https://demo.ipay.ge/reject",
"validate_items": true,
"locale": "ka",
"purchase_units": [
{
"amount": {
"currency_code": "GEL",
"value": "500.00"
}
}
],
"cart_items": [
{
"total_item_amount": "10.50",
"item_description": "test_product",
"total_item_qty": "1",
"item_vendor_code": "123456",
"product_image_url": "https://example.com/product.jpg",
"item_site_detail_url": "https://example.com/product"
}
]
}
Response
statusstring
linksarray
URLs that are used on the further steps of the installment loan process.
Currently, the links
parameter may return one of these two resources:
- An installment loan details URL allows retrieving information regarding the installment loan (the ‘rel’ parameter of this resource has a value ‘self’)
- A URL on which a customer should be redirected to enter the credentials of the online banking and finalize the installment loan process (the ‘rel’ parameter of this resource has a value ‘target’)
hrefstring
relstring
methodstring
order_idstring
- RESPONSE
{
"status": "CREATED",
"links": [
{
"href": "https://installment-test.bog.ge/v1/installment/checkout/{order_id}",
"rel": "self",
"method": "GET"
},
{
"href": "https://installment-test.bog.ge/?order_id={order_id}&locale=ka",
"rel": "target",
"method": "REDIRECT"
}
],
"order_id": "{order_id}"
}