Cash
(payProduct=03)
Payment Process

1. The user places an order on the merchant's website and selects Cash payment;
2. The merchant initiates a Cash payment request to Supefina;
3. Supefina returns the Cash payment code information;
4. The merchant will display the payment code to the user;
5. The user saves the payment code information to the supported offline outlets for payment;
6. The payment is successful;
7. Supefina notifies the merchant that the order is successful.
The address of the request
SandBox
POST
https://api.supefina.tech/api/supefina/transactions/payin
Formal environment
POST
https://api.supefina.net/api/supefina/transactions/payin
Request parameters
Request header
Content-Type
application/json
Request body
orderAmount
String
Yes
The amount of the order The unit peso, which needs to be divided into decimal places, supports two decimal places
merId
String
Yes
Merchant ID Merchant ID acquisition path: Supefina Merchant Background - Merchant Management - Basic Information - Merchant ID
expireTimeL
long
No
Expiration time: no need to pass,
fixed at 7*24*60*60=604800 seconds expiration.
description
String
Yes
Description of the order
merOrderNo
String
Yes
Merchant order number
requestData
Object
Yes
Additional parameters
businessUnit
String
Yes
Business Units
name
String
Yes
The name of the business unit
key
String
Yes
A unique identifier for a business unit
showHtmlFlag
String
Yes
Display the HTML payment page
Use only Cash QR code: 0
Receipts page URL: 1
customerEmail
String
No
Customer's email address
appName
String
No
The name of the app principal
nonceStr
String
Yes
Random strings The length cannot exceed 32 bits
Sample request
{
"countryId": "MEX",
"orderAmount": 20,
"payProduct": "03",
"merId": "8302170356300088",
"expireTimeL": 259200,
"description": "transas12121dasdasda",
"merOrderNo": "123123111",
"requestData": {
"businessUnit": {
"name": "12",
"key": "111"
},
"showHtmlFlag": "1"
},
"customerEmail": "[email protected]",
"currency": "MXN",
"appName": "Supefina",
"sign": "FAF48F7A7ECE404B29FC1C008B37882F",
"nonceStr": "12312",
"callbackUrl": "http://test.com"
}
Note: For the generation of the sign field with the requestData field it is necessary to do it with this format:
&requestData={“businessUnit”:{“name”:“nameExample”,“key”:“111”},‘showHtmlFlag’:“1”}
Response parameters
data
Object
Response data
amount
BigDecimal
The amount of the order
fee
BigDecimal
Advance handling fee will be charged
merCode
String
Merchant ID
merOrderNo
String
Merchant order number
supefinaOrderNo
String
Supefina order number
transactionStatus
String
Order status
Whether the initiation status of the order is successful or not has nothing to do with the real transaction status of the order.
00
: The order is successful
04
: Failed to place an order
url
String
Transaction links
msg
String
Response description
Sample response
{
"code": "200",
"data": {
"amount": 12.00,
"fee": 0.24,
"merCode": "8302170356300088",
"merOrderNo": "202405110916-test",
"supefinaOrderNo": "202405110301004c5323cc5a0285",
"transactionStatus": "01",
"url": "https://h5.supefina.net/pagos?token=18c0nOqSQw9lsf%2Bpe5JcVC/fwkBgU="
},
"msg": "success "
}
Callback notifications
Submission method:POST
amount
String
The amount of the order
countryId
String
Country number Reference: Dictionary table - country number
fee
String
Advance handling fee will be charged
merId
String
Merchant ID
merOrderId
String
Merchant order number
nonceStr
String
Random strings The length cannot exceed 32 bits
realityAmount
String
Paid-in amount
realityFee
String
Actual handling fee
reference
String
Payment Reference Payment code
sign
String
signature
supefinaOrderId
String
Supefina order number
transactionType
String
The type of transaction
01
: Payin
02
: Payout
An example of a callback notification
{
"amount": "10.00",
"countryId": "MEX",
"fee": "1.00",
"merId": "8302170356300088",
"merOrderId": "123123111",
"nonceStr": "6cc9bb58-f087-40be-adef-e7b5f2",
"realityAmount": "10.00",
"realityFee": "1.00",
"reference": "591768",
"sign": "9BC9D098D5D35C512C9E2DA8CD62C51E",
"status": "01",
"supefinaOrderId": "202405110301004c5323cc5a0285",
"transactionType": "01"
}
Callback notification response
After the merchant successfully receives the callback, it needs to return the specified string synchronously: SUCCESS does not return or returns other content by default, and the notification fails As:
public String test(){
return "SUCCESS";
}
Última actualización