Checkout Page (E-com)
How to use Pagsmile Checkoutpage to submit a payin.
Payin by using Pagsmile checkout page
POST
https://gateway-test.pagsmile.com/trade/create
This endpoint allows you to submit a payin by using Pagsmile checkout page
Headers
Content-Type*
string
application/json; chartset=UTF-8
Authorization*
string
Basic Base($app_id:$security_key)
Request Body
app_id*
string
created app's id at dashboard
- Max. 32 chars -
customer.identify.number*
string
User's identification number
method
string
Add this object to show only the selected method. For instance, “method”: “PIX” will only show the PIX method. To show all the methods do not add this object in the request body. Check here for all methods
out_trade_no*
string
ID given by the merchant in their system - Max. 64 chars -
notify_url*
string
Where Pagsmile will send notification to
customer.identify.type*
string
User's identification type
- check here to check identify type for different countries -
timestamp*
string
yyyy-MM-dd HH:mm:ss - Max. 19 chars -
subject*
string
payment reason or item title
- Max. 128 chars -
content*
string
payment reason detail or item detail. This will be shown on the bank bill.
- Max. 255 chars -
buyer_id*
string
merchant user's id
address.postal_code*
string
zip code
address.street*
string
street
address.street_number*
string
street number
address.city*
string
city
address.state*
string
state
channel
string
only use when method = Wallet
customer.phone*
string
User's phone
customer.email*
string
User's email
customer.name*
string
User's name
address.country*
string
country
trade_type*
string
fixed value: WEB
billing.address.postal_code*
string
billing zip code
billing.address.country*
string
billing country
billing.address.state*
string
billing state
billing.address.city*
string
billing city
billing.address.street*
string
billing street
billing.address.street_number*
string
billing street number
billing.address.neighborhood*
string
billing neighborhood
billing.identification.number*
string
billing identify number
billing.identification.type*
string
billing identify type
address.neighborhood*
string
neighborhood
billing.phone*
string
billing phone
billing.email*
string
billing email
billing.name*
string
billing name
shipping.address.street_number*
string
shipping street number
shipping.idenification.type*
string
shipping identify type
shipping.identification.number*
string
shipping identify number
shipping.address.neiborhood*
string
shipping neighborhood
shipping.address.street*
string
shipping street
shipping.address.city*
string
shipping city
shipping.address.state*
string
shipping state
shipping.address.country*
string
shipping country
shipping.address.postal_code*
string
shipping zip code
shipping.phone*
string
shipping phone
shipping.email*
string
shipping email
shipping.name*
string
shipping name
products.quanity*
string
product quantity
products.name*
string
product name - Max. 200 chars -
products.url*
string
product url - Max. 2000 chars -
products.description*
string
product description - Max. 1000 chars -
return_url
sring
web redirect url when payment is finish
timeout_express
string
m(minutes), h(hours), d(days), c(always end in current day).
Used to control the expiration time of submitting an order (from initial to processing). (90m in default, max 15d)
version*
string
fixed value: 2.0
cancellation_express
string
m(minutes), h(hours), d(days). The value must be an integer.
Used to cancel an order. Ex: 90m Used to control the expiration time of a processing order.
Example
Returnurl is not required in the request parameters. However if needed, you can overwrite it by appending 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=encodeURIComponent({$return_url})
Note: 162************38 is pagsmile's test app id for sandbox, and MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ== is authorization token associated with the test app id.
Please use your own app_id and generate your own authorization token when testing.
Last updated