Get started with the S88pay API

Send your first API request.

Before you get started

First, make sure you fulfill the initial requirements for a smooth process.

Send your first API request

To make a request to the S88pay API, the operator must create a URL containing tokens and parameters using our own algorithm. You can refer to the API Functions section for the URL and parameters, and the Authentication & Security for the algorithm.

For example, if we want to make a payment request, we use Payment Endpoint to send the request. Then, we look at what parameters are required.

Combine all parameters into one string, separated by & character

For example, to make request in our services.

Combine Parameters
$str = "merchant_code=xxx&'
.'merchant_api_key=xxx&'
.'transaction_code=xxx&'
.'transaction_timestamp=xxx&'
.'payment_code=xxx&'
.'transaction_amount=xxx&'
.'user_id=xxx&'
.'currency_code=xxx"

Encrypt using encrypt_decrypt

Refer to security on pre-requirements, the attribute to send is usually just using one key with encrypted parameters. for more info please read more Authentication & Security

Encryption sample:

Encrypt
$key = encrypt_decrypt('encrypt', $str, '{your_api_key}', '{your_secret_key}')

Done

So, the request will look like:

https://{base_url}/{merchant_code}/v2/dopayment?key=3eX+f+MoVECXxSkKqV7aBRYIbyWg3DxdPdgZyG+377a7dR1OBBDNnU+/vtn7hUyjP7WWdZ7gCsPF0J+JOiSxb1BFueIyRX3rxbSMa+/AyFvhz4L/2wJmSJKcNQn4whIL1sc1cfj7E1smQFAiYjfLXdY1Ev6Pnoit8Vouex3+upnZjJS8t44XRx5wugB5GuybZWPtlPhiN/P7P4uJW3RlFlo+tYrnHQ6GwqwRkoLrdv3qZXUzaatT8EWdztr973KWFDof2rVD+56SMAVrRHQZcYICU8RcjpyvJUaCtXpOKKg=

After the request url is made, the response will depend on each enpoint. see the return section to see what response will be received.