Sale Subscriptions
Request address
POST
https://sandbox.j-pay.net/pay_index
Test account
Merchant ID:10010
ApiKey: 7e4nicn14nhyup146dfbi8hpnpus9juz
Test Card
Card number | Expiration date | cvv | Status |
---|---|---|---|
4242424242424242 | 12 2027 | 123 | success |
4000000000001018 | 12 2027 | 123 | failed |
Request parameters
Parameter Name | Type | Required | Sign(Y OR N) | Parameter Description |
---|---|---|---|---|
pay_memberid | String | Y | Y | The platform assigns merchant ID |
pay_orderid | String | Y | Y | Merchant order number |
pay_applydate | String | Y | Y | Order submission time, format:2016-12- 26 18:18:18 |
pay_bankcode | String | Y | Y | Bank code, see table below |
pay_notifyurl | String | Y | Y | Asynchronous notification address. (POST return data) |
pay_callbackurl | String | Y | Y | Synchronization notification address (POST return data) |
pay_amount | String | Y | Y | Amount of the transaction |
pay_md5sign | String | Y | N | Please see MD5 signature field method |
pay_currency | String | Y | N | Currency code, uppercase letters (USD) |
pay_url | String | Y | N | Website URL(Subject to review), needs to include http(s):// |
pay_cardno | String | Y | N | Card No. |
pay_cardmonth | String | Y | N | Two digits of month (02) |
pay_cardyear | String | Y | N | Four digits of year (2023) |
pay_cardcvv | String | Y | N | cvv |
+pay_productname | String | Y | N | Product 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"}] |
「sku | String | N | N | Product number (unique) |
「productName | String | Y | N | Product name |
「productImage | String | N | N | Product image URL |
「attributes | String | N | N | Product attributes |
「price | String | Y | N | Product attributes |
「quantity | String | Y | N | Product quantity |
pay_firstname | String | Y | N | Bill name |
pay_lastname | String | Y | N | Billing last name |
pay_street_address1 | String | N | N | Billing address 1 |
pay_street_address2 | String | N | N | Billing address 2 |
pay_city | String | N | N | Billing city |
pay_postcode | String | N | N | Billing zip code |
pay_state | String | N | N | Billing State/Province |
pay_country_iso_code_2 | String | Y | N | Billing country |
pay_email_address | String | Y | N | Billing email |
pay_telephone | String | Y | N | Billing telephone |
pay_type | String | N | N | Payment type (Subscription) |
+subscription_plan | String | N | N | Staging data in JSON string format |
「id | String | Y | N | Subscription Plan UUID |
「name | String | Y | N | Plan name |
「plan_type | String | Y | N | Plan types(weekly, monthly, quarterly, yearly) |
「first_period_amount | String | N | N | First instalment amount, order amount will be collected if no transfer is made |
「description | String | Y | N | Plan description |
「attempts | String | Y | N | The number of times a payment was attempted when the payment could not be completed due to insufficient funds |
「interval_time | Int | N | N | The interval time for the number of attempts and retries, in seconds. The default is 3600 seconds. |
pay_ip | String | Y | N | User IP address |
pay_useragent | String | Y | N | User browser information |
pay_language | String | Y | N | Language |
system | String | Y | N | Website system name(Shopyy,Shopline ) |
Return parameters
Parameter Name | Type | Parameter Description |
---|---|---|
status | Int | status = 0:SUCCESS status = 1:3d payment status = 2:failed |
msg | String | Order placed successfully or order failed |
url | String | 3D 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 Name | Type | Required(Y or N) | Parameter Description |
---|---|---|---|
paymentStatus | String | Y | Succeeded: success Fail:fail Processing:processing |
orderID | String | Y | Merchant order number |
Example:
Synchronous notification
https://www.xxxx.com/callback.html?paymentStatus=succeeded&orderID=1001
Asynchronous notification parameters:(application/x-www-form-urlencoded)
Parameter Name | Type | Required(Y or N) | Parameter Description |
---|---|---|---|
memberid | String | Y | Merchant ID |
orderid | String | Y | Merchant order number |
amount | String | Y | Submitted order amount |
true_amount | String | Y | The amount actually paid by the buyer |
transaction_id | String | Y | Transaction order number |
returncode | String | Y | "00": success "2":fail |
datetime | String | Y | Format:20220419000114 |
payment_transaction_id | String | Y | Subscribe to pay master order number |
payment_period_count | String | Y | Subscription cycles |
sign | String | N | Please see the verification signature field format |
attach | String |
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) ""
}