TransfersmileTransfersmile
  • EN
  • PT
  • ES
  • EN
  • PT
  • ES
  • Introduction
  • Payin API
    • Environments
    • Direct integration
      • Brazil
        • Credit Card
        • Pix
        • Lottery
        • Boleto
        • Deposit Express
        • Wallet
    • Notification
      • Security
    • Payin Detail
    • Refund
    • Plug-in & Tools
      • transfersmile JavaScript
      • transfersmile SDK
      • Get CreditCard Token
      • Supported Bank List Query
      • Installment Detail Query
    • Data
      • Payment Method
      • Data for test (Sandbox)
      • Payin Status
      • Icon of methods
    • API Code
  • Payout API
    • Environments
    • Security
    • Submit a payout
      • transfersmile Wallet
        • WebView Example
        • H5 Authorization
        • Native App Authorization
        • Send Prizes
      • Brazil
        • Pix
        • BankTransfer
    • Notification
    • Payout DryRun
    • Account Balance
    • Payout Status
    • Payout List
    • Payout Detail
    • Payment Method
    • Data for test
    • Bank Code
      • Bank in Brazil
    • API Code

Direct integration

API Direct Payment

Request Base URL

Test Environment : https://gateway-test.transfersmile.com
Prod Environment : https://gateway.transfersmile.com

EndPoints

/trade/pay

Request Header

ParameterRequiredDescription
Content-Typerecommendapplication/json
AuthorizationyesBasic Base64(app_id:security_key)

Request Body (JSON format)

ParameterTypeRequiredMax Length(or Default Value)Description
app_idstringyes32created app's id at dashboard
timestampstringyes19yyyy-MM-dd HH:mm:ss
out_trade_nostringyes64ID given by the merchant in their system
methodstringno32Payment Methods​
channelstringno32sub channel(only use at method 'Wallet')
order_currencystringyes3BRL for brazil
order_amountdecimalyes0.01 ~ 99999999999999.99request payment amount
subjectstringyes128payment reason or item title
contentstringYes255payment reason detail or item detail. . This will be shown on the bank bill.
notify_urlstringyesIPN URL to merchant(start with http)
buyer_idstringyesmerchant user's id
timeout_expressstringno90mm(minutes), h(hours), d(days), c(always end in currency day)
tokenstringno​​required for CreditCard​
fingerprintstringno​​required for CreditCard​
issuerstringnoissuer of credit card(required for CreditCard)
installmentsintegerno1installments for CreditCard
bankstringno​bank code, required for DepositExpress (itau,santander,bradesco,banco-do-brasil,caixa) Cash (Use bank_id from Bank Query);BankTransfer (Use bank_id fromBank Query); Khipu (Use bank_id from Bank Query);
language_codestringno​language code, required for Cash, BankTransfer. (Use language_code from Bank query)
customer.namestringyes​user's name
customer.emailstringyes​user's email
customer.phonestringyes​user's mobile phone number
customer.identify.numberstringyes​user's ID number
customer.identify.typestringyes​user's ID type
address.zip_codestringyeszip code
address.statestringyes​state
address.citystringyes​city
address.street_numberstringyes​street1 number
address.streetstringyes​street1
address.neighborhoodstringno​street2
user_ipstringno​user's IP address(required for CreditCard)
website_urlstringno128merchant website URL

Request Sample

curl --location --request POST 'https://gateway.transfersmile.com/trade/create' \
--header 'Authorization: Basic Base64(appid:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_id": "app_id",
    "content": "content",
    "method": "Boleto",
    "notify_url": "notify_url",
    "order_amount": 10,
    "order_currency": "BRL",
    "out_trade_no": "{{$randomUUID}}",
    "subject": "subject",
    "timeout_express": "1h",
    "timestamp": "{{datetime}}",
    "customer": {
      "name": "name",
      "email": "email",
   "phone": "phone",
   "identify": {
  "number":"number",
  "type":"type“,
   }
      ...
    },
    "address": {
      "zip_code": "84043450",
      "state": "Parana",
      "city": "Ponta Grossa",
      "street"; "Colônia Dona Luíza",
      "street_number": "18",
    },
    "user_ip": "127.0.0.1"
}'

Http Response (JSON format)

ParameterTypeDescriptionMethodText
codestringreturn code​
​ msgstringreturn msg​
​ sub_codestringreturn sub code(only error)​
​ sub_msgstringreturn sub msg(only error)​​
out_trade_nostringrequest out_trade_no​
​ trade_nostringtransfersmile trade NO.​
​ trade_statusstring​​
​ pay_urlstringRedirect users to the payment URLArgentina: Khipu, Bank Transfer; Brazil: PIX, Lottery, Boleto, DepositExpress;Mexico: SPEI, OXXO, OXXOPay;Colombia: PSE, Efecty, Bancolombia, SuRed, Wallet ClaroPay, Gana;Chile: Khipu, Pago46, Bank Transfer, Cash, Wallet Chek;Peru: Bank Transfer, Cash;Ecuador: Bank Transfer, Cash;Costa Rica: Cash, BNCR;Panama, Guatemala: Cash;Bolivia, Paraguay, Uruguay: Bank Transfer;
​ referencestringThe value of reference is the ticket number that the user needs to use for paymentArgentina: Bank Transfer, Rapipago, PagoFacil;Mexico: SPEI, CoDi, Cash;Colombia: Bancolombia, SuRed, Gana;Chile: Cash;Peru: Bank Transfer, Cash;Costa Rica: Cash, BNCR;Panama, Guatemala: Cash;Bolivia, Paraguay, Uruguay: Bank Transfer
​ barcodestringUse the value of barcode to generate a scanable barcode can help users to make payment fasterArgentina: Rapipago,PagoFacil;Brazil: Lottery, Boleto;Mexico: OXXO, OXXOPay
​ qr_codestringQR codeBrazil: PIX;Mexico: CoDi
​ qr_code_urlstringSystem generated images of qr code which can be used directly on merchant website depending on needs.Brazil: PIX
​ qr_code_imgstringSystem generated images of qr code which can be used directly on merchantwebsite depending on needs.Brazil: PIX
​ provider_ownerstringbank info : account owner; only in DepositExpress​
​ provider_owner_documentstringbank info : account owner document; only in DepositExpress​
​ provider_agencystringbank info : account agency; only in DepositExpress​
​ provider_numberstringbank info : account number; only in DepositExpress​
​ partner_codestringThe value of reference is the ticket number that the user needs to use for paymentColombia: Bancolombia, SuRed, Gana;Costa Rica: BNCR
​ bank_namestringbank info : bank nameBrazil: DepositExpress;Mexico: SPEI
​ bank_nostringUsers only need to use the value of bank_no to finish payment at loterica storeBrazil: Lottery
​ bank_codestringThe ticket number that the user needs to use for paymentBrazil: Boleto
​ clabestringUnique automatically generated bank accountOnly SPEI Mexico
​ wallet_urlstringRedirect users to the wallet payment pageOnly in Wallet payment method Brazil: AME, PicPay;Colombia: Wallets (Tpaga, Dale, Daviplata, Movii, Nequi, Rappipay)
​ app_link_urlstringRedirect users to the wallet app payment page (for mobile walle application)For mobile wallet app use only Brazil: AME;Chile: Mach, Vita
​ instructionstringTake the recipient's bank details from the response parameter - "instruction" and present to usersBolivia, Paraguay, Uruguay: Bank Transfer
​

Return Code (Success)

{
    "code": "10000",
    "msg": "Success",
    "out_trade_no": "{out_trade_no}",
    "trade_no": "{trade_no}",
    "trade_status": "PROCESSING",
    "pay_url": "https://checkout-testv2.transfersmile.com/checkout?prepay_id=XX",
    "barcode": "{barcode}",
    "qr_code": "{qr_code}",
    "provider_owner": "{provider_owner}",
    "provider_owner_document": "{provider_owner_document}",
    "provider_agency": "{provider_agency}",
    "provider_number": "{provider_number}",
    "wallet_url": "{wallet_url}",
    "app_link_url": "{app_link_url}"
}

Return Code (Fail)

{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "invalid-signature",
    "sub_msg": "invalid signature"
}

Attention

Return_url is not required in the request parameters, you can also append the return_url after the web_url when redirect: http://checkout.transfersmile.com?prepay_id={$prepay_id} ↓↓↓ http://checkout.transfersmile.com?prepay_id={$prepay_id}&return_url={$return_url}

Prev
Environments
Next
Notification