Skip to main content

Initiate Transaction Overview

Initiate Transaction

Merchant Server calls Initiate Transaction API to Synapse Server to Initiate Transaction. This call to be made when customer moves to checkout and proceed to payment. Initiate transaction will create a new order on nuclei side which is then subjected to payment confirmation.

The request and response body will be encrypted. We are using the AES with Galois/Counter Mode (AES-GCM) algorithm for encryption. As part of the onboarding process, the secret key would be shared with the merchant over a secure channel. You can check Encryption section to get code snippet for encryption/decryption.

Request

Headers

KeyValue(sample)RequiredDetails
X-Client-IdMERCHANT-XXXYesClient Id shared on secure channel during merchant onboarding.
X-Callback-Urlhttps://mockmerchant.dev.com/payment-service/payment/statusYesCallback Url of Merchant Server, to receive callback from Synapse Server for payment confirmation.

Body: application/json

Encrypted Payload

{
"payload": "ewoJImdyYW50VG9rZW4iOiAiTk5rWGI5QTE5Um1JNXgyUWNtQnciCn0="
}


Decrypted Request

{
"merchantPaymentReferenceId": "PAY-123-456",
"merchantOrderId": "ORD-123-456",
"txnInfo": {
"currency": "AED",
"amount": "10"
},
"merchantOrderDetailsUrl": "https://merchant.com/order/ORD-123-456",
"transactionContext": "ewogICJmYXJlRGV0YWlscyI6IHsKICAgICJ0b3RhbEFtb3VudCI6ICI3MDAuMDAiLAogICAgInBheWFibGVBbW91bnQiOiAiNzAwLjAwIgogIH0sCiAgImNhcnREZXRhaWxzIjogewogICAgImNhcnRJdGVtcyI6IFsKICAgICAgewogICAgICAgICJjYXRlZ29yeSI6ICJTSE9QUElORyIKICAgICAgfQogICAgXQogIH0KfQ=="
}

You can get more information on request in request body section

To ensure the confidentiality of the data while it’s in transit, the request and response body in server-to-server calls must be encrypted. We are using the AES with Galois/Counter Mode (AES-GCM) algorithm for encryption. As part of the onboarding process, the secret key would be shared with the merchant over a secure channel.

keyDSEncryption Algo
payloadstringAES encrypted payload

Responses

Encrypted Response

{
"payload": "ewoJImdyYW50VG9rZW4iOiAiTk5rWGI5QTE5Um1JNXgyUWNtQnciCn0="
}


Decrypted Payload

{
"synapsePaymentReferenceId": "SYN-PAY-123-456"
}


Body:application/json

To ensure the confidentiality of the data while it’s in transit, the request and response body in server-to-server calls must be encrypted. We are using the AES with Galois/Counter Mode (AES-GCM) algorithm for encryption. As part of the onboarding process, the secret key would be shared with the merchant over a secure channel.

keyDSEncryption Algo
payloadstringAES encrypted payload

Sample curl

curl --location 'https://preprod-az.gonuclei.com/api/merchant/v1/transaction:initiate' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: MOCK-MERCHANT-104' \
--header 'X-Callback-Url: https://example.com' \
--data '{
"payload":"gdyX/wLvgUIu4CiLOkFxlj52VpvH/+Sln4IbJdV4XFh8mFNJhCz1TW4RyhRd4X98MYElfKaC+PUnVnniNqtU6O22Rivis+iuoiIF01ToKpI56v0sVjc5JnNU5Etk4X9jwIV18Ox5AznsaMJUSiIDH77mcemphVdH6lo8PBP/XUFSi/NmkpnVw/KD3v/eQN7Yg5rpToRNz8y8qtVW53s7s5gSWOb9DnUbdH0TwteiaojcSPl+so/HYn54QcacgTPMoEAP11ruizeNnBlpHxC1UCKV2ldhyfGp9pjrTRLwvcPjN5HU9ntd4Q2pBbdbIPG5TQlWJFPLGyQzVJMMNUIXV4JYVgpQrk67kemGI7tjRmpQIeLEAHSsTpLTYSgXU2vX+/aPLkVwk2+nNt34sB5KXRAlul3u/qOxG3NqwyoktMD4DM2X5fQeau2ewVKBomvYmKb5drBHEqOxS2GqNl0wGbM1C/wwpwaHMrepxqCh+7ngCFnSfUF0k26aJsRRUaO/EWzXBN+IH4PJNTI/Ylz5bJ5xHdgiCZVBjuOOt1JzKm+k3+/YDpKxgldZ3XJyWiWPS97zwM2G3NMtF9iJNCFXKM3acYmJBEiO2SZ8DiBVt24OUI7HYhGPO5tuactblVcllw2rgso1dBdboP75g6pdAuPi7FFwxS+3iJ87OsKvc/qzP34CrLEz0VfrQY5CRCklubA8jE09mTzaIrbyIPi2/EMzvNyi9gSjy172nlrUDk4EK9T+tTLeK6d8RsN3lP3mgycIyAdXPb3Qs5T1TdRltqCphTboIpu6ls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