HomeDevelopersAPI ReferenceEncrypted Payment Gateway (S2S)

Encrypted Payment Gateway (S2S)

AES-256-CBC encrypted payload for maximum data protection.

POSThttp://localhost:9003/api/s2s/encrypt
Encrypted payment online from customers
Remark: 12 mandatory parameters — payload sent as encrypted_data

Concatenate all parameters into a query string (e.g. &bill_amt=11.00&fullname=dev+tech), encrypt using AES-256-CBC with your private_key and public_key, append public_key to the encrypted string, and POST as encrypted_data.

Encryption flow

  • Build query string from all payment parameters
  • Encrypt with AES-256-CBC (IV derived from SHA-256 of public_key)
  • Append public_key to encrypted output
  • POST { encrypted_data: encryptedPayload + publicKey }
  • Set encryption_method=aes256 to receive encrypted webhook responses

Request

POST /api/s2s/encrypt
POST http://localhost:9003/api/s2s/encrypt
Content-Type: application/x-www-form-urlencoded

encrypted_data=Fx9PJmn4TknBmttkHe3JX...{public_key}

Response (3DS pending)

json
{
  "authurl": "http://localhost:9003/api/authurl/38FACFT0nigxaW_OyOojZoxYGlxqDzUCz_TJFL_M1nk=",
  "transID": "100135250426141606",
  "reference": "22DEVJAVA250415",
  "order_status": "0",
  "status": "Pending",
  "bill_amt": "11.11",
  "bill_currency": "EUR",
  "response": "Payment is pending"
}

Decrypted webhook response

After decrypting data parameter
bill_currency=EUR&transID=100203250509173720&mop=Visa&ccno=411111XXXXXX1111
&reference=22PostDEVJAVA250415&order_status=25&bill_amt=130.0&status=Test Approved
encryption_method: aes256 = encrypted webhook · none = plain text webhook. private_key is required for decryption.
ParameterTypeDescription
public_keystr MTerminal public key from My Terminal → Terminal Public Key.
terNOint MUnique terminal number from My Terminal → Add New Terminal List.
integration-typestr DDefault fixed value: s2s.
bill_amtdec(10,2) MBill amount in decimal format (e.g. 120.00).
bill_currencystr MISO currency code (e.g. EUR, USD).
product_namestr MProduct or service name.
referencestr MYour unique order ID — returned in callbacks.
webhook_urlstr MServer-to-server webhook URL for status updates.
return_urlstr MCustomer redirect URL after authentication.
bill_ipserver DCustomer IP — set server-side from REMOTE_ADDR.
encryption_methodstr Daes256 or none — controls webhook encryption.
fullnamestr CCustomer full name (optional).
bill_emailstr CCustomer billing email (optional).
mopstr MPayment mode: CC, DC, NB, WALLET, UPICOLLECT, QRINTENT.
ccnostr CCard number (required for mop=CC).
ccvvstr CCard CVV (required for mop=CC).
monthstr CCard expiry month (required for mop=CC).
yearstr CCard expiry year (required for mop=CC).
Talk