Skip to main content

Request

smilepayz teamsAbout 3 min



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 Code91
NameAPI disbursement cash out
Version1.0
HTTP MethodPOST
Path.../{version}/disbursement/cash-out

Header Parameters



Tips

API Header Format Structure for Disbursement cash out:

AreaFieldAttributeTypeDescription
HeaderContent-TypeMandatoryStringString represents indicate the media type of the resource (e.g. application/json, application/pdf)
AuthorizationMandatoryStringString starts with keyword “Bearer ” followed by access_token (e.g. Bearer eyJraWQiOi...Jzc29zIiiY)
X-TIMESTAMPMandatoryStringMerchant's current local time in yyyy-MM-ddTHH:mm:ssTZD format
X-SIGNATUREMandatoryStringRepresents signature of a request.Identify Signature Type used
ORIGINOptionalStringOrigin Domain www.yourdomain.comopen in new window
X-PARTNER-IDMandatoryStringMerchant_ID. Unique ID for a partner as merchant_id
X-EXTERNAL- IDMandatoryStringNumeric String. Reference number that should be unique in the same day
CHANNEL-IDMandatoryStringFixed value: 95221

Notes: X-SIGNATURE

  1. HMAC_SHA512 (merchantSecret, stringToSign) with formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+
    AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
  2. Complete URL endpoint including all parameters in related URL (Relative path, example: Path in general information
    of each API service)
  3. For the minify(Request Body) parameter, in case there is no Request Body then an empty string is used.
  4. 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.
  5. Put the signature string into HTTP header “ X-SIGNATURE“ when call smilepayz’s API.
  6. 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



AreaFieldAttributeTypeDescription
BodyorderNoMandatoryString(32)String transaction Unique ID
purposeMandatoryString(64)String The reason to transaction
productDetailOptionalString(128)String The subject matter of this transaction
additionalParamOptionalObjectObject additional parameter
itemDetailListMandatoryList(ItemDetail)Object The products for this transaction. Refer to Data ItemDetail
billingAddressOptionalAddressObject Address for billing. Refer to Data BillingAddress
shippingAddressOptionalAddressObject Address for shipping,Refer to Data ShippingAddress
moneyMandatoryMoneyObject Net amount of the transaction. Refer to Data money
merchantMandatoryMerchantObject merchant information. Refer to Data merchant
paymentMethodMandatoryString(6)String Payment option which shows the provider of this payment. Refer to Data paymentMethod
cashAccountMandatoryString(32)String Payment payout account. If DANA 888xxxxxxx
payerOptionalPayerJson String Disbursement initiator. Refer to Data payer
receiverOptionalReceiverJson String Trading beneficiaries. Refer to Data receiver
areaConditionalIntegerArea 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]"
  }
}

Last update: