Skip to main content

Independent Pages

This document covers all services for independent pages, including the requests and responses associated with these services.

Order Note Page

This page is used to add notes for orders.

POST Order-Note-Page

Path: https://{commerce_url}/orders/checkout/?page=OrderNotePage

Example Request

In order to add notes to the order, the "notes" field needs to be included in the request. This field should contain the specific note that user want to add to the order.

{
"notes": "my order note is..."
}

Example Response

The notes are added to the pre_order field in the response that is returned after the request is sent.

{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order":
{
"notes": "my order note is..."
}
}

Gift Box Index Page

This page is called before the Gift Box Page to check the validity of the settings. After performing the necessary checks, it recommends the Gift Box Page as the next page.

POST Gift-Box-Index-Page

Path: https://{commerce_url}/orders/checkout/?page=GiftBoxIndexPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

In the context list, the next step is returned as the GiftBoxPage.

{
"context_list": [
{
"page_context": {
"price": "10.90"
},
"page_name": "GiftBoxPage",
"page_slug": "giftboxpage"
}
],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {}
}

Gift Box Page

The gift box field is added to the preorder, and it specifies whether there are options available to add to the gift box.

POST Gift-Box-Page

Path: https://{commerce_url}/orders/checkout/?page=GiftBoxPage

Example Request

Fields such as note, gift_video, and gift_video_notification_sent are included in the request to determine the specifications of the gift box.

{
"note": "it's my note",
"gift_video": False,
"gift_video_notification_sent" False,
}

Example Response

The sent fields (note, gift_video, gift_video_notification_sent) are added to the gift_box field in the pre_order.

{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"gift_box": {
"note": "it's my note.",
"gift_video": false,
"gift_video_notification_sent": false,
"price": "10.90"
}
}
}

Delivery Bags Page

The delivery bags products are calculated and added to the preorder.

POST Delivery-Bags-Page

Path: https://{commerce_url}/orders/checkout/?page=DeliveryBagsPage

Example Request

To perform the operation for a specific product, it is necessary to include the product SKU field in the request. This allows for identification of the product for which the operation will be performed.

{
"product": "product.sku"
}

Example Response

The bags_fee and bags information are returned in the pre_order.


{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"bags_fee": ""
"bags": [
{
"pk": 3803,
"name": "Antoınette Tatlı Bıçağı",
"sku": "1KBICK0009",
"base_code": "1KBICK0009",
"attributes": {
},
"attribute_set": 7,
"attributes_kwargs": {},
"extra_attributes": {},
"productimage_set": [],
"price": "10.90",
"in_stock": false,
"currency_type": "try",
"retail_price": "27.25",
"unit_type": null,
"absolute_url": "/product/3803/",
"productvideo_set": [],
"product_type": "1",
"price_type": "default",
"form_schema": null,
"is_ready_to_basket": false,
"stock": null,
"data_source": null
},
]
}
}

Reward List Page

Queries the available rewards can be used by retrieving the credit card information.

POST Reward-List-Page

Path: https://{commerce_url}/orders/checkout/?page=RewardListPage

Example Request

To list the rewards, provide the card information (card_number, card_year, card_month, card_cvv).

{
"card_number": "",
"card_year": "",
"card_month": "",
"card_cvv": ""
}

Example Response

The reward information that is compatible with the provided card information is returned in the page_context, and the next page will be the RewardSelectionPage where points can be selected.

{
"context_list":[
{
"page_context":{
"rewards":[
{
"amount":"1234.00",
"type":"general"
}
]
},
"page_name":"RewardSelectionPage",
"page_slug":"rewardselectionpage"
}
],
"template_name":"orders/checkout.html",
"errors":null,
"pre_order":{
"rewards": []
}
}

Reward Selection Page

When a POST request is sent to this page, the card and bank compatible rewards are used.

POST Reward-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=RewardSelectionPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

The reward to be used is selected and added to the selected_rewards and pre_order fields.

{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"selected_rewards": "",
}
}

Coupon Selection Page

This method is used to add or remove coupons from the pre-order.

POST Coupon-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=CouponSelectionPage

Example Request

To add or remove coupons from the pre-order, users need to specify the coupon name and the action to be applied. For example, to add a coupon named "A", user would use the action of adding. Similarly, to remove a coupon named "B", you would use the action of removing.

{
"coupon": "coupon-name",
"action": "add"
}

Example Response

Following the applied process, the list of coupons is added to the pre_order, and the coupons are checked from this list.

{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"coupons": ["coupon-name"]
}
}

Order Selection Page

By adding an extra_field in the order, users can utilize its benefits.

POST Order-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=OrderSelectionPage

Example Request

The schema and other relevant details (data_type, key, etc.) must be sent in the extra_field.

{
"extra_field": {
"key": "extra_field",
"label": "Extra Field",
"data_type": "nested",
"schema": {
"foo": {
"key": "foo",
"label": "Foo",
"required": True,
"data_type": "text"
}
}
}
}

Example Response

The provided information is added to the pre_order along with the specified extra_field name.

{
"context_list": [],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"extra_field" :'{ "key": "extra_field", "label": "Extra Field", "data_type": "nested", "schema": { "foo": { \n"key": "foo", "label": "Foo", "required": True, "data_type": "text" } } }\n'
}
}

Campaign List Page

Queries the campaigns suitable for credit cards.

POST Campaign-List-Page

Path: https://{commerce_url}/orders/checkout/?page=CampaignListPage

Example Request

To list the campaigns that are suitable for a specific credit card, card_number must be sent in the request.

{
"card_number": ""
}

Example Response

Inside the page_context, a list of campaigns is returned, and the next page targeted is the CampaignSelectionPage.

{
"context_list": [
{
"page_context": {
"campaigns": []
}
"page_name": "CampaignSelectionPage",
"page_slug": "campaignselectionpage"
}
],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {}
}

Campaign Selection Page

This page adds the selected campaign to the preorder.

POST Campaign-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=CampaignSelectionPage

Example Request

One of the rotating campaigns from the CampaignListPage should be selected and included in the request.

{
"campaign": ""
}

Example Response

In the response, the campaign that was sent in the request as the selected_campaign is added to the pre_order.

{
"context_list": []
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"selected_campaign": ""
}
}

Address Clear Page

Clears the address information written on the preorder.

POST Address-Clear-Page

Path: https://{commerce_url}/orders/checkout/?page=AddressClearPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

The address information in the pre_order is cleared, and the next page directed is the AddressSelectionPage.

{
"context_list": [
"page_context": {
"addresses": [],
"country": {}
}
"page_name": "AddressSelectionPage",
"page_slug": "addressselectionpage"
]
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
...
}
}

Checkout Provider Index Page

The list of providers that can be used is returned.

POST Checkout-Provider-Index-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderIndexPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

The list of checkout_providers is returned in the page_context, and the CheckoutProviderSelectionPage is called to enable the selection of a checkout from this list.

{
"context_list": [
{
"page_context": {
"checkout_providers": [
{
"pk": 1,
"name": "Akifast",
"slug": "akifast"
}
]
},
"page_name": "CheckoutProviderSelectionPage",
"page_slug": "checkoutproviderselectionpage"
}
],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"checkout_provider_process_started": True
}
}

Checkout Provider Selection Page

The customer is given the option to choose which checkout provider to use on this page.

POST Checkout-Provider-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderSelectionPage

Example Request

The ID of one of the providers returned for the CheckoutProviderIndexPage is selected and included in the request with the checkout_provider field.

{
"checkout_provider": "provider.id"
}

Example Response

The redirect_url is returned in the page_context, and this URL is saved in the pre_order as remote_redirect_url.

{
"context_list": [
{
"page_context": {
"redirect_url": "https://sandbox.akifast.com/api/v1/hpp?session_token=10dedd46-9f3d-4273-8220-d0f51975ca1c&transaction_token=uDV2wuZCBKOxvbBPSGyS%2F8qPbRZgyVcuDLVGU43%2B3vYrS7kXzlkkakdKTMrZ2VpWwPpIO0oHlEeQkIbZWw7I3g%3D%3D"
},
"page_name": "CheckoutProviderAddressSelectionPage",
"page_slug": "checkoutprovideraddressselectionpage"
}
],
"template_name": "orders/checkout.html",
"errors": null,
"pre_order": {
"remote_redirect_url": "https://sandbox.akifast.com/api/v1/hpp?session_token=10dedd46-9f3d-4273-8220-d0f51975ca1c&transaction_token=uDV2wuZCBKOxvbBPSGyS%2F8qPbRZgyVcuDLVGU43%2B3vYrS7kXzlkkakdKTMrZ2VpWwPpIO0oHlEeQkIbZWw7I3g%3D%3D",
}
}

Checkout Provider Address Selection Page

This is the page where the user selects the address in Akifast.

POST Checkout-Provider-Address-Selection-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderAddressSelectionPage

Example Request

The billing_address, shipping_address, session_token, and basket_id fields should be sent based on the selected address.

{
"billing_address": "{
...
}",
"shipping_address": "{
...
}",
"session_token": "token",
"basket_id": "basket.id"
}

Example Response

A new redirect_url is returned in the page_context as the response.

{
"context_list": [
"page_slug": "checkoutprovideraddressselectionpage",
"page_name": "CheckoutProviderAddressSelectionPage",
"page_context": {
"redirect_url": "",
}
]
}

Checkout Provider Shipping Option Page

The available shipping companies are listed when the user selects an address in Akifast.

POST Checkout-Provider-Shipping-Option-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderShippingOptionPage

Example Request

The request should include the basket_id, conversation_id, and language fields in order to list the available shipping companies.

{
"basket_id": "basket.id",
"conversation_id": "conversation.id",
"language": "",
}

Example Response

The shipping_options response is returned with the shipping_options list in the page_context.


{
"context_list": [
{ "page_context":
{
"shipping_options": {
...
},
}

Checkout Provider Agreement List Page

The page displays contract titles.

POST Checkout-Provider-Agreement-List-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderAgreementListPage

Example Request

The previously sent information (basket_id, session_token, shipping_option_key, shipping_address, billing_address) needs to be sent again on this page. Additionally, include the fields code and user in this information.

{
"basket_id": "basket.id",
"session_token": "token",
"shipping_option_key": "shipping.pk",
"shipping_address": {
...
},
"billing_address": {
...
},
"user": {
...
},
"code": ""
}

Example Response

In the response, the agreements field is returned within the page_context.

{
"context_list": [
{ "page_context":
{
"agreements": {
...
}
}
}
]
}

Checkout Provider Notification Page

The page is sent to the shop side for order creation after the payment is received on the Akifast side. The request includes all the necessary information for order creation.

POST Checkout-Provider-Notification-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderNotificationPage

Example Request

To complete a post-negotiation transaction, send the following fields in the request: agreements, conversation_id, payment_info, transaction, card_info, shipping_address, akifast_user, and is_successful.

{
"agreements": True,
"conversation_id": "",
"payment_info": {},
"transaction": {},
"card_info": {},
"shipping_address": {},
"billing_address": {},
"akifast_user": {},
"is_successful": True
}

Example Response

After sending the required information, the page_context returns the following fields: code, text, and agreement_body.

{
"context_list": [
{ "page_context":
{
"code": "",
"text": "",
"agreement_body": ""
}
}]
}

Checkout Provider Thank You Page

After the order is created, a return_url is generated within the Akifast application. This URL serves as a dynamic address for the thank you page, indicating that your order has been successfully approved.

POST Checkout-Provider-Thank-You-Page

Path: https://{commerce_url}/orders/checkout/?page=CheckoutProviderThankYouPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

The page_context returns the return_url, and the user is redirected to that URL.


{
"context_list": [
{ "page_context":
{
"return_url": "https://...",
}

Thank You Page

The thank you page is shown to the user after the order is completed.

GET Thank-You-Page

Path: https://{commerce_url}/orders/checkout/?page=ThankYouPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

In the response, a redirect_url is returned which redirects the user to the ThankYouPage.


{
"context_list": [
{
"page_context":
{
"redirect_url": "https://{commerce_url}/completed/{ORDERNUMBER}",
"order_id": 123,
"order_number": "ON123",
"new_user": false,
"token": "df8a210c-c19d-4497-ad63-494fdea1f1e0",
"campaigns":
[ { "code": "1", "message": "xyz" }, ], }, } ],
"template_name":
"orders/checkout.html",
"errors": null,
"pre_order": {...}
}
}
]
}

Redirect Guard Page

This page provides a control to ensure successful redirection and prevent further redirection.

POST Redirect-Guard-Page

Path: https://{commerce_url}/orders/checkout/?page=RedirectGuardPage

Example Request

There is no need to include any data in the request. Simply submit an empty request.

{}

Example Response

No additional data is returned in the response.

{}

Loyalty Card Page

This page is used to set loyalty point amount.

POST Loyalty-Card-Page

Path: https://{commerce_url}/orders/checkout/?page=LoyaltyCardPage

Example Request

Include the selected_loyalty_amount field in the request to indicate the chosen amount.

{
"selected_loyalty_amount": "100.00"
}

Example Response

Upon sending the request, the response include fields such as loyalty_total_amount, loyalty_amount, card_number, applied_amount, and loyalty_points_type. These fields provide detailed information about the transaction. If the operation is unsuccessful, these fields are returned blank.

{
"loyalty_total_amount": "100.00",
"loyalty_amount": "100.00",
"card_number": "5555555555554444",
"applied_amount": "100.00",
"loyalty_points_type": "points_type"
}

Send Barcode SMS Page

This page is used to send barcode SMS to the phone number provided.

POST Send-Barcode-Sms-Page

Path: https://{commerce_url}/orders/checkout/?page=SendBarcodeSmsPage

Example Request

Include the phone number to which the message is requested in the request.

{
"phone_number": "543 444 44 44"
}

Example Response

No additional data is returned in the response.

{}

Send Checkout URL SMS Page

If a customer does not have a QR reader app and cannot scan the barcode, the checkout URL is sent to them via SMS.

POST Send-Checkout-Url-Sms-Page

Path: https://{commerce_url}/orders/checkout/?page=SendBarcodeSmsPage

Example Request

Include the phone number to which the message is requested in the request.

{
"phone_number": "543 444 44 44"
}

Example Response

No additional data is returned in the response.

{}