Agreement Query URL

Querying Agreement Types​

After the payment session is created in the Akifast, the data used to create this session, such as the selected address by the user, is sent to the merchant to query about the agreement as follows:

The Akifast application sends a POST request to the address specified by the query_agreement_types_url parameter sent when the payment session is created with the following parameters.

Query Parameters​

Parameter
Type
Description

basket_id

string

The basket ID sent when the payment session is created.

conversation_id

string

The boomerang value sent by the merchant when creating the payment session.

order_id

string

Order number on the merchant side.

language

string

The language option selected by the user.

Example Request​

{
    "order_id": "202204XX134221",
    "language": "tr",
    "conversation_id": "kdLEMDASXXRI23445D",
    "basket_id": "B-20211XX91524"
}

Response Parameters​

Return Value
Type
Description

agreements[0].code

string

Code of the agreement.

agreements[0].text

string

Name/description of the agreement.

Example Response​

{
  "agreements":[
      {
        "code":"OBF",
        "text":"Ön Bilgilendirme Formu"
      },
      {
        "code":"MSS",
        "text":"Mesafeli Satış Sözleşmesi"
      }
  ]
}

Querying Single Agreement​

After the payment session is created in the Akifast application, the data used to create this session, such as the selected address by the user, is sent to the merchant to query about the agreements as follows:

The Akifast application sends a POST request to the address specified by the query_agreements_url parameter sent when creating the payment session along with the ?code= parameter and the following parameters.

Query Parameters​

Parameter
Type
Description

order_id

string

Order number on the merchant side.

session_token

string

Payment session key obtained by the merchant.

shipping_address

Address Object

The selected shipping address by the user.

billing_address

Address Object

The selected billing address by the user.

user

akipay_user object

Information of the user who initiated the transaction.

shipping_option_key

string

The shipping option selected by the user.

language

string

The language option selected by the user.

conversation_id

string

The boomerang value sent by the merchant when creating the payment session.

basket_id

string

The basket ID sent when the payment session is created.

Example Request​

{
    "order_id": "20220XX7134221",
    "session_token": "c8aac38d-ed78-471c-83e3-83a9XX0586e7",
    "shipping_address": {
        "name": "John",
        "surname": "Doe",
        "phone_number": "905XXXXXXXXX",
        "postal_code": "123",
        "notes": null,
        "company_name": null,
        "address_title": "Home",
        "tax_no": null,
        "tax_office": null,
        "is_default": true,
        "line": "address line",
        "address_type": "CUSTOMER",
        "country": {
            "name": "Türkiye",
            "code": "TR"
        },
        "city": {
            "name": "AYDIN",
            "code": "AYDIN"
        },
        "town": {
            "name": "SÖKE",
            "code": "AYDIN_SOKE"
        },
        "district": {
            "name": "KONAK MAH",
            "code": "1309246"
        },
        "status": "ACTIVE",
        "hash_data": "33225F04656FCB8933BC5DD9939C9F2XXX8838F63C67AFDA06DA240E03EC9DFC"
    },
    "billing_address": {
        "name": "John",
        "surname": "Doe",
        "phone_number": "905XXXXXXXXX",
        "postal_code": "123",
        "notes": null,
        "company_name": null,
        "address_title": "Home",
        "tax_no": null,
        "tax_office": null,
        "is_default": true,
        "line": "address line",
        "address_type": "CUSTOMER",
        "country": {
            "name": "Türkiye",
            "code": "TR"
        },
        "city": {
            "name": "AYDIN",
            "code": "AYDIN"
        },
        "town": {
            "name": "SÖKE",
            "code": "AYDIN_SOKE"
        },
        "district": {
            "name": "KONAK MAH",
            "code": "1309246"
        },
        "status": "ACTIVE",
        "hash_data": "33225F04656FCB8933BC5DD9939C9F256E883XX63C67AFDA06DA240E03EC9DFC"
    },
    "user": {
        "name": "Jane",
        "surname": "Doe",
        "gender": null,
        "email": "[email protected]",
        "birth_date": null,
        "identity_number": null,
        "phone_number": "+905XXXXXXXXX",
        "phone": {
            "country_phone_code": "+90",
            "national_phone_number": "5XXXXXXXXX"
        },
        "akinon_user_id": "0FA16FF875464259XX6FE7FDA305C7D7",
        "status": "ACTIVE",
        "verification_date": "2022-03-29T14:06:13.88+00:00",
        "email_verified": false
    },
    "shipping_option_key": "13",
    "language": "tr",
    "conversation_id": "kdLEMDASDXXI23445D",
    "basket_id": "B-20211XX91524"
}

Response Parameters​

Return Value
Type
Description

code

string

Code of the agreement.

text

string

Name/description of the agreement.

agreement_body

string

HTML text of the agreement.

Example Response​

{
    "code":"OBF",
    "text":"Ön Bilgilendirme Formu",
    "agreement_body":"<html><body><p>Örnek Sözleşme Metni</p></body></html>"
}

Last updated

Was this helpful?