Skip to main content

Sale Subscriptions

Request address

POST

https://sandbox.j-pay.net/pay_index

Test account

Merchant ID:10010

ApiKey: 7e4nicn14nhyup146dfbi8hpnpus9juz

Test Card

Card numberExpiration datecvvStatus
424242424242424212 2027123success
400000000000101812 2027123failed

Request parameters

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
pay_memberidStringYYThe platform assigns merchant ID
pay_orderidStringYYMerchant order number
pay_applydateStringYYOrder submission time, format:2016-12- 26 18:18:18
pay_bankcodeStringYYBank code, see table below
pay_notifyurlStringYYAsynchronous notification address. (POST return data)
pay_callbackurlStringYYSynchronization notification address (POST return data)
pay_amountStringYYAmount of the transaction
pay_md5signStringYNPlease see MD5 signature field method
pay_currencyStringYNCurrency code, uppercase letters (USD)
pay_urlStringYNWebsite URL(Subject to review), needs to include http(s)://
pay_cardnoStringYNCard No.
pay_cardmonthStringYNTwo digits of month (02)
pay_cardyearStringYNFour digits of year (2023)
pay_cardcvvStringYNcvv
+pay_productnameStringYNProduct information parameters are composed of the following set of data in JSON format. Please note that parameter names are case-sensitive. This field is filled with a JSON array. Example:[{"sku":"123456789","productName":"Mac Book Pro","productImage":"url","attributes":"Size:US8 Color:blue","price":"11000.00","quantity":" 1"},{"sku":"9876543231","productName":"IPhone 12","productImage":"url","attributes":"Size:US8 Color:blue","price":"11000.00","quantity":" 1"}]
「skuStringNNProduct number (unique)
「productNameStringYNProduct name
「productImageStringNNProduct image URL
「attributesStringNNProduct attributes
「priceStringYNProduct attributes
「quantityStringYNProduct quantity
pay_firstnameStringYNBill name
pay_lastnameStringYNBilling last name
pay_street_address1StringNNBilling address 1
pay_street_address2StringNNBilling address 2
pay_cityStringNNBilling city
pay_postcodeStringNNBilling zip code
pay_stateStringNNBilling State/Province
pay_country_iso_code_2StringYNBilling country
pay_email_addressStringYNBilling email
pay_telephoneStringYNBilling telephone
pay_typeStringNNPayment type (Subscription)
+subscription_planStringNNStaging data in JSON string format
「idStringYNSubscription Plan UUID
「nameStringYNPlan name
「plan_typeStringYNPlan types(weekly, monthly, quarterly, yearly)
「first_period_amountStringNNFirst instalment amount, order amount will be collected if no transfer is made
「descriptionStringYNPlan description
「attemptsStringYNThe number of times a payment was attempted when the payment could not be completed due to insufficient funds
「interval_timeIntNNThe interval time for the number of attempts and retries, in seconds. The default is 3600 seconds.
pay_ipStringYNUser IP address
pay_useragentStringYNUser browser information
pay_languageStringYNLanguage
systemStringYNWebsite system name(Shopyy,Shopline )

Return parameters

Parameter NameTypeParameter Description
statusIntstatus = 0:SUCCESS
status = 1:3d payment
status = 2:failed
msgStringOrder placed successfully or order failed
urlString3D redirectUrl

Return example

Transaction successful : {
"status": 0,
"msg": "transaction success"
}
Transaction failed : {
"status": 2,
"msg": "transaction failed"
}
Redirect/3ds payment successful : {
"status": 1,
"url": "redirectUrl"
}

3DS verification

Jump payment and direct credit card payment require 3DS verification

Synchronous notification parameters:(application/x-www-form-urlencoded)

Parameter NameTypeRequired(Y or N)Parameter Description
paymentStatusStringYSucceeded: success
Fail:fail
Processing:processing
orderIDStringYMerchant order number

Example:

Synchronous notification

https://www.xxxx.com/callback.html?paymentStatus=succeeded&orderID=1001

Asynchronous notification parameters:(application/x-www-form-urlencoded)

Parameter NameTypeRequired(Y or N)Parameter Description
memberidStringYMerchant ID
orderidStringYMerchant order number
amountStringYSubmitted order amount
true_amountStringYThe amount actually paid by the buyer
transaction_idStringYTransaction order number
returncodeStringY"00": success
"2":fail
datetimeStringYFormat:20220419000114
payment_transaction_idStringYSubscribe to pay master order number
payment_period_countStringYSubscription cycles
signStringNPlease see the verification signature field format
attachString
Array{
["memberid"]=>
string(5) "10012"
["orderid"]=>
string(7) "7758292"
["transaction_id"]=>
string(20) "20230117104641499957"
["amount"]=>
string(5) "85.95"
["true_amount"]=>
string(5) "85.95"
["datetime"]=>
string(14) "20230117111809"
["returncode"]=>
string(2) "00"
["sign"]=>
string(32) "48CF5D99A2ADE25DCEF73BC1B1136B9E"
["attach"]=>
string(0) ""
}