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
^^/start-session
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)
{
"version": "", //version of produced service
"guid": "", //idempotency key
"orderId": "", //Akinon order identity number
"orderAmount": 0.00, //Akinon order total amount for payment, 2 digits after the decimal point
"locale": "", //IETF BCP 47 language tag
"returnUrl": "", //Return URL after user entries
"type": "", // payment method choice; SALE,AUTH
"currency": "", //Three-letter ISO 4217 currency code
"clientIp": "", //client ip !!! DEPRECATED It will be deleted with the next version
"customer": {
"firstName": "",
"lastName": "",
"phoneNumber": "",
"email": "",
"clientIp": "", //client ip
},
"targetProvider": "" //Optional. Specifies the intended sub-provider or payment method to be used
}
Response Body raw 200 (json)
{
"type": "", //started payment type; values SALE,AUTH
"redirectUrl": "" //end user redirection url
"redirectMethod": "" // GET or POST
"sessionId": "", // unique id for started session
"transactionId":"" //generated unique payment transaction id on payment provider, if exists
}
Response Body raw 4xx/5xx (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider, if exists
"status": "", // last status after this error of session, REJECTED, RESOLVED, PENDING
"subStatus": "", // last substatus after this error of session, values substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING
"errors": [
{
"code": "", // error code
"field": "", // error field if exist
"message": "" // error detail message
}
]
}
{
"version": "", //version of produced service
"guid": "", //idempotency key
"orderId": "", //akinon order identity number
"orderAmount": 0.00, //Optional. Final Amount for payment if it changed since authorization, 2 digits after the decimal point
}
âš orderAmount: parameter is only used for provisioned payments.
Response Body raw 200 (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "" // substatus information of current situation, values PROCESSING_ERROR, RISKY, RESOLVED, PAYMENT_WAITING
}
Response Body raw 4xx/5xx (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "", // substatus information of current situation, substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING
"errors": [
{
"code": "", // error code
"field": "", // error field if exist
"message": "" // error detail message
}
]
}
{
"version": "", //version of produced service
"guid": "", //idempotency key
"orderId": "", //akinon order identity number
}
Response Body raw 200 (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "" // substatus information of current situation, substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING
}
Response Body raw 4xx/5xx (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "", // substatus information of current situation, substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING "errors": [
{
"code": "", // error code
"field": "", // error field if exist
"message": "" // error detail message
}
]
}
{
"version": "", //version of produced service
"guid": "", //idempotency key
"orderId": "", //akinon order identity number
"amount": 0.00, //amount to be refunded, , 2 digits after the decimal point
"currency": "" //Three-letter ISO 4217 currency code
}
Response Body raw 200 (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "" // substatus information of current situation, substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING
}
Response Body raw 4xx/5xx (json)
{
"transactionId":"", //generated unique payment transaction id on payment provider
"status": "", //status information current situation, values: REJECTED, RESOLVED, PENDING
"subStatus": "", // substatus information of current situation, substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING "errors": [
{
"code": "", // error code
"field": "", // error field if exist
"message": "" // error detail message
}
]
}
{
"version": "", //version of produced service
"guid": "", //idempotency key
"orderId": "", //akinon order identity number
"type": "", //optional for filtering, type for filtering results; values: START,REFUND,VOID,PURCHASE,HISTORY
"transactionId": "",//optional for filtering, payment transaction id from purchase,refund,void response
"status": "", //optional for filtering; values: REJECTED, RESOLVED, PENDING
"subStatus": "" //optional for filtering; PROCESSING_ERROR, RISKY, RESOLVED, PAYMENT_WAITING
}
Response Body raw 200 (json)
{
"lastAction": "", // last action of session, START,REFUND,VOID,PURCHASE,HISTORY
"status": "", // last status of last action/total payment
"substatus":"", // last substatus of last action/total payment
"balance": 0.00, // total amount after refunds are subtracted, 2 digits after the decimal point
"currency": "", // currency of session
"paymentTransactionHistory": [ // steps of session
{
"guid": "", // guid information in requests
"type": "", // request type, START,REFUND,VOID,PURCHASE,HISTORY
"timestamp": "", // request datetime in ISO-8601 UTC+3
"statusCode": "", // payment status; values: REJECTED, RESOLVED, PENDING
"subStatusCode": "", // payment substatus; substatuses for REJECTED status: PROCESSING_ERROR, RISKY substatuses for RESOLVED status: RESOLVED for PENDING status: PAYMENT_WAITING
"statusDetail": "", //detail message
"subSteps": [ // substeps/retries between provider and extension
{
"timestamp": "", // request datetime in ISO-8601 UTC+3
"statusCode": "", // payment provider status code
"statusDetail": "" // payment provider status detail
}
]
}
]
}