Api Payin
About 2 min
Request
The term refers to an application programming interface (API) that facilitates "pay-in" transactions.
This can include a variety of payment methods sources such as
pix
other digital
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 | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | M | String | Focus:How to signature |
X-PARTNER-ID | M | String | merchant ID |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
orderNo | M | String(32) | unique no. Focus OrderNumber Rule |
purpose | M | String(64) | purpose |
merchant | M | Object | Model Object Merchant |
money | M | Object | Model Object Money |
payer | M | Object | Model Object Payer |
area | M | Number | Fixed Value: 13 |
paymentMethod | O | String | Model Object PaymentMethod |
expiryPeriod | O | Number | expiryPeriod (second); default:3600 |
redirectUrl | O | String(256) | Redirect to customer url |
callbackUrl | O | String(256) | notify address |
productDetail | O | String(128) | production description |
- If paymentMethod not pass. smilepayz will return a checkout page
- If paymentMethod is PIX and only PIX. you can pass the payer's CPF or CNPJ number into payer#pixAccount.
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
{
"area": 13,
"merchant": {
"merchantId": "20011"
},
"payer": {
"pixAccount": "48982488880"
},
"money": {
"amount": 200,
"currency": "BRL"
},
"orderNo": "200110edbb466abb04682968b40",
"paymentMethod": "PIX",
"purpose": "Purpose For Transaction from Java SDK",
"redirectUrl": "https://www.google.com/webhp"
}
Response
HTTP Request
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
code | M | String | success = "00" |
message | M | String | response message |
orderNo | M | String | transaction unique no |
merchant | M | Object | Model Object Merchant |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss-03:00 eg: 2020-12-17T10:55:00-03:00 |
money | M | Object | Model Object Money |
channel | M | Object | channel information Channel |
tradeNo | O | String | smilepayz orderNo |
status | O | String | Model Object Status |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"channel": {
"additionalInfo": {},
"paymentMethod": "PIX",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=131200112412130836186234",
"qrString": "00020101021226800014br.gov.bcb.pix2558pix.delbank.com.br/v2/cob/vcharge1f6aed0623644c24bbdc174ce5204000053039865802BR5907DELBANK6007ARACAJU62070503***6304BC39"
},
"code": "00",
"merchant": {
"accountNo": "11320011202402290943",
"merchantId": "20011",
"merchantName": "bradytest123www"
},
"message": "Successful",
"money": {
"amount": 20,
"currency": "BRL"
},
"orderNo": "20011db2773a6fb2542dfa5cb34c",
"status": "PROCESSING",
"tradeNo": "131200112412130836186234",
"transactionTime": "2024-12-12T23:36:19-03:00"
}
{
"channel": {
"additionalInfo": {
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/transfer"
},
"paymentMethod": "PIX",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=131200112412130836186234",
"qrString": ""
},
"code": "00",
"merchant": {
"accountNo": "11320011202402290943",
"merchantId": "20011",
"merchantName": "bradytest123www"
},
"message": "Successful",
"money": {
"amount": 20,
"currency": "BRL"
},
"orderNo": "20011db2773a6fb2542dfa5cb34c",
"status": "PROCESSING",
"tradeNo": "131200112412130836186234",
"transactionTime": "2024-12-12T23:36:19-03:00"
}
Notification
HTTP Request
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | M | String | how to check this value |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
orderNo | M | String | merchant transaction unique no |
tradeNo | M | String | smilepayz trade no. |
merchantId | M | String | merchant id |
merchantName | M | String | merchant name |
subMerchantId | O | String | sub merchant id |
subMerchantName | O | String | sub merchant name |
paymentMethod | M | String | payment method. eg:CPF |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss |
status | M | String | Model Object Status |
money | M | Object | Model Object Money |
payer | O | String | Model Object Payer |
Return
Important
Notification please return only string SUCCESS
{
"merchantId": "20001",
"merchantName": "test",
"money": {
"amount": 100000,
"currency": "BRL"
},
"orderNo": "2000102900000000000001",
"status": "SUCCESS",
"tradeNo": "101200012410241325417215",
"transactionTime": "2020-12-17T10:55:00+07:00"
}
SUCCESS