Skip to main content

Pay-in collection

smilepayz teamsAbout 3 min

Egypt region pay-in API (EGP). See Payment methods.

Request

POST/v2.0/transaction/pay-in

Request Path:

sandbox: https://sandbox-gateway.smilepayz.com/v2.0/transaction/pay-in
production: https://gateway.smilepayz.com/v2.0/transaction/pay-in

Header Parameters

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. Egypt EET +02:00).
X-SIGNATUREMStringSignature of JSON body (see product Signature doc).
X-PARTNER-IDMStringYour merchantID (alphanumeric).

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Merchant-unique id, 6–32 alphanumeric.
purposeMString(64)Memo to payer, 1–64 UTF-8 chars.
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringOptional UTF-8 merchant display name.
    subMerchantIdOStringOptional sub-merchant id.
    subMerchantNameOStringOptional UTF-8 name for subMerchantId.
moneyMObjectcurrency plus amount for this transaction.
    currencyMStringISO currency code for this call.
    amountMNumberTransaction amount in EGP, numeric value greater than 0.
payerOObjectPayer object. If omitted, Smilepayz fills channel-required payer information.
    nameOStringPayer full name (UTF-8).
    idTypeOStringID type code for payer.
    idNumberOStringID number matching idType.
    phoneOStringPayer phone in local format.
    emailOStringPayer email.
paymentMethodMStringCode (see Payment methods doc).
expiryPeriodONumberSession TTL seconds, default 3600, max 86400 unless noted.
redirectUrlOString(256)HTTPS post-pay return URL, max 256 chars.
callbackUrlOString(256)HTTPS async status URL, max 256 chars.

Example Body – Transaction Request:

Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+02:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001

Responses

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm

Body Parameters

FieldRequiredTypeDescription
codeMString00 success, other values error.
messageMStringUTF-8 human-readable result line.
orderNoMStringMerchant-unique id, 6–32 alphanumeric.
tradeNoOStringSmilepayz tradeNo for this order.
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringOptional UTF-8 merchant display name.
    subMerchantIdOStringOptional sub-merchant id.
    subMerchantNameOStringOptional UTF-8 name for subMerchantId.
    accountNoOStringSettlement accountNo if gateway returns it.
moneyMObjectcurrency plus amount for this transaction.
    currencyMStringISO currency code for this call.
    amountMNumberTransaction amount in EGP, numeric value greater than 0.
transactionTimeMStringyyyy-MM-ddTHH:mm:ss±HH:mm (e.g. EET +02:00).
channelMObjectChannel payload (paymentUrl, qrString, …).
    paymentMethodMStringCode (see Payment methods doc).
    vaNumberOStringFawry reference number when returned by the channel.
    paymentUrlOStringSmilepayz cashier URL or channel checkout URL to open for the payer.
statusOStringOrder or payment status enum value.
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+02:00

Notification/Callback

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm
X-SIGNATUREMStringCallback body signature (see Callback signature guide).

Body Parameters

FieldRequiredTypeDescription
orderNoMStringMerchant-unique id, 6–32 alphanumeric.
tradeNoMStringSmilepayz tradeNo for this order.
merchantIdMStringSmilepayz merchantId for this call.
merchantNameMStringOptional UTF-8 merchant display name.
subMerchantIdOStringOptional sub-merchant id.
subMerchantNameOStringOptional UTF-8 name for subMerchantId.
paymentMethodMStringCode (see Payment methods doc).
transactionTimeMStringCompletion time.
statusMStringOrder or payment status enum value.
moneyMObjectcurrency plus amount for this transaction.
    currencyMStringISO currency code for this call.
    amountMNumberTransaction amount in EGP, numeric value greater than 0.
payerOObjectPayer object per region rules (see Payer model).

Return

Important

Respond with the string SUCCESS only.

{
    "orderNo": "20011egyptegpcash563d9094aa7d4d",
    "tradeNo": "1512001125042115424463245",
    "merchantId": "20011",
    "merchantName": "Smilepayz Demo Store",
    "subMerchantId": "",
    "subMerchantName": "",
    "paymentMethod": "FAWRY",
    "transactionTime": "2025-04-21T03:42:47+02:00",
    "status": "SUCCESS",
    "money": {
        "currency": "EGP",
        "amount": 20000
    },
    "payer": {
        "name": "Ahmed Hassan El-Masry",
        "phone": "201234567890",
        "email": "[email protected]"
    }
}