Skip to main content

Alfa Group for Insurance Guide

Jokul has partnered with various partners and one of them is Alfa Group (Alfamart, Alfaexpress, Alfamidi, Lawson, Dan+Dan) to provide O2O Payment for Insurance. Learn more about how Jokul can help you integrate with Alfa Group here.


Integration steps#

Here is the overview of how to integrate with O2O:

  1. Setup Inquiry URL
  2. Generate payment code
  3. Receive inquiry request from Jokul
  4. Acknowledge payment result
Jokul Direct - Alfa for Insurance Sequence DiagramJokul Direct Alfa for Insurance Merchant Flow

1. Setup Inquiry URL#

To receive the inquiry request from Jokul. You must set your Inquiry URL to Jokul. Please contact our team for the setup.

Please inform the Inquiry URL for Sandbox environment and Production environment.


2. Generate Payment code#

Generate payment is done in your system. The payment code length maximum is 20 digits.


3. Receive inquiry request from Jokul#

API Request#

Jokul will hits your Inquiry URL with the following API request:

TypeValue
HTTP MethodPOST

Here is the sample of request header that Jokul generated for inquiry:

Client-Id: MCH-0001-10791114622547Request-Id: 5b8e438f-fac1-4103-9e0e-ebfdc38b5acbRequest-Timestamp: 2020-08-11T08:45:42ZSignature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=
Request Header Explanation
ParameterDescription
Client-IdClient ID retrieved from Jokul Back Office
Request-IdUnique random string (max 128 characters) generated from Jokul side to protect duplicate request
Request-TimestampTimestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z
SignatureSecurity parameter that needs to be verified on merchant Backend to ensure that the request is coming from Jokul. Please refer to this section to generate the signature

Here is the sample of request body that Jokul will send to defined Inquiry URL:

{    "service": {        "id": "ONLINE_TO_OFFLINE"    },    "acquirer": {        "id": "ALFA"    },    "channel": {        "id": "ONLINE_TO_OFFLINE_ALFA"    },    "online_to_offline_info": {        "payment_code": "8896512345678123"    },    "online_to_offline_inquiry": {        "date": "2020-08-11T08:45:42Z",        "identifier": [            {                "name": "AGENT_ID",                "value": "100001"            },            {                "name": "AGENT_STORE_ID",                "value": "10000232"            },            {                "name": "AGENT_TRX_ID",                "value": "c1aa04bf421e5b38c3d18933e9994d3f289def65"            }        ]    }}
Request Body Explanation
ParameterTypeMandatoryDescription
service.idstringMandatoryValue: ONLINE_TO_OFFLINE
acquirer.idstringMandatoryValue: ALFA
channel.idstringMandatoryValue: ONLINE_TO_OFFLINE_ALFA
online_to_offline_info.
payment_code
numberMandatoryPayment code that is inquired by the customer
online_to_offline_inquiry.datestringMandatoryTimestamp request on UTC time in ISO8601 format
online_to_offline_inquiry.identifierarrayOptionalList of transaction identifier that coming from the acquiring. Merchant can save these data for reference

API Response#

After Jokul hits your Inquiry URL with the above API request, you must give the following response:

TypeValue
HTTP Status for online_to_offline_inquiry.status = success200
HTTP Status for online_to_offline_inquiry.status = decline400
HTTP Status for online_to_offline_inquiry.status = billing_already_paid400
HTTP Status for online_to_offline_inquiry.status = billing_was_expired400
HTTP Status for online_to_offline_inquiry.status = billing_not_found404
Client-Id: MCH-0001-10791114622547Request-Id: 5b8e438f-fac1-4103-9e0e-ebfdc38b5acbResponse-Timestamp: 2020-08-11T08:45:42ZSignature: HMACSHA256=9UPUFzOqJc47aJzD9ESOTcWg6TMsg3mqSP+DnUO8ENE=
Response Header Explanation
ParameterDescription
Client-IdSame as the request
Request-IdSame as the request
Response-TimestampTimestamp Response on UTC with format ISO8601 UTC+0 from Merchant
SignatureSignature generated by Merchant based on the response body. Please refer to this section to generate the signature

Here is the sample of response body:

{    "order": {        "invoice_number": "INV-20210125-0001",        "amount": 150000    },    "online_to_offline_info": {        "payment_code": "8896512345678123",        "info": "Thank for shopping in our store"    },    "online_to_offline_inquiry": {        "status": "success"    },    "customer": {        "name": "Anton Budiman",        "email": "anton@example.com"    },    "alfa_info": {        "receipt": {            "footer_message":"Call Center 021 555-0525"        }    },    "additional_info": {        "insurance_info": {            "policy_type": "Dana Pendidikan",            "policy_number": "9090901234",            "policy_account_name": "Andreas",            "policy_status": "aktif",            "bill_due_date": "21 May 2021"        }    }}
Response Body Explanation
ParameterTypeMandatoryDescription
order.invoice_numberstringMandatoryGenerated by merchant to identify the order and must unique per request
Allowed chars: alphabetic, numeric, special chars
Max length: 64
order.amountnumberMandatoryIn IDR currency and without decimal
Allowed chars: numeric
Max length: 12
online_to_offline_info.
payment_code
stringMandatorySame as the request
online_to_offline_info.infostringOptionalAdditional info that will be display on the acquirer channel when customer do inquiry
Allowed chars: alphabetic, numeric, special chars
Max length: 32
online_to_offline_inquiry.statusstringMandatoryPossible value: success, decline, billing_already_paid, billing_was_expired, billing_not_found
customer.namestringMandatoryCustomer name that will be displayed on acquirer channel when do inquiry
Allowed chars: alphabetic, numeric, special chars
Max length: 64
customer.emailstringOptionalCustomer email
Allowed chars: alphabetic, numeric, special chars
Max length: 128
alfa_info.receipt.
footer_message
stringOptionalMessage that will be printed on the receipt as footer message that given to the customer
1 line contain 40 character (fix length)
Max length: 120
additional_infoobjectOptionalMerchant can send additional data through this parameter and will be get the data in the HTTP Notification

4. Acknowledge payment result#

After the payment is being made by your customer, Jokul will send HTTP Notification to your defined Notification URL. Learn how to handle the notification from Jokul:


What's next?#

You can test your payment through our Payment Simulator. Learn more here.