Request
Tips
Welcome to the smilepayz Pay API documentation page. Integrate this API to start transacting using smilepayz on your
site.
smilepayz API is a third party API that functions as a payment gateway system . smilepayz API helps you in terms of
receiving online payments from your customers. With just one smilepayz API, you can accept payments from a variety of
available payment methods.
Tips
smilepayz API is a restful Web service, which enables programmatic communication between you and smilepayz payment
system. You can easily integrate to any of your internet-capable system (Web, App, PoS, IoT, etc.) and can fully build &
customize the payment UI, on your side without smilepayz hosted payment UI. smilepayz Core API is suitable for medium
size as well as large size businesses.
HTTP Request
Tips
Header Format Structure Components – cash out
Service Code | 91 |
---|---|
Name | API disbursement cash out |
Version | 1.0 |
HTTP Method | POST |
Path | .../{version}/disbursement/cash-out |
Header Parameters
Tips
API Header Format Structure for Disbursement cash out:
Area | Field | Attribute | Type | Description |
---|---|---|---|---|
Header | Content-Type | Mandatory | String | String represents indicate the media type of the resource (e.g. application/json, application/pdf) |
Authorization | Mandatory | String | String starts with keyword “Bearer ” followed by access_token (e.g. Bearer eyJraWQiOi...Jzc29zIiiY) | |
X-TIMESTAMP | Mandatory | String | Merchant's current local time in yyyy-MM-ddTHH:mm:ssTZD format | |
X-SIGNATURE | Mandatory | String | Represents signature of a request.Identify Signature Type used | |
ORIGIN | Optional | String | Origin Domain www.yourdomain.com | |
X-PARTNER-ID | Mandatory | String | Merchant_ID. Unique ID for a partner as merchant_id | |
X-EXTERNAL- ID | Mandatory | String | Numeric String. Reference number that should be unique in the same day | |
CHANNEL-ID | Mandatory | String | Fixed value: 95221 |
Notes:
X-SIGNATURE
- HMAC_SHA512 (merchantSecret, stringToSign) with formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+
AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp- Complete URL endpoint including all parameters in related URL (Relative path, example: Path in general information
of each API service)- For the minify(Request Body) parameter, in case there is no Request Body then an empty string is used.
- The signature string is generated from string to sign above with applying HMAC_SHA512 hashing using secret key which
given by smilepayz, and then encode the result to base64.- Put the signature string into HTTP header “ X-SIGNATURE“ when call smilepayz’s API.
- The merchantSecret refer to Payin desc.
Tips
Example Header – Disbursement Request:
POST .../v1.0/disbursement/cash-out HTTP/1.2
Content-type: application/json
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a"
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
ORIGIN: www.hostname.com
X-PARTNER-ID: 20001
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
Body Parameters
Area | Field | Attribute | Type | Description |
---|---|---|---|---|
Body | orderNo | Mandatory | String(32) | String transaction Unique ID |
purpose | Mandatory | String(64) | String The reason to transaction | |
productDetail | Optional | String(128) | String The subject matter of this transaction | |
additionalParam | Optional | Object | Object additional parameter | |
itemDetailList | Mandatory | List(ItemDetail) | Object The products for this transaction. Refer to Data ItemDetail | |
billingAddress | Optional | Address | Object Address for billing. Refer to Data BillingAddress | |
shippingAddress | Optional | Address | Object Address for shipping,Refer to Data ShippingAddress | |
money | Mandatory | Money | Object Net amount of the transaction. Refer to Data money | |
merchant | Mandatory | Merchant | Object merchant information. Refer to Data merchant | |
paymentMethod | Mandatory | String(6) | String Payment option which shows the provider of this payment. Refer to Data paymentMethod | |
cashAccount | Mandatory | String(32) | String Payment payout account. If DANA 888xxxxxxx | |
payer | Optional | Payer | Json String Disbursement initiator. Refer to Data payer | |
receiver | Optional | Receiver | Json String Trading beneficiaries. Refer to Data receiver | |
area | Conditional | Integer | Area code Which region's api are you requesting? if null the default value is 10 that belongs to INDONESIA, Others Refer to Data Area |
Warning
cashAccount
fields. If paymentMethod is DANA please make sure to use the format
of 8xxxxxxxxx
.
Tips
Example Body – Disbursement Request:
POST .../v1.0/disbursement/cash-out HTTP/1.2
Content-type: application/json
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a"
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
ORIGIN: www.hostname.com
X-PARTNER-ID: 20001
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"area": "10",
"orderNo": "2020102900000000000001",
"purpose": "transaction for business bla bla",
"productDetail": "electronics. Apple",
"additionalParam": {},
"paymentMethod": "BRI",
"cashAccount": "32473289839938",
"money": {
"currency": "IDR",
"amount": 10000
},
"itemDetailList": [
{
"name": "Apple",
"quantity": 1,
"price": 10000
}
],
"billingAddress": {
"countryCode": "Indonesia",
"city": "Djakarta",
"address": "djakarta #1002873",
"postalCode": "10045",
"phone": "62895359978010"
},
"shippingAddress": {
"countryCode": "Indonesia",
"city": "Djakarta",
"address": "djakarta #1002873",
"postalCode": "10045",
"phone": "62895359978010"
},
"merchant": {
"merchantId": "20001",
"merchantName": "Betty",
"accountNo": "22102014422"
},
"payer": {
"name": "Betty",
"email": "[email protected]",
"phone": "62895359978010"
},
"receiver": {
"name": "Vincent.CH",
"phone": "62895359978010",
"email": "[email protected]"
}
}