Online Banking, E-Wallet, Virtual Account and QR Payments

Acquiring Interaction Diagram

Acquiring Interaction Diagram

Acquiring Interaction Diagram



Acquiring Interaction Diagram Description

  1. The user initiates a payment using a payment method available through the Partner's service.
  2. The Partner's service sends a payment request to the System using a specific System URL.
  3. The System verifies the request by checking the required parameters and the validity of the request signature.
  4. The System responds with either a confirmation that the request is correct and accepted or an error message if the request doesn't meet the System's requirements.
  5. The System processes the request further and forwards the data to the payment method.
  6. The payment method's service continues processing the payment request.
  7. The System provides a redirect link, QR code, or operation identifier, which the User must use to confirm the payment.
  8. The Partner redirects the User to the provided link or displays the QR code or operation identifier for completing the payment.
  9. The User completes the necessary actions to finalize the payment according to the selected payment method.
  10. The payment method's service continues processing the payment after the User's confirmation.
  11. The payment method informs the System of the payment result.
  12. The System sends a callback message with the payment result to the Partner’s service.
  13. The Partner communicates the payment result to the User.

Payment Request

To initiate a payment, send the following request:

POST request to: {{url_system}}/alt

Where {{url_system}} is:

  • Testing environment: https://secure-test.8b.world
  • Production environment: https://secure.8b.world

Request Parameters:

ParameterRequiredTypeDescription
dataYESStringMIME base64-encoded JSON document string
signYESStringRequest signature, formed using the hash_hmac function to confirm data validity

The data parameter is formed using the basic (required) parameters for each request to the System.

Additional parameters may be used if the selected payment method requires further payment details. Requirements for using additional parameters are detailed in the List of Available Payment Methods.



Basic Data Parameters Description

ParameterRequiredTypeDescriptionExample
api_keyYESStringUnique Partner’s identifier within the System1d038f70-3eff-013a-cebf-02420a00092b
amountYESDecimalOrder payment amount.
Format: positive floating point number with "." as a delimiter; max 2 symbols after delimiter
10000
100.12
currencyYESStringPayment currency.
Possible values: IDR, PHP, EUR, CNY, UZS
IDR
referenceYESStringUnique order ID within Partner’s system123456789
paramsNOObjectSection containing additional payment parameters-
> payer_firstnameNOStringUser’s first nameName
> payer_lastnameNOStringUser’s last nameSurname
> user_phoneNOStringUser’s phone number+622851280
> user_emailNOStringUser’s e-mail address[email protected]
> ipNOStringUser’s IP address, IPv4/IPv6 format8.8.8.8 / 2001:4860:4860::8888
> country_iso_codeNOStringUser’s country of residence in ISO 3166-1 alpha-2 formatPH
> billing_cityNOStringUser’s city of residenceCity
> billing_addressNOStringUser’s billing addressExample street, 1, 23
> billing_postcodeNOStringUser’s postal/ZIP code1000

Note: > denotes depth for nested parameters.




Signature Formation Procedure (sign parameter)

The signature is created based on the data parameter (a base64-encoded parameter string) using the hash_hmac function. The "md5" algorithm is used to generate the signature:

hash_hmac('md5', $data, $secret_key)

Where:

  • $data – MIME base64-encoded JSON document
  • $secret_key – Partner’s Secret key

API Reference

You can view a Reference API implementation for this method at this link



Payment Callback Message

Whenever a payment is confirmed or there is a change in the status of a payment transaction, the System sends a callback message to the Partner’s system (Webhook). This message is transmitted via an HTTP POST request to the Partner’s system (Callback URL) and includes the following parameters:

ParameterDescription
dataMIME base64-encoded JSON document string
signRequest signature, based on the data string and generated using the hash_hmac function to confirm data validity

It is recommended to verify the callback request signature to ensure data integrity and validity using the following algorithm:

hash_hmac('md5', $_POST['data'], $secret_key) === $_POST['sign']

Where $secret_key is the Partner’s Secret key.


Callback Request Data Parameter Description

ParameterDescription
transaction_idUnique transaction identifier within the System
referenceUnique order ID within the Partner’s system
api_keyUnique Partner’s identifier within the System
amountTransaction amount
currencyTransaction currency
statusTransaction processing status:
0 – created transaction (redirecting User to complete payment)
1 – successful authorization (hold) for two-stage payments
2 – successful unhold for two-stage payments
3 – successful payment (credit from User’s account)
4 – successful refund
8 – transaction processing incomplete
98 – expired transaction (User did not complete payment)
99 – processing error (failed payment)
status_nameTransaction status name:
created – created transaction (status=0)
authorize – successful authorization (status=1)
void – successful unhold (status=2)
success – successful payment (status=3)
refund – successful refund (status=4)
processing_incomplete – transaction processing incomplete (status=8)
expired – expired transaction (status=98)
error – processing error (failed payment, status=99)
system_amountFinal transaction amount with payment system commission deducted
system_currencyPayment system currency
operation_amountOperational transaction amount
commissionPayment system commission amount in system_currency. Always contains "0"
payment_system_typePayment system type:
alt – local payment methods.
card_numberPayment card mask (parameter presence depends on payment system type and Payment method)
card_pan6First 6 digits of payment card number (parameter presence depends on payment system type and Payment method)
card_pan4Last 4 digits of payment card number (parameter presence depends on payment system type and Payment method)
cardholder_nameCardholder name (parameter presence depends on payment system type and Payment method)
processing_error_msgError description (when status=99)
authorization_codePayment system authorization code (optional parameter)
pay_tokenPayment token for recurrent payments (optional parameter, depends on Gateway settings)
paramsList of additional parameters passed in the initial request
refund_init_typeDenotes the initiator for refunds:
:api => 0 – refund via API
:front => 1 – refund via Backoffice
:admin => 2 – refund via Technical support

In response to a callback message, the Partner’s system is required to return a string containing the value OK.

If the Partner’s system does not return OK in response, the Gateway will send repeat callback requests.



API Reference

You can view a Reference API implementation for this method at this link


Refund Request

To initiate a refund, make the following request:

POST request to {{url_system}}/alt/refund

Where {{url_system}}:

  • For testing environment - https://secure-test.8b.world
  • For production environment - https://secure.8b.world

Request Parameters

ParameterDescription
dataMIME base64-encoded JSON-document string
signRequest signature, which is based on the data string and formed using hash_hmac function to confirm data validity

The following parameters are used to form the data parameter:

ParameterTypeDescriptionExample
api_keyStringUnique Partner’s identifier within the System1d038f70-3eff-013a-cebf-02420a00092b
transaction_idStringUnique transaction identifier within the System12345
amount*FloatAmount to be refunded
Format: positive floating point number with "." as a delimiter; max 2 symbols after delimiter
1.01

* - optional parameter. If amount is not present, the full original transaction amount will be refunded.



API Reference

You can view a Reference API implementation for this method at this link


Transaction Information Request

To receive detailed transaction information, make the following request:

POST request to {{url_system}}/alt/get_orders_data

Where {{url_system}}:

  • For testing environment - https://secure.8b.world
  • For production environment - https://secure-test.8b.world

Request Parameters

ParameterDescription
dataMIME base64-encoded JSON-document string
signRequest signature, which is based on the data string and formed using hash_hmac function to confirm data validity

The following parameters are used to form the data parameter:

ParameterTypeDescriptionExample
api_keyStringUnique Partner’s identifier within the System1d038f70-3eff-013a-cebf-02420a00092b
transaction_idStringUnique transaction identifier within the System12345
OR
referenceStringUnique order ID within Partner’s system123456789


API Reference

You can view a Reference API implementation for this method at this link