Payment API
Tips
- All requests are
Post
requests, and the data format isjson
- API Documentation for Payment Collection via PIX
Brief Description
- Payment collection method using PIX.
Request URL
/v1/paypro/payin
Request Method
- POST
Header
Header | Required | Type | Description |
---|---|---|---|
merchantNo | Yes | string | - |
sign | Yes | string | Generate the sign by sorting all body fields by their first letter into key1=value1key2=value2 , then use the app secret as salt for MD5 encryption. The final sign should be in lowercase letters. |
Body
Parameter Name | Required | Type | Description |
---|---|---|---|
timestamp | Yes | string | Timestamp (e.g., 1715941383720) |
tradeNo | Yes | string | Transaction number (should be unique, suggested format: YYYYMMDDHHMMSS + random number) |
amount | Yes | string | Amount |
name | Yes | string | Payer's name |
identityType | Yes | string | Payer's ID type (CPF) |
userIdentity | Yes | string | User's CPF information (11-digit number) |
notifyUrl | Yes | string | Asynchronous callback URL |
returnUrl | No | string | Cashier page redirect URL, remove escape characters “\”, reference format: https://www.abc.com/. If not provided, it will redirect to the system's default success page. |
remark | Yes | string | Remark |
Request Parameter Example
{
"timestamp": "1724142041682",
"tradeNo": "test_00000007",
"amount": "300",
"name": "123",
"identityType": "CPF",
"userIdentity": "2348937596",
"notifyUrl": "http://abc.com/notify",
"returnUrl": "http://abc.com/callback_page",
"remark": "000000"
}
Response Result
Parameter Name | Required | Type | Description |
---|---|---|---|
msg | Yes | string | Request result (Returning "success" only indicates the request was successful; it should not be used for merchant-side logic) |
code | Yes | string | Request response code (Returning "0000" only indicates the request was successful; it should not be used for merchant-side logic) |
timestamp | Yes | string | Transaction timestamp |
success | Yes | string | Transaction result |
data | Yes | Object | Response object |
data.platFormTradeNo | Yes | string | PayPro transaction number, unique |
data.status | Yes | string | Request result. The merchant can use this for logical processing. "0000" indicates transaction success, "0015" indicates processing, and other codes are error codes that can be treated as failures. |
data.desc | Yes | string | Error description |
data.amount | Yes | string | Payment amount |
data.paymentLink | Yes | string | Payment link, i.e., the cashier URL |
data.payParam | Yes | string | Payment information (can be used to generate a payment QR code) |
Successful Response Example
{
"msg": "success",
"code": "0000",
"timestamp": 1719829837779,
"success": true,
"data": {
"platFormTradeNo": "5286e98841194687a95d25b5f3be346d",
"status": "0015",
"desc": "CREDIT_INPROGRESS",
"amount": "5000",
"paymentLink": "https://casher-in.paypro.com/#/?orderNo=PI-0610163070368473667348485",
"payParam": "00020101021226910014br.gov.bcb.pix2569api.developer.btgpactual.com/v1/p/v2/5ef8ec7172034688909253ad3a17f8465204000053039865802BR5922Bellapay Negocios Ltda6009Sao Paulo61080120100562070503***6304FAF9"
}
}