Pagsmile
  • Introduction
  • Reference
  • Payin API
    • Environments
    • All-In-One Checkout
      • Checkout Page (General)
      • Checkout Page (E-com)
    • Direct integration
      • Argentina
        • DebitCard
        • DEBIN
        • Khipu
        • QRCode
        • Rapipago
        • ❌Wallet
        • ❌Bank Transfer
        • ❌PagoFacil
      • Brazil
        • Credit Card
        • Credit Card Pre Auth
          • Capture
          • Void
          • Pagsmile JavaScript
        • Pix
        • Static Pix
        • Virtual PIX
          • Create Virtual PIX Account
          • Query Virtual PIX Account
          • Notification of Virtual PIX Account Payment
        • OpenFinance
        • Lottery
        • Boleto
        • Wallet
        • ❌Credit Card
        • ❌Deposit Express
      • Mexico
        • Credit Card
        • SPEI
        • Virtual SPEI
          • Create Virtual SPEI Account
          • Query Virtual SPEI Account
          • Cancel Virtual SPEI Account
          • Check Usage of Virtual SPEI Account
          • Notification of Virtual Account Payment
        • CoDi
        • OXXOPay
        • Cash
        • Wallet
        • ❌OXXO
      • Colombia
        • PSE
        • Transfiya
        • Efecty
        • Bancolombia
        • SuRed
        • Wallet
        • Gana
        • ❌Baloto
      • Chile
        • Webpay
        • Khipu
        • Pago46
        • Bank Transfer
        • ❌Cash
        • Wallet
      • Peru
        • Credit Card
        • Bank Transfer
        • Cash
        • QRCode
        • ❌Pagoefectivo
      • Ecuador
        • Credit Card
        • Bank Transfer
        • Cash
      • Costa Rica
        • Cash
        • BNCR
        • ❌Bank Transfer
      • Panama
        • Cash
        • ❌Bank Transfer
      • Guatemala
        • Cash
        • ❌Bank Transfer
      • Bolivia
        • ❌Bank Transfer
      • Paraguay
        • ❌Bank Transfer
      • Uruguay
        • ❌Bank Transfer
      • El Salvador
        • ❌Cash
      • Nigeria
        • Bank Transfer
      • China
        • Wallet
        • Vault
      • Hongkong
        • Wallet
      • Taiwan
        • Bank Transfer
        • OTC
        • PostTransfer
        • Wallet
      • Indonesia
        • Bank Transfer
        • QRIS
        • Wallet
      • South Korea
        • Wallet
        • Bank Transfer
        • Virtual Account
      • Singapore
        • Wallet
      • Malaysia
        • Wallet
        • Vault
      • Philippines
        • AlipayPlus
        • QRPH
        • Wallet
        • Vault
      • Thailand
        • Wallet
      • Vietnam
        • QRCode
      • Türkiye
        • Wallet
      • Egypt
        • Credit Card
        • Wallet
        • Cash
        • Kiosk
      • Saudi Arabia
        • Credit Card
      • Kuwait
        • Credit Card
      • Qatar
        • Credit Card
      • Oman
        • Credit Card
      • United Arab Emirates
        • Credit Card
      • Bahrain
        • Credit Card
      • Kazakhstan
        • Credit Card
      • Uzbekistan
        • Credit Card
      • Europe
        • Credit Card
        • Wallet
      • North America
        • Credit Card
        • Wallet
    • Notification
      • Security
    • Recurring Payment
      • Support Target and Currency
    • PCI Direct Integration
      • Tokenization
      • Create Card Payment
      • Authorization
      • Capture
      • Void
    • Account Balance
    • Payin Detail
    • Refund
    • Plug-in & Tools
      • Pagsmile JavaScript
      • Pagsmile SDK
      • Get CreditCard Token
      • Supported Bank List Query
      • Installment Detail Query
      • Payin SFTP Report
    • Data
      • Bank list
        • Bank in Colombia
      • Country Code
      • Data for test (Sandbox)
      • Icon of methods
      • Payment Method
      • Payin Status
    • API Code
  • Payout API
    • Environments
    • Security
    • Submit a payout
      • Pagsmile Wallet
        • WebView Example
        • H5 Authorization
        • Native App Authorization
        • Send Prizes
      • PayPal
        • ❌Supported Countries
      • Argentina
        • Wallet
        • BankTransfer
      • Bolivia
        • ❌BankTransfer
      • Brazil
        • Pix
        • BankTransfer
      • Chile
        • Wallet
        • BankTransfer
      • Colombia
        • Wallet
        • Transfiya
        • BankTransfer
      • Costa Rica
        • ❌BankTransfer
      • Ecuador
        • BankTransfer
      • Guatemala
        • ❌BankTransfer
      • Mexico
        • SPEI
      • Panama
        • ❌BankTransfer
      • Peru
        • BankTransfer
        • Regions in Peru
      • Turkey
        • Wallet
        • BankTransfer
      • Uruguay
        • ❌BankTransfer
      • Vietnam
        • BankTransfer
    • Notification
    • Payout DryRun
    • Checkout Page
    • Account Balance
    • Payout Proof
    • Payout Status
    • Payout Bank List
    • Payout List
    • Payout Detail
    • Payout SFTP Report
    • Payment Method
    • Data for test
    • Bank Code
      • Bank in Argentina
      • Bank in Bolivia
      • Bank in Brazil
        • Bank in Brazil (TED)
      • Bank in Chile
      • Bank in Colombia
      • Bank in Costa Rica
      • Bank in Ecuador
      • Bank in Guatemala
      • Bank in Mexico
      • Bank in Panama
      • Bank in Peru
      • Bank in Uruguay
    • API Code
  • Issuing Card API
    • Environments
    • Security
    • Common
    • Business
      • Partner
        • Create Deposit Order
        • Query Deposit Result
        • Transfer
        • Query Partner Balance
        • Query Partner Transactions
      • Cardholder
        • Create Cardholder
        • Update Cardholder
        • Query Cardholder
        • Upload Supporting Documents
        • Create Corporation Cardholder
        • Update Corporation Cardholder
        • Query Corporation Cardholder
      • Card
        • Apply For a Card
        • Query Apply Result
        • Query Card Information
        • Topup a Card
        • Card Balance Return
        • Query Card Balance
        • Update a Card
          • Revoke
          • Block a Card
          • UnBlock a Card
        • Retrieve Password
        • Query Transaction Detail information
        • Query Transactions
        • Query Authorizations
        • Card Limit
          • Create Card Limit
          • Update Card Limit
          • Query Card Limit
          • Query Default Card Limit
          • Query Remaining Card Limit
        • Query Available Card BINs
      • Webhook
        • Manage Webhook URL
          • Create Webhook URL
          • Update Webhook URL
          • Query Webhook URL
        • Apply Card Result Notification
        • Card Status Notification
        • Cardholder Audit Status Notification
        • Authorization Details Notification
        • OTP Information Notification
    • Data
      • Dictionary Item
        • CustomerType
        • CustomerAuditStatus
        • Customer Codes
        • Gender
        • IdType
        • CustomerStatus
        • RiskLevel
        • CardOrderStatus
        • CardType
        • CardSchema
        • CardStatus
        • TransactionType
        • TransationStatus
        • CardLog.logType
        • AccountStatus
        • AuthStatus
        • AuthSettleStatus
        • ProcessStatus
        • FeeMethod
        • FeeStatus
        • NotificationStatus
        • Currency
        • CustomerFileType
        • WebhookType
        • ResponseCode
        • CHARSETS
        • CountryCode
      • Trade Currency
  • Remittance API
    • Environments
    • Security
    • Common
    • Business
      • Onboard
        • Create Corporation
        • Update Corporation
        • Query Corporation
        • Create Individual
        • Update Individual
        • Query Individual
        • Add Shop
        • Delete Shop
        • Query Shops
      • Collection
        • Apply VA
        • Query Apply VA Result
        • Apply VA Result Notification
        • Collection Notification
        • Query Collections
        • Create Material
        • Upload Material Document
        • Submit Material Document
        • Query Materials
        • Material Audit Result Notification
        • Link Material and Collection
        • Query Linked Materials By Collection
        • Link Result Notification
      • Exchange
        • Query Support Currency Pairs
        • Query Quote
        • Create Exchange Order
        • Query Exchange Orders
      • Payment
        • Query Payment Fields
        • Add Payee
        • Update Payee
        • Delete Payee
        • Query Payee Detail
        • Create Payment Order
        • Query Payment Orders
        • Payment Result Notification
      • Withdrawal
        • Add Withdrawal Account
        • Update Withdrawal Account
        • Delete Withdrawal Account
        • Query Withdrawal Account Detail
        • Create Withdrawal Order
        • Query Withdrawal Orders
        • Withdrawal Result Notification
      • Transfer
        • Internal transfer
      • Account
        • Query Account Balance
        • Query Account Transactions
      • Partner
        • Create Topup Order
        • Query Topup Result
        • Query Partner Balance
        • Query Partner Transactions
      • Webhook
        • Webhook Common
        • Manage URL
          • Create Webhook URL
          • Update Webhook URL
          • Query Webhook URL
    • Data
      • Dictionary Item
        • Business Type
        • Business Category
        • Webhook Type
        • All Collection Status
        • Transaction Type
        • Transaction Status
        • Gender
        • Id Type
        • File Type
        • Fixed Side
        • Order Status
        • Pay Type
        • Payee Type
        • Currency
        • CHARSETS
        • Country Code
      • Trade Currency
  • E-com Platform
    • Shopify
    • Shoplazza
    • WIX
    • Woocommerce
  • Country Info
  • OTHER
    • Changelog
Powered by GitBook
On this page

Was this helpful?

  1. Payin API

Refund

Method
Refund Type
Require user_info
Require bank_info

Pix

Refund to original source

N/A (Refund to original source)

N/A (Refund to original source)A

Boleto

Refund through banktransfer

Require

Not Require. System will send email to user when bank_info is empty

Lottery

Refund through banktransfer

Require

Not Require. System will send email to user when bank_info is empty

SPEI

Refund through SPEI banktransfer

Require

Require

Wallet

Refund to original source

N/A (Refund to original source)

N/A (Refund to original source)

CreditCard

Refund to original source

N/A (Refund to original source)

N/A (Refund to original source)

Request Base URL

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

EndPoints

  /trade/refund

Request Header

Parameter
Required
Description

Content-Type

Recommended

Application/json

Authorization

Yes

Basic Base64(app_id:security_key)

Request Body (JSON format)

Parameter
Type
Required
Max Length(or Default Value)
Description

app_id

string

yes

32

App's ID is in dashboard

timestamp

string

yes

19

yyyy-MM-dd HH:mm:ss

trade_no

string

yes

64

Pagsmile trade NO.(can NOT be empty with out_trade_no at same time)

out_trade_no

string

yes

64

ID given by the merchant in their system (can NOT be empty with trade_no at same time)

out_request_no

string

no

16

refund request unique NO.(can NOT be empty when request a partial refund)

refund_currency

string

yes

3

refund_amount

decimal

yes

0.01 ~ 99999999999999.99

refund_reason

string

no

128

user_info.identify.number

string

yes (not require for PIX, Wallet and CreditCard)

16

User ID

user_info.identify.type

string

no

16

User's ID type

user_info.name

string

yes (not require for PIX, Wallet and CreditCard)

64

User's name

user_info.email

string

yes (not require for PIX, Wallet and CreditCard)

64

User's email

user_info.phone

string

no

64

User's phone

bank_info.bank_id

string

no (required for SPEI)

64

bank_info.bank_name

string

no (required for SPEI)

64

User's bank name to receive the refund

bank_info.agency

string

no

64

User's bank agency to receive the refund

bank_info.type

string

no

64

User's bank type to receive the refund

bank_info.number

string

no (required for SPEI)

64

User's bank number to receive refund. For SPEI refund, fill CLABE number.

Request Sample

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",
    * "timestamp": "",
    * "content": "content",
      "trade_no": "trade_no", //Require when "out_trade_no" is empty
      "out_trade_no": "", //Require when "trade_no" is empty
      "out_request_no": "", //Require for partial refund
    * "refund_amount": 10,
    * "refund_currency": "BRL",
      "out_trade_no": "{{$randomUUID}}",
      "user_info": {
          "identify": {
              "number": "**********",
              "type": "document type"
          },
          "name": "refund name",
          "email": "refund@email.com" //If bank_info is empty, system will send email to this address to collect bank_info
      },
      "bank_info": {
          "bank_id": "****",
          "bank_name": "bank name",
          "number": "**********"
      }
}'

Http Response (JSON format)

Parameter
Type
Description

code

string

Return code

msg

string

Return msg

sub_code

string

Return sub code(only error)

sub_msg

string

Return sub msg(only error)

out_trade_no

string

trade_no

string

refund_currency

string

refund_amount

decimal

refund_status

string

Return Sample (Success)

{
    "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 Sample (Fail)

{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "invalid-signature",
    "sub_msg": "invalid signature"
}
PreviousPayin DetailNextPlug-in & Tools

Last updated 6 months ago

Was this helpful?

User's bank ID. Check

here