Recurring Payment
Recurring Payment
Request Base URL
EndPoints
Request Header
Content-Type
Recommended
application/json
Authorization
Yes
Basic Base64(app_id:security_key)
Request Parameters (JSON format)
app_id
string
yes
32
App's ID is in dashboard
out_trade_no
string
yes
64
Given by the Merchant (Is in their system)
method
string
yes
32
Credit Card or Wallet
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
trade_type
string
yes
WEB
Response content type, WEB will return a checkout URL
timeout_express
string
yes
90m
m(minutes), h(hours), d(days), c(current day)
format
string
yes
JSON
Only JSON supported
timestamp
string
yes
19
yyyy-MM-dd HH:mm:ss
version
string
yes
2.0
Fix to 2.0
notify_url
string
yes
IPN URL to merchant (start with http)
return_url
string
yes
Web page return URL to merchant (start with http)
buyer_id
string
yes
Merchant user's ID
interval
string
yes
1M
D(day), W(week), M(month), Y(year)
quantity
number
yes
0
Quantity of recurring
trial_period
string
yes
Trial period
trial_amount
decimal
yes
> 0
Trial amount (when trial_amount is not blank)
Request Sample
Http Response (JSON format)
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.
web_url
string
Checkout URL
Return Code (Success)
Return Code (Fail)
IPN Notifications
Follow the general IPN notifications guide to receive our IPN notification messages, meantime with recurring sub orders, we will also send the parameter period
to specific current period of the order.
Attention!!!
return_url is not in the request parameters, if needed, just append the return_url after the web_url when redirect:
http://checkout.pagsmile.com?prepay_id={$prepay_id}
Cancel Recurring Payment
Request Base URL
EndPoints
Request Header
Content-Type
Recommended
application/json
Authorization
Yes
Basic Base64(app_id:security_key)
Request Parameters (JSON format)
app_id
string
yes
32
App's ID is in dashboard
timestamp
string
yes
19
yyyy-mm-dd HH:mm:ss
version
string
yes
2.0
fix to 2.0
out_trade_no
string
yes
64
Given by the Merchant (Is in their system)
Request Sample
Http Response (JSON format)
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
recurring_status
string
Recurring status
Return Code (Success)
Return Code (Fail)
Last updated