Skip to main content

Request

smilepayz teamsAbout 2 min

HTTP Request

Service Code90
NameAPI transaction pay in
Versionv2.0
HTTP MethodPOST
Path{Base URL}/v2.0/transaction/pay-in

Header Parameters

AreaFieldAttributeTypeDescription
HeaderContent-TypeMStringapplication/json
X-TIMESTAMPMStringyyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00
X-SIGNATUREMStringsignature
X-PARTNER-IDMStringmerchant ID

Tips

  • X-SIGNATURE = SHA256withRSA(private_key, stringToSign)
  • private_key is merchant rsa private key
  • stringToSign = X-TIMESTAMP + "|" + merchant_secret + "|" + minify(requestBody)
  • minify(requestBody) is convert the request parameters to JSON string, and then remove line breaks, spaces, and other escape characters
  • we provide some development languages minify and SHA256withRSA demo. please refer to signature

Body Parameters

AreaFieldAttributeTypeDescription
BodyorderNoMString(32)unique no. length between 6 and 32
purposeMString(64)purpose
merchantMObjectMerchant
moneyMObjectMoney
areaCNumberArea
additionalParamCObjectAdditionalReq
redirectUrlOString(256)Redirect to customer url
callbackUrlOString(256)the notify address that to notify merchant the final order status
productDetailOString(128)production description
itemDetailListOList(Object)ItemDetail
billingAddressOObjectBillingAddress
shippingAddressOObjectShippingAddress
paymentMethodOStringPaymentMethod
payerOObjectPayer
receiverOObjectReceiver
expiryPeriodONumberexpiryPeriod (in seconds, 3600)

OrderNo Format

important

  • orderNo format:
    • Only numbers and letters are supported, no special symbols are allowed
  • paymentMethod can be empty. If empty will return cashier link.

Example Body – Transaction Request:

POST {Base URL}/v2.0/transaction/pay-in HTTP/1.2

Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
  "orderNo": "2000102900000000000001",
  "purpose": "transaction for business bla bla",
  "productDetail": "electronics. Apple",
  "additionalParam": {},
  "paymentMethod": "BRI",
  "money": {
    "currency": "IDR",
    "amount": 10000
  },
  "itemDetailList": [
    {
      "name": "Apple Mac",
      "quantity": 1,
      "price": 10000
    }
  ],
  "billingAddress": {
    "countryCode": "10",
    "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"
  },
  "payer": {
    "name": "Betty",
    "email": "[email protected]",
    "phone": "62895359978010"
  },
  "receiver": {
    "name": "Vincent.CH",
    "phone": "62895359978010",
    "email": "[email protected]"
  },
  "expiryPeriod": 3600,
  "area": "10"
}
Last update: