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

Direct integration

API Direct Payment

Request Base URL

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

EndPoints

  /trade/pay

Request Header

Parameter
Required
Description

Content-Type

recommend

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

created app's id at dashboard

timestamp

string

yes

19

yyyy-MM-dd HH:mm:ss

out_trade_no

string

yes

64

ID given by the merchant in their system

method

string

no

32

channel

string

no

32

sub channel(only use at method 'Wallet')

order_currency

string

yes

3

BRL for brazil

order_amount

decimal

yes

0.01 ~ 99999999999999.99

request payment amount

subject

string

yes

128

payment reason or item title

content

string

Yes

255

payment reason detail or item detail. . This will be shown on the bank bill.

notify_url

string

yes

IPN URL to merchant(start with http

buyer_id

string

yes

merchant user's id

timeout_express

string

no

90m

m(minutes), h(hours), d(days), c(always end in currency day)

token

string

no

fingerprint

string

no

issuer

string

no

issuer of credit card(required for CreditCard)

installments

integer

no

1

installments for CreditCard

bank

string

no

bank code, required for

language_code

string

no

customer.name

string

yes

user's name

customer.email

string

yes

user's email

customer.phone

string

yes

user's mobile phone number

customer.identify.number

string

yes

user's ID number

customer.identify.type

string

yes

user's ID type

address.zip_code

string

yes

zip code

address.state

string

yes

state

address.city

string

yes

city

address.street_number

string

yes

street1 number

address.street

string

yes

street1

address.neighborhood

string

no

street2

user_ip

string

no

user's IP address(required for CreditCard)

website_url

string

no

128

merchant website URL

region

string

required if using Global app

Request Sample

curl --location --request POST 'https://gateway.pagsmile.com/trade/pay' \
--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",
    "region": "BRA"
}'

Http Response (JSON format)

Parameter
Type
Description
Method

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

request out_trade_no

trade_no

string

Pagsmile trade NO.

trade_status

string

pay_url

string

Redirect users to the payment URL

Argentina: 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;

reference

string

The value of reference is the ticket number that the user needs to use for payment

Argentina: 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

barcode

string

Use the value of barcode to generate a scanable barcode can help users to make payment faster

Argentina: Rapipago, PagoFacil;

Brazil: Lottery, Boleto;

Mexico: OXXO, OXXOPay

qr_code

string

QR code

Brazil: PIX;

Mexico: CoDi

qr_code_url

string

System generated images of qr code which can be used directly on merchant website depending on needs.

Brazil: PIX

qr_code_img

string

System generated images of qr code which can be used directly on merchant website depending on needs.

Brazil: PIX

provider_owner

string

bank info : account owner; only in DepositExpress

provider_owner_document

string

bank info : account owner document; only in DepositExpress

provider_agency

string

bank info : account agency; only in DepositExpress

provider_number

string

bank info : account number; only in DepositExpress

partner_code

string

The value of reference is the ticket number that the user needs to use for payment

Colombia: Bancolombia, SuRed, Gana;

Costa Rica: BNCR

bank_name

string

bank info : bank name

Brazil: DepositExpress;

Mexico: SPEI

bank_no

string

Users only need to use the value of bank_no to finish payment at loterica store

Brazil: Lottery

bank_code

string

The ticket number that the user needs to use for payment

Brazil: Boleto

clabe

string

Unique automatically generated bank account

Only SPEI Mexico

wallet_url

string

Redirect users to the wallet payment page

Only in Wallet payment method Brazil: AME, PicPay;

Colombia: Wallets (Tpaga, Dale, Daviplata, Movii, Nequi, Rappipay)

app_link_url

string

Redirect users to the wallet app payment page (for mobile walle application)

For mobile wallet app use only Brazil: AME;

Chile: Mach, Vita

instruction

string

Take the recipient's bank details from the response parameter - "instruction" and present to users

Bolivia, 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.pagsmile.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.pagsmile.com?prepay_id={$prepay_id}

↓↓↓

http://checkout.pagsmile.com?prepay_id={$prepay_id}&return_url={$return_url}

PreviousCheckout Page (E-com)NextArgentina

Last updated 3 months ago

Was this helpful?

DepositExpress (itau,santander,bradesco,banco-do-brasil,caixa) Cash (Use bank_id from ); BankTransfer (Use bank_id from); Khipu (Use bank_id from );

language code, required for Cash, BankTransfer. (Use language_code from )

region of the payment. The format is ISO 3166-1 alpha-3 - ARG, BRA, etc. Check -

required for CreditCard
required for CreditCard
Payment Methods
Bank Query
Bank Query
Bank Query
Bank query
here