Wallet
Cómo utilizar Wallet para realizar un payin en Brasil.
Post
https://gateway-test.transfersmile.com/trade/pay
Payin por Wallet
Este endpoint te permite usar wallet para realizar un payin en Brasil.
Parameters
Header
| Content-Type* | string | application/json; chartset=UTF-8 | 
| Authorization* | string | Basic Base($app_id:$security_key) | 
Body
| app_id* | string | Id de app creado en dashboard  - Max. 32 chars -  | 
| timestamp* | string | yyyy-MM-dd HH:mm:ss  - Max. 19 chars -  | 
| out_trade_no* | string | ID dado por el merchant en su sistema  - Max. 64 chars -  | 
| method* | string | Valor fijo: Wallet | 
| channel* | string | Tipo de Wallet - AME or PicPay -  | 
| order_currency* | string | Valor fijo: BRL | 
| order_amount* | string | Monto de pago - ver here for limits -  | 
| subject* | string | Razón de pago o título  - Max. 128 chars -  | 
| content* | string | Detalle de razón de pago o título. Se mostrará en el recibo del banco.  - Max. 255 chars -  | 
| notify_url* | string | Donde transfersmile enviará la notificación | 
| return_url | string | web URL de redirección al finalizar checkout | 
| buyer_id* | string | Usuario id de merchant | 
| customer.name* | string | Nombre de usuario | 
| customer.phone | string | Teléfono de usuario | 
| customer.email* | string | Correo de usuario | 
| customer.identify.number* | string | Número de identificación de usuario; - 11 digitos CPF o 14 digitos CNPJ -  | 
| customer.identify.type* | string | Tipo de identificación de usuario; - CPF or CNPJ -  | 
| address.zip_code | string | zip code | 
| address.state | string | provincia | 
| address.city | string | ciudad | 
| address.street_number | string | número de calle | 
| address.street | string | calle | 
| website_url | string | URL de website de merchant - Max. 128 chars -  | 
Responses
| 200 | submit exitoso | 
AME
{
    "code": "10000",
    "msg": "Success",
    "trade_no": "2022010110293900083",
    "out_trade_no": "202201010354003",
    "web_url": "",
    "trade_status": "PROCESSING",
    "wallet_url": "https://api.hml.amedigital.com/api/qrcode?qrcode=eyJ0eXBlIjoiUEFZTUVOVCIsIm9yZGVyX2lkIjoiZTI0OTMyNTYtZDIyOC00ODhlLWFjZDctOWU5OWU4NjJhNGE2In0=", //redirect the user to AME web.
    "app_link_url": "amedigital://payment?qrcode=eyJ0eXBlIjoiUEFZTUVOVCIsIm9yZGVyX2lkIjoiZTI0OTMyNTYtZDIyOC00ODhlLWFjZDctOWU5OWU4NjJhNGE2In0=" //redirect the user to AME app.
}
PicPay
{
    "code": "10000",
    "msg": "Success",
    "trade_no": "2022010110293900083",
    "out_trade_no": "202201010354002",
    "web_url": "",
    "trade_status": "PROCESSING",
    "wallet_url": "https://app.picpay.com/checkout/NjIxOGE4ZDc3MzY5MDQ0MGU2MDRiNGM5" //If the user use mobile, wallet_url will redirect the user to Picpay app.
}
| 400 | duplicar out_trade_no | 
{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "duplicate-out_trade_no",
    "sub_msg": "out_trade_no is duplicate"
}
Consejos
Consejos de pago para el usuario
- wallet_url deberá usarse para redirigir a los usuarios a la página de la billetera. Los usuarios finalizarán el pago en la página de la billetera.
 
Ejemplo
curl --location --request POST 'https://gateway-test.transfersmile.com/trade/pay' \
--header 'Authorization: Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
    * "app_id": "162************38",
    * "out_trade_no": "202201010354003",
    * "method": "Wallet",
    * "channel": "PicPay",
    * "order_amount": "12.01",
    * "order_currency": "BRL",
    * "subject": "trade pay test",
    * "content": "trade pay test conent",
    * "notify_url": "http://merchant/callback/success",
      "return_url": "https://www.merchant.com",
    * "buyer_id": "buyer_0101_0001",
    * "timestamp": "2022-01-01 03:54:01",
      "timeout_express":"1c",
    * "customer" : {
    *     "identify": {
    *         "type": "CPF",
    *         "number": "50284414727"
          },
    *     "name": "Test User Name",
    *     "email": "[email protected]"
      }
      }'
Consejos
Nota: 162********38 es el test ID de transfersmile para prueba en sandbox, y MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ== es el token de autorización asociado con el app ID de prueba.
Aviso
Favor utilizar tu propio app_id y genera tu propio authorization token al realizar pruebas.
