Reembolso
Request Base URL
Test Environment : https://gateway-test.pagsmile.com
Prod Environment : https://gateway.pagsmile.com
EndPoints
/trade/refund
Request Header
Content-Type
Recomendado
Application/json
Authorization
Si
Basic Base64(app_id:security_key)
Request Body (JSON formato)
app_id
string
Si
32
App ID en dashboard
timestamp
string
Si
19
yyyy-MM-dd HH:mm:ss
trade_no
string
Si
64
NO. de transacción de Pagsmile(No puede estar vacío con out_trade_no simultaneamente)
out_trade_no
string
Si
64
ID dada por Merchant en sistema (no puede estar vacía con trade_no simultaneamente)
out_request_no
string
no
16
NO. de solicitud de reembolso único(No puede estar vacío al solicitar reembolso parcial)
refund_currency
string
Si
3
refund_amount
decimal
Si
0.01 ~ 99999999999999.99
refund_reason
string
no
128
user_info.identify.number
string
Si
16
ID de usuario
user_info.identify.type
string
no
16
Tipo de ID de usuario
user_info.name
string
Si
64
Nombre de usuario
user_info.email
string
Si
64
Email de usuario
user_info.phone
string
no
64
Teléfono de usuario
bank_info.bank_id
string
no
64
ID de banco del usuario para recibir reembolso
bank_info.bank_name
string
no
64
Nombre de banco del usuario para recibir reembolso
bank_info.agency
string
no
64
Agencia de banco del usuario para recibir reembolso
bank_info.type
string
no
64
Tipo de banco del usuario para recibir reembolso
bank_info.number
string
no
64
Teléfono del banco del usuario para recibir reembolso
Ejemplo de Request
curl --location --request POST 'https://gateway.pagsmile.com/trade/refund' \
--header 'Authorization: Basic Base64(appid:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "app_id",
"content": "content",
"trade_no": "trade_no",
"refund_amount": 10,
"refund_currency": "BRL",
"out_trade_no": "{{$randomUUID}}",
"user_info": {
"identify": {
"number": "number",
"type": "type"
},
"name": "name",
"email": "email"
}
}'
Http Response (JSON formato)
code
string
Return code
msg
string
Return msg
sub_code
string
Return sub code(sólo error)
sub_msg
string
Return sub msg(sólo error)
out_trade_no
string
trade_no
string
refund_currency
string
refund_amount
decimal
refund_status
string
Return ejemplo (Exitoso)
{
"code": "10000",
"msg": "Success",
"out_trade_no": "{out_trade_no}",
"trade_no": "{trade_no}",
"refund_currency": "{refund_currency}",
"refund_amount": "{refund_amount}",
"refund_status": "{refund_status}"
}
Return ejemplo (Fallido)
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "invalid-signature",
"sub_msg": "invalid signature"
}
Last updated