การรับชำระเงิน (Pay-In · บราซิล)API Pay-in ภูมิภาค บราซิล (BRL ). ดู Payment methods 。
Request POST /v2.0/transaction/pay-in
Request Path: sandbox: https://sandbox-gateway.smilepayz.com/v2.0/transaction/pay-in production: https://gateway.smilepayz.com/v2.0/transaction/pay-in
Field Required Type Description Content-TypeM String application/json request body.X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. Brazil BRT −03:00). X-SIGNATUREM String Signature of JSON body (see product Signature doc). X-PARTNER-IDM String Your merchantID (alphanumeric).
Body Parameters Field Required Type Description orderNoM String(32) Merchant-unique id, 6–32 alphanumeric. purposeM String(64) Memo to payer, 1–64 UTF-8 chars. merchantM Object Wraps merchantId and optional sub-merchant fields. merchantId M String Smilepayz merchantId for this call. merchantName O String UTF-8 merchant display name. subMerchantId O String Sub-merchant ID. subMerchantName O String UTF-8 name for subMerchantId. moneyM Object Currency plus amount for this transaction. currency M String ISO currency code for this call. amount M Number BRL integer minor units (e.g. 5000 = BRL 50.00). payerO Object pixType / pixAccount. Recommended. pixType O String Recommended. CPF or CNPJ when sent; pixAccount O String Recommended. Digits only, 11 (CPF) or 14 (CNPJ). paymentMethodM String Code (see Payment methods doc). expiryPeriodO Number Session TTL seconds, default 3600, max 86400 unless noted. redirectUrlO String(256) HTTPS post-pay return URL, max 256 chars. callbackUrlO String(256) HTTPS async status URL, max 256 chars.
Example Body – Transaction Request: Header PIX Body
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-03:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"orderNo" : "20011db2773a6fb2542dfa5cb34c" ,
"purpose" : "Online order — São Paulo" ,
"merchant" : {
"merchantId" : "20011"
} ,
"money" : {
"currency" : "BRL" ,
"amount" : 5000
} ,
"payer" : {
"pixType" : "CPF" ,
"pixAccount" : "12345678901"
} ,
"paymentMethod" : "PIX" ,
"redirectUrl" : "https://www.google.com/webhp"
}
Responses HTTP Request Field Required Type Description Content-TypeM String application/json response or callback body.X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Body Parameters Field Required Type Description codeM String 00 success, other values error.messageM String UTF-8 human-readable result line. orderNoM String Merchant-unique id, 6–32 alphanumeric. tradeNoO String Smilepayz tradeNo for this order. merchantM Object Wraps merchantId and optional sub-merchant fields. merchantId M String Smilepayz merchantId for this call. merchantName O String UTF-8 merchant display name. subMerchantId O String Sub-merchant ID. subMerchantName O String UTF-8 name for subMerchantId. accountNo O String Settlement accountNo if gateway returns it. moneyM Object Currency plus amount for this transaction. currency M String ISO currency code for this call. amount M Number BRL integer minor units (e.g. 5000 = BRL 50.00). transactionTimeM String yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. BRT −03:00).channelM Object Channel payload (paymentUrl, qrString, …). paymentMethod M String Code (see Payment methods doc). paymentUrl M String Cashier URL to open for the payer. qrString O String PIX or channel copy-paste string if returned. statusO String Order or payment status enum value.
Header Response (string cashier) Response (web cashier)
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-03:00
{
"code" : "00" ,
"message" : "Successful" ,
"orderNo" : "20011db2773a6fb2542dfa5cb34c" ,
"tradeNo" : "131200112412130836186234" ,
"merchant" : {
"merchantId" : "20011" ,
"merchantName" : "Smilepayz Demo Store" ,
"accountNo" : "11320011202402290943"
} ,
"money" : {
"currency" : "BRL" ,
"amount" : 5000
} ,
"transactionTime" : "2024-12-12T23:36:19-03:00" ,
"channel" : {
"paymentMethod" : "PIX" ,
"paymentUrl" : "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=131200112412130836186234" ,
"qrString" : "00020101021226800014br.gov.bcb.pix2558pix.delbank.com.br/v2/cob/vcharge1f6aed0623644c24bbdc174ce5204000053039865802BR5907DELBANK6007ARACAJU62070503***6304BC39"
} ,
"status" : "PROCESSING"
}
{
"code" : "00" ,
"message" : "Successful" ,
"orderNo" : "20011db2773a6fb2542dfa5cb34c" ,
"tradeNo" : "131200112412130836186234" ,
"merchant" : {
"merchantId" : "20011" ,
"merchantName" : "Smilepayz Demo Store" ,
"accountNo" : "11320011202402290943"
} ,
"money" : {
"currency" : "BRL" ,
"amount" : 5000
} ,
"transactionTime" : "2024-12-12T23:36:19-03:00" ,
"channel" : {
"paymentMethod" : "PIX" ,
"paymentUrl" : "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=131200112412130836186234" ,
"qrString" : ""
} ,
"status" : "PROCESSING"
}
Notification/Callback HTTP Request Field Required Type Description Content-TypeM String application/json response or callback body.X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm X-SIGNATUREM String Callback body signature (see Callback signature guide ).
Body Parameters Field Required Type Description orderNoM String Merchant-unique id, 6–32 alphanumeric. tradeNoM String Smilepayz tradeNo for this order. merchantIdM String Smilepayz merchantId for this call. merchantNameM String UTF-8 merchant display name. subMerchantIdO String Sub-merchant ID. subMerchantNameO String UTF-8 name for subMerchantId. paymentMethodM String Code (see Payment methods doc). transactionTimeM String Format: yyyy-MM-ddTHH:mm:ss statusM String Order or payment status enum value. moneyM Object Currency plus amount for this transaction. currency M String ISO currency code for this call. amount M Number BRL integer minor units (e.g. 5000 = BRL 50.00).
Return Important
Respond with the string SUCCESS only.
Request Response
{
"orderNo" : "20011db2773a6fb2542dfa5cb34c" ,
"tradeNo" : "131200112412130836186234" ,
"merchantId" : "20011" ,
"merchantName" : "Smilepayz Demo Store" ,
"subMerchantId" : "" ,
"subMerchantName" : "" ,
"paymentMethod" : "PIX" ,
"transactionTime" : "2024-12-12T23:36:19-03:00" ,
"status" : "SUCCESS" ,
"money" : {
"currency" : "BRL" ,
"amount" : 5000
}
}
ถัดไป
การโอนจ่าย (Pay-out · บราซิล)