Skip to main content

API PAYIN

smilepayz teamsAbout 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

FieldRequiredTypeDescription
Content-TypeMStringHTTP content type specification
Fixed value: application/json
Required for proper request parsing
X-TIMESTAMPMStringISO 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-SIGNATUREMStringDigital signature for request authentication. See Signature Generation
X-PARTNER-IDMStringUnique merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
Please enter merchantID

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Unique transaction identifier for merchant tracking
Format: Alphanumeric characters only
Length: 6-32 characters
Must be unique within merchant scope
purposeMString(64)Human-readable transaction description
Format: UTF-8 encoded string
Length: 1-64 characters
Used for transaction history and reporting
merchantMObjectMerchant identification and business information container
Contains primary and sub-merchant details
Required for transaction routing and settlement
    merchantIdMStringPrimary merchant identifier assigned by the platform
Format: Alphanumeric string
Used for transaction routing and settlement processing
    merchantNameOStringRegistered business name of the merchant
Format: UTF-8 encoded string
Displayed in payment interface and transaction records
    subMerchantIdOStringSub-merchant identifier for multi-level merchant structures
Format: Alphanumeric string
Required for sub-merchant transaction processing
    subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Shown in payment interface and transaction records
moneyMObjectTransaction amount and currency specification container
Defines payment value and monetary unit
Required for payment processing and settlement
    currencyMStringISO 4217 currency code specification
Fixed value: IDR (Indonesian Rupiah)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents IDR 20000
Range: 10000-999999999
payerCObjectCustomer payment information container
Required for specific payment methods (e.g., OVO)
Used for payment verification and customer communication
    phoneCStringCustomer mobile phone number for payment verification
Format: International format with country code
Example: +6281234567890
Required for OVO wallet payments
paymentMethodOStringPreferred payment method specification
Format: Predefined payment method codes
Examples: QRIS, W_DANA, CIMB, BCA
If omitted, payment method selection page is displayed
expiryPeriodONumberPayment session timeout duration in seconds
Format: Integer value
Default: 3600 seconds (1 hour)
Range: 300-86400 seconds (5 minutes to 24 hours)
redirectUrlOString(256)Post-payment redirect destination URL
Format: Valid HTTP/HTTPS URL
Maximum length: 256 characters
Customer is redirected here after payment completion
callbackUrlOString(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

Response

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringHTTP response content type specification
Fixed value: application/json
Indicates JSON response format
X-TIMESTAMPMStringISO 8601 datetime format with timezone offset
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00+07:00

Body Parameters

FieldRequiredTypeDescription
codeMStringAPI response status code indicating operation result
Format: Two-digit string
Success: "00", Error: Other codes
Used for programmatic response handling
messageMStringHuman-readable response status description
Format: UTF-8 encoded string
Provides detailed information about the operation result
Localized based on request language
orderNoMStringOriginal merchant transaction identifier for reference
Format: Same as request orderNo
Used for transaction tracking and reconciliation
tradeNoOStringInternal transaction reference number for system tracking
Format: System-generated alphanumeric string
Used for internal transaction management and support
merchantMObjectMerchant information container with account details
Contains merchant identification and account information
See Merchant Model
    merchantIdMStringPrimary merchant identifier assigned by the platform
Format: Alphanumeric string
Used for transaction routing and settlement processing
    merchantNameOStringRegistered business name of the merchant
Format: UTF-8 encoded string
Displayed in payment interface and transaction records
    subMerchantIdOStringSub-merchant identifier for multi-level merchant structures
Format: Alphanumeric string
Required for sub-merchant transaction processing
    subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Shown in payment interface and transaction records
moneyMObjectTransaction amount details with currency specification
Contains confirmed payment amount and currency
See Money Model
    currencyMStringISO 4217 currency code specification
Fixed value: IDR (Indonesian Rupiah)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents IDR 20000
Range: 10000-999999999
transactionTimeMStringISO 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
channelMObjectPayment processing channel details and instructions
Contains payment method, URLs, and additional data
See Channel Model
    paymentMethodOStringPreferred payment method specification
Format: Predefined payment method codes
Examples: QRIS, W_DANA, CIMB, BCA
If omitted, payment method selection page is displayed
    vaNumberOStringVirtual account number for bank transfer payments
Format: Alphanumeric string
Used for virtual account payment processing
Example: 1419001332911089
    qrStringOStringQR 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.imgopen in new window
    paymentUrlOStringPayment gateway URL for redirecting customers
Format: Valid HTTP/HTTPS URL
Used for customer payment redirection
Example: https://gateway.smilepayz.com/cashier/#/loading?tradeNo=xxxopen in new window
statusOStringCurrent 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

Notification/Callback

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringHTTP notification content type specification
Fixed value: application/json
Indicates JSON payload format
X-TIMESTAMPMStringISO 8601 datetime format with timezone offset
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00+07:00
X-SIGNATUREMStringDigital signature for notification verification
Format: Base64 encoded signature
Used to verify notification authenticity
See how to check this value

Body Parameters

FieldRequiredTypeDescription
orderNoMStringOriginal merchant transaction identifier for reference
Format: Same as request orderNo
Used for transaction reconciliation and tracking
tradeNoMStringInternal transaction reference number for system tracking
Format: System-generated alphanumeric string
Used for internal transaction management and support
merchantIdMStringPrimary merchant identifier for transaction routing
Format: Alphanumeric string
Used for merchant identification and settlement processing
merchantNameMStringRegistered merchant business name for display
Format: UTF-8 encoded string
Shown in transaction records and reports
subMerchantIdOStringSub-merchant identifier for multi-level structures
Format: Alphanumeric string
Included when sub-merchant is involved in transaction
subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Included when sub-merchant is involved in transaction
paymentMethodMStringPayment method used for transaction processing
Format: Predefined payment method codes
Examples: BCA, QRIS, DANA, CIMB
Indicates the actual payment channel used
transactionTimeMStringISO 8601 datetime format (yyyy-MM-ddTHH:mm:ss±HH:mm)
Timestamp when transaction was completed by payment provider
statusMStringFinal transaction processing status
Format: Predefined status codes
Examples: SUCCESS, FAILED
Indicates the final outcome of the transaction
See Status Model
moneyMObjectFinal transaction amount details with currency
Contains confirmed payment amount and currency
May differ from request amount due to fees or adjustments
See Money Model
    currencyMStringISO 4217 currency code specification
Fixed value: IDR (Indonesian Rupiah)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents IDR 20000
Range: 10000-999999999
payerOStringCustomer 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"
}
Last update: