Select Installment Option for Masterpass REST
Sets the selected installment option for the Masterpass REST flow.
Required Fields:
installment: Primary key (pk) of theInstallmentrecord to apply. The PK must reference an active installment linked to the card resolved inMasterpassRestBinNumberPage.
Validation:
installmentmust be the PK of an activeInstallmentbelonging to the card inpre_order.card_info. Submitting a PK outside of that set returns a validation error.
State Update:
pre_order.installmentis set to the resolvedInstallment.pre_order.selected_campaignandpre_order.selected_rewardsare reset tonull(inherited fromInstallmentSelectionPage).pre_order.payment_choiceis reset tonull.
Backward Navigation:
On backward navigation,
pre_order.installmentis reset tonull.
Next Pages:
MasterpassRestOrderNoPage
available_for_post_order: true
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Primary key (pk) of the Installment record to select. The PK
must reference an active installment linked to the card resolved
in MasterpassRestBinNumberPage.
2Installment selected successfully
POST /orders/checkout/?page=MasterpassRestInstallmentPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 17
"installment=1"Installment selected successfully
{
"context_list": [
{
"page_name": "MasterpassRestOrderNoPage",
"page_slug": "masterpassrestordernopage",
"page_context": {}
}
],
"pre_order": {
"payment_option": {
"pk": 7,
"slug": "masterpass-rest",
"payment_type": "masterpass_rest"
},
"installment": {
"pk": 2,
"installment_count": 3,
"label": "3 Installments",
"price_with_accrued_interest": "165.59",
"monthly_price_with_accrued_interest": "55.20"
},
"total_amount": "165.59",
"total_amount_with_interest": "165.59",
"currency_type_label": "TRY"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

