Skip to main content

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.

NOTE

If the response from the merchant is null, the Akifast application sends a 500 Internal Server Error!

Query Parameters

ParameterTypeDescription
basket_idstringThe basket ID sent when the payment session is created.
conversation_idstringThe boomerang value sent by the merchant when creating the payment session.
order_idstringOrder number on the merchant side.
languagestringThe language option selected by the user.

Example Request

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

Response Parameters

Return ValueTypeDescription
agreements[0].codestringCode of the agreement.
agreements[0].textstringName/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.

NOTE

If the response from the merchant is null, the Akifast application sends a 500 Internal Server Error!

Query Parameters

ParameterTypeDescription
order_idstringOrder number on the merchant side.
session_tokenstringPayment session key obtained by the merchant.
shipping_addressAddress ObjectThe selected shipping address by the user.
billing_addressAddress ObjectThe selected billing address by the user.
userakipay_user objectInformation of the user who initiated the transaction.
shipping_option_keystringThe shipping option selected by the user.
languagestringThe language option selected by the user.
conversation_idstringThe boomerang value sent by the merchant when creating the payment session.
basket_idstringThe 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": "jane.doe@samplemail.com",
"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 ValueTypeDescription
codestringCode of the agreement.
textstringName/description of the agreement.
agreement_bodystringHTML 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>"
}