Payment Flows

With Auth/Capture Support

The user proceeds to the payment step, and a start session request is sent to the payment provider with the summary information of the user’s cart. The session begins, and the end user proceeds to the payment provider's payment page. After entering all payment details, the user returns to Akinon return page with the payment summary information. Akinon views the last status of payment and notifies the provider that this transaction has been completed or cancelled. At the end of this flow, the user is informed about the result.

Without Auth/Capture Support

In cases where the payment provider has no option for Auth/Capture, they should write an Akinon Extension. The extension proceeds to update the payment status based on Akinon's preference to complete the transaction. Below is an example about unsuccessful payment after returnUrl checks.

Webhook/IPN Support

In cases where a user's payment is interrupted due to any error or in situations where expediting or completing the payment flow outside of routine payment status checks is required, a webhook request can be sent to Akinon systems. Webhook requests sent by the payment provider will be processed after a certain period of time. Webhooks can be processed with or without Auth/Capture support.

Payloads

Below is the list of services that can be integrated with the aforementioned flows.

Three configuration parameters will be shared during integration.

username
Username for basic authentication

password

Password for basic authentication

hash-key

a key info for hashing

start-session (POST)

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

Response Body raw 200 (json)

Response Body raw 4xx/5xx (json)

Example

Request (cURL)

Response (json)

return-url (browser POST)

URL

Request Body (form-data)

order-id
Order ID from start-session request

salt

10-character random value for each call

amount

Completed amount (with installments, etc.), 2 digits after the decimal point

installment-count

Installment count

interest-fee

Interest fee for installment

status

2 (REJECTED), 3 (RESOLVED), 4 (PENDING)

substatus

5 (PROCESSING_ERROR), 6 (RISKY), 7 (RESOLVED), 8 (PAYMENT_WAITING)

hash

SHA512 (salt|orderId|amount|installment-count|interest-fee|status|substatus|hash-key)

Response 200

Example

Hash generation:

90f34c2b@%|41422452|570.20|1|0.00|3|6|c127d642-7aec-4fa9-8199-9fdbaa323c9a

Request (cURL)

Response 200

purchase (POST)

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

âš  orderAmount: parameter is only used for provisioned payments.

Response Body raw 200 (json)

Response Body raw 4xx/5xx (json)

Example

Request (cURL)

Response (json)

void (POST)

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

Response Body raw 200 (json)

Response Body raw 4xx/5xx (json)

Example

Request (cURL)

Response (json)

refund (POST)

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

Response Body raw 200 (json)

Response Body raw 4xx/5xx (json)

Example

Request (cURL)

Response (json)

history (POST)

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

Response Body raw 200 (json)

Response Body raw 4xx/5xx (json)

Example

Request (cURL)

Response (json)

query (POST)

This service is used to retrieve latest payment status.

URL

Request Headers

x-akinon-request-id
Unique ID for problem solving & tracing.

x-akinon-api-version

Akinon Customer API version.

Authorization

Basic [BASE64_encoded(username:password)]

Request Body raw (json)

Response Body raw 200 (json)

webhook/ipn (POST)

This service is used to handle payment webhook/IPN(Instant Payment Notification).

URL

Request Headers

Request Body raw (json)

Response

HTTP STATUS
DEFINITION

HTTP 200

SUCCESS - Hook processed successfully

HTTP 4xx

FAILURE - Client Side Error

HTTP 5xx

FAILURE - Server Side Error

Example

Request (cURL)

Last updated

Was this helpful?