API PAYIN
About 6 min
Request
The Pay-In API enables merchants to initiate payment collection transactions from customers.
Supported payment methods include:
Bank transfers
QRIS (Quick Response Indonesian Standard)
Digital wallets
Credit/debit cards
Other digital payment channels
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
Field | Required | Type | Description |
---|---|---|---|
Content-Type | M | String | HTTP content type specification Fixed value: application/json Required for proper request parsing |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00+07:00 Note: Must be current server time within ±5 minutes |
X-SIGNATURE | M | String | Digital signature for request authentication. See Signature Generation |
X-PARTNER-ID | M | String | Unique merchant identifier assigned by the platform Format: Alphanumeric string Used for merchant authentication and transaction routing Please enter merchantID |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
orderNo | M | String(32) | Unique transaction identifier for merchant tracking Format: Alphanumeric characters only Length: 6-32 characters Must be unique within merchant scope |
purpose | M | String(64) | Human-readable transaction description Format: UTF-8 encoded string Length: 1-64 characters Used for transaction history and reporting |
merchant | M | Object | Merchant identification and business information container Contains primary and sub-merchant details Required for transaction routing and settlement |
merchantId | M | String | Primary merchant identifier assigned by the platform Format: Alphanumeric string Used for transaction routing and settlement processing |
merchantName | O | String | Registered business name of the merchant Format: UTF-8 encoded string Displayed in payment interface and transaction records |
subMerchantId | O | String | Sub-merchant identifier for multi-level merchant structures Format: Alphanumeric string Required for sub-merchant transaction processing |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Shown in payment interface and transaction records |
money | M | Object | Transaction amount and currency specification container Defines payment value and monetary unit Required for payment processing and settlement |
currency | M | String | ISO 4217 currency code specification Fixed value: IDR (Indonesian Rupiah) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents IDR 20000 Range: 10000-999999999 |
payer | C | Object | Customer payment information container Required for specific payment methods (e.g., OVO) Used for payment verification and customer communication |
phone | C | String | Customer mobile phone number for payment verification Format: International format with country code Example: +6281234567890 Required for OVO wallet payments |
paymentMethod | O | String | Preferred payment method specification Format: Predefined payment method codes Examples: QRIS, W_DANA, CIMB, BCA If omitted, payment method selection page is displayed |
expiryPeriod | O | Number | Payment session timeout duration in seconds Format: Integer value Default: 3600 seconds (1 hour) Range: 300-86400 seconds (5 minutes to 24 hours) |
redirectUrl | O | String(256) | Post-payment redirect destination URL Format: Valid HTTP/HTTPS URL Maximum length: 256 characters Customer is redirected here after payment completion |
callbackUrl | O | String(256) | Webhook notification endpoint URL Format: Valid HTTP/HTTPS URL Maximum length: 256 characters Receives real-time transaction status updates |
Important Notes
1. Payment Method Selection: If paymentMethod
is not specified, Smilepayz will return a checkout page for customers to select their preferred payment method
2. OVO Payment Requirement: When paymentMethod
is set to OVO, the payer.phone
field is mandatory for payment verification and processing
Example Body – Transaction Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"orderNo": "2000102900000000000001", // Attention! format
"purpose": "transaction for business bla bla",
"paymentMethod": "QRIS",
"money": {
"currency": "IDR",
"amount": 10000
},
"merchant": {
"merchantId": "20001"
}
}
Response
HTTP Request
Field | Required | Type | Description |
---|---|---|---|
Content-Type | M | String | HTTP response content type specification Fixed value: application/json Indicates JSON response format |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00+07:00 |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
code | M | String | API response status code indicating operation result Format: Two-digit string Success: "00", Error: Other codes Used for programmatic response handling |
message | M | String | Human-readable response status description Format: UTF-8 encoded string Provides detailed information about the operation result Localized based on request language |
orderNo | M | String | Original merchant transaction identifier for reference Format: Same as request orderNo Used for transaction tracking and reconciliation |
tradeNo | O | String | Internal transaction reference number for system tracking Format: System-generated alphanumeric string Used for internal transaction management and support |
merchant | M | Object | Merchant information container with account details Contains merchant identification and account information See Merchant Model |
merchantId | M | String | Primary merchant identifier assigned by the platform Format: Alphanumeric string Used for transaction routing and settlement processing |
merchantName | O | String | Registered business name of the merchant Format: UTF-8 encoded string Displayed in payment interface and transaction records |
subMerchantId | O | String | Sub-merchant identifier for multi-level merchant structures Format: Alphanumeric string Required for sub-merchant transaction processing |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Shown in payment interface and transaction records |
money | M | Object | Transaction amount details with currency specification Contains confirmed payment amount and currency See Money Model |
currency | M | String | ISO 4217 currency code specification Fixed value: IDR (Indonesian Rupiah) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents IDR 20000 Range: 10000-999999999 |
transactionTime | M | String | ISO 8601 datetime format (yyyy-MM-ddTHH:mm:ss±HH:mm) Example: 2020-12-17T10:55:00+07:00 Timestamp when transaction was processed by the system |
channel | M | Object | Payment processing channel details and instructions Contains payment method, URLs, and additional data See Channel Model |
paymentMethod | O | String | Preferred payment method specification Format: Predefined payment method codes Examples: QRIS, W_DANA, CIMB, BCA If omitted, payment method selection page is displayed |
vaNumber | O | String | Virtual account number for bank transfer payments Format: Alphanumeric string Used for virtual account payment processing Example: 1419001332911089 |
qrString | O | String | QR code string or image URL for QRIS payments Format: QR code string or image URL Used for QR code generation and display Example: 00020101021226570011ID.DANA.WWW... or https://gateway.smilepayz.com/imge/xxx.img |
paymentUrl | O | String | Payment gateway URL for redirecting customers Format: Valid HTTP/HTTPS URL Used for customer payment redirection Example: https://gateway.smilepayz.com/cashier/#/loading?tradeNo=xxx |
status | O | String | Current transaction processing status Format: Predefined status codes Examples: PROCESSING, SUCCESS, FAILED See Status Model |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"channel": {
"additionalInfo": {},
"paymentMethod": "QRIS",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=101200112410241325417215",
"qrString": "00020101021226570011ID.DANA.WWW011893600915069533479502096953347950303UME51440014ID.CO.QRIS.WWW0215ID20243302250440303UME5204739953033605405100005802ID5919DP Mega Jaya Makmur6015Kota Jakarta Se61051221062750118pay_JXlS1MtBUk931660490011ID.DANA.WWW0425MER202110293394047135422905011630451D5"
},
"code": "00",
"merchant": {
"accountNo": "1102000000000000",
"merchantId": "20001",
"merchantName": "test"
},
"message": "Successful",
"money": {
"amount": 10000,
"currency": "IDR"
},
"orderNo": "2000102900000000000001",
"status": "PROCESSING",
"tradeNo": "101200012410241325417215",
"transactionTime": "2020-12-17T10:55:00+07:00"
}
{
"channel": {
"additionalInfo": {},
"paymentMethod": "QRIS",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=101200112410241325417215",
"qrString": "https://gatatway.smilepayz.com/imge/MER202110293394047135422905011630451D5.img"
},
"code": "00",
"merchant": {
"accountNo": "1102000000000000",
"merchantId": "20001",
"merchantName": "test"
},
"message": "Successful",
"money": {
"amount": 10000,
"currency": "IDR"
},
"orderNo": "2000102900000000000001",
"status": "PROCESSING",
"tradeNo": "101200012410241325417215",
"transactionTime": "2020-12-17T10:55:00+07:00"
}
{
"channel": {
"additionalInfo": {
"paymentUrl": "https://link.dana.id/pay?bizNo=20250102111212800110166129632333240×tamp=1735797716250&originSourcePlatform=IPG&mid=216620000383553341323&did=216650001014253563327&sid=216660001014426055320&sign=rzccMXnlSPX6WAyJRC1kAjSPOphhnctVDAIN5zSSn9ByT9cEuiYNZFhDhbHSfPjFq9NqeMURMk5xc%2F8W8zC4BDk1L5dm6QkXs3kDg5HFBtgOtgHmXesxhcRYPUXNwiLff6zuDpjVSi1jNXGoMR82S4l6KKpJIKKvsLXgHET%2B66Dxy%2FGQlH5tAKX5KXVqfMC%2FELRGOLq3WWToId%2B2ayYgnjBpOxCUF%2Fm%2FL9Nn8L%2BdUEPWpLTD%2FwBMN1tRrrsiIvOyHjl7AK3MB3zE7WrDfdHhq9s1z7cgoHpJkjnMXjGoMpMm0AD9IU2qoxkqQhGJQfCYcn4tA8930VR%2BggxOHPDhZg%3D%3D&forceToH5=false"
},
"paymentMethod": "W_DANA",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=101200192501021315010115"
},
"code": "00",
"merchant": {
"accountNo": "1102000000000000",
"merchantId": "20001",
"merchantName": "test"
},
"message": "Successful",
"money": {
"amount": 10000,
"currency": "IDR"
},
"orderNo": "2000102900000000000001",
"status": "PROCESSING",
"tradeNo": "101200012410241325417215",
"transactionTime": "2020-12-17T10:55:00+07:00"
}
{
"channel": {
"additionalInfo": {},
"paymentMethod": "CIMB",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=101200112501021320331776",
"vaNumber": "1419001332911089"
},
"code": "00",
"merchant": {
"accountNo": "11020011202402290943",
"merchantId": "20011",
"merchantName": "bradytest123www"
},
"message": "Successful",
"money": {
"amount": 20000,
"currency": "IDR"
},
"orderNo": "200110437c4152cbe45cebcacd25",
"status": "PROCESSING",
"tradeNo": "101200112501021320331776",
"transactionTime": "2025-01-02T13:20:34+07:00"
}
Notification/Callback
HTTP Request
Field | Required | Type | Description |
---|---|---|---|
Content-Type | M | String | HTTP notification content type specification Fixed value: application/json Indicates JSON payload format |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | M | String | Digital signature for notification verification Format: Base64 encoded signature Used to verify notification authenticity See how to check this value |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
orderNo | M | String | Original merchant transaction identifier for reference Format: Same as request orderNo Used for transaction reconciliation and tracking |
tradeNo | M | String | Internal transaction reference number for system tracking Format: System-generated alphanumeric string Used for internal transaction management and support |
merchantId | M | String | Primary merchant identifier for transaction routing Format: Alphanumeric string Used for merchant identification and settlement processing |
merchantName | M | String | Registered merchant business name for display Format: UTF-8 encoded string Shown in transaction records and reports |
subMerchantId | O | String | Sub-merchant identifier for multi-level structures Format: Alphanumeric string Included when sub-merchant is involved in transaction |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Included when sub-merchant is involved in transaction |
paymentMethod | M | String | Payment method used for transaction processing Format: Predefined payment method codes Examples: BCA, QRIS, DANA, CIMB Indicates the actual payment channel used |
transactionTime | M | String | ISO 8601 datetime format (yyyy-MM-ddTHH:mm:ss±HH:mm) Timestamp when transaction was completed by payment provider |
status | M | String | Final transaction processing status Format: Predefined status codes Examples: SUCCESS, FAILED Indicates the final outcome of the transaction See Status Model |
money | M | Object | Final transaction amount details with currency Contains confirmed payment amount and currency May differ from request amount due to fees or adjustments See Money Model |
currency | M | String | ISO 4217 currency code specification Fixed value: IDR (Indonesian Rupiah) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents IDR 20000 Range: 10000-999999999 |
payer | O | String | Customer information provided during payment Format: Customer data object Contains payer details when available See Payer Model |
Return
Important
Notification please return only string SUCCESS
{
"merchantId": "20001",
"merchantName": "test",
"money": {
"amount": 100000,
"currency": "IDR"
},
"orderNo": "2000102900000000000001",
"paymentMethod": "QRIS",
"status": "SUCCESS",
"tradeNo": "101200012410241325417215",
"transactionTime": "2020-12-17T10:55:00+07:00"
}