Professional Documents
Culture Documents
Version 2.0.23
(English)
Table of Contents
Page 1 of 35
StarPay CPM Settlement API Specifications
Change History
No. Version Revision Topic Details Author
No. Date
1 2.0.23 2019/07/20 - - -
2 2.0.24 2020/04/28 All Translation to English based on version Jeremiah Chan
20.0.23 JP and 20.0.24 JP Draft
Page 2 of 35
StarPay CPM Settlement API Specifications
1. Business Overview
StarPay gateway provides the payment functionalities of multi-payment (QR code/barcode settlement) to the
merchant. The interfaces specified in this document are for POS terminals and various payment terminals including
iOS and Android mobile terminals in Customer-Presented Mode (CPM, also known as B-scan-C Mode).
The customer presents the QR code/barcode, and the merchant scans it with the payment terminal/POS scanner to
initiate the payment process via the provided interfaces.
Page 3 of 35
StarPay CPM Settlement API Specifications
6. Balance and Points Inquire the balance (points) of the QUO Card Pay owned by the customer.
Inquiry
(balanceQuery)
7. Transaction History You can get the transaction history within the specified period.
Inquiry ❖ Settlement Reconciliation Data is provided separately through other means. Please refrain
(recordQuery2) from using this interface other than retrieving recent transaction data.
8. Service Check Check the service for available payment types and their regular expressions.
(serviceDetect) ❖ This interface has been deprecated and should not be used.
1. Amount
Amount values in this document do not have decimal points in Japanese Yen.
2. Time
Time values in this document are based on Japan Standard Time (JST).
The transaction number which has already been paid or cancelled cannot be used again for payment. To
make a new payment, please use a new transaction number.
If the transaction number is generated uniquely by each terminal, the Mch Transaction Number generated by
StarPay server is logically unique. In addition, Mch transaction number is applicable to refund operation.
5. Parameter Content
All parameters cannot contain commas (,).
Blank/empty input is allowed as values. For example, Key: "".
Page 4 of 35
StarPay CPM Settlement API Specifications
6. Terminal ID (DeviceId)
The terminal ID must be set with a unique value accordingly for the StarPay server. Please set it with the serial
number unique for each terminal or concatenation of values such as the company/business name in English,
store code and cashier/checkout/terminal number.
❖ The allowed symbols that can be used for the terminal ID are “! # $ _ - + =”.
❖ Some payment brands (or wallets) may support only alphanumeric characters, and thus it is strongly
recommended to set with alphanumeric value only.
❖ Please consult us if the parameter data length required is longer than 32 characters, as some brands do not
allow value longer than that.
Data sent and received from the StarPay server contain digital signature.
Signature = MD5(API parameter names and values for data transmission &key= Authentication/Secret
Key).toUpperCase()
❖ The above function names could be different based on the programing language used in your platform.
1. Except for the Sign parameter, arrange all parameters must in ascending order limited to ASCII characters.
Example:
param1=value1¶m2=param2...¶mN=valueN&key=authentication/secret key.
❖ The authentication key will be provided separately for Signing In (via signIn interface) only.
❖ The secret key is obtained from the response of signIn API and used for invoking other APIs.
4. Add the key string to the end of the data string and hash it with MD5.
Page 5 of 35
StarPay CPM Settlement API Specifications
5. The hashed signature is converted to uppercase.
❖ For verifying the data received from the server, generates the hash value in the same way as
mentioned above for signature comparison. The signature responded by the server does not include the
Sign parameter for hashing as well.
6. Do anticipate that the parameters may increase as the system upgrades. When verifying the return
parameters, the digital signature must be verified for data integrity.
❖ It is recommended to obtain all the parameters from the response message for signature verfication,
instead of verifying only the response parameters defined in the specifications.
7. Concatenate the parameters in ascending order (as in ASCII characters only) in the form of parameter
key=value separated with the & character.
Example:
stringA="AuthCode=130123456789012345&Nonce=flRbiAzyCBdkeTFESgighyaldTOpqaMN
&OrderAmount=25000"
8. Append the authentication key (or secret key) to stringA and hash it shown as below:
Sign = MD5(stringSignTemp).toUpperCase()
= "20072236E84EF1B26E80FC355025E4FF"
❖ The Authentication Key shown above is only a sample for signing in, which will be provided separately.
For invoking APIs other than signing in (signIn interface), append the value of the SecretKey
parameter (of the signIn’s response) instead of the Authentication Key.
❖ The programming syntax and function names could be different from your development platform.
Page 6 of 35
StarPay CPM Settlement API Specifications
9. Finally, generate the JSON format data shown as below:
{
"Nonce":"flRbiAzyCBdkeTFESgighyaldTOpqaMN",
"OrderAmount":"25000",
"AuthCode":"130123456789012345",
"Sign":"20072236E84EF1B26E80FC355025E4FF"
}
Data received and transmitted to our server include random character string as “Nonce”, so that hashed
signature cannot be anticipated with it included. It is recommended to use the randomize function for
generating the random character string based on the programming language.
Page 7 of 35
StarPay CPM Settlement API Specifications
2.Send
settlement
1.Scan of authorization 3.Payment
settlement code request
authorization Payment Terminal StarPay Payment
code (With StarPay API) Server
Server
5.Return 4.Return
payment payment
result result
User
6.Notify payment result
Page 8 of 35
StarPay CPM Settlement API Specifications
Page 9 of 35
StarPay CPM Settlement API Specifications
Upon receiving the response, verify the data received with a digital signature when signing in, using the Authentication
Key provided exclusively to each API user.
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required WvuGS1KODEP2S4FY
String
41040AFB6D8A5B78A3
Digital Signature Sign String(32) Required
149FEECC0F57F8
❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required STARPAY99990001
Parameter Specifications”.
License number issued to
License Number LicenseNo String(32) Required 123456ABC
each store.
Set the software version of
App Version AppVersion String(16) Required 1.0.1.0 your app and it will be
recorded in StarPay server.
Set the model number of the
Device Model settlement terminal arbitrarily.
DeviceModel String(2048) - Test device model
Number Record it on the StarPay
server.
It can be filled or leave it
empty. If it is empty, the
Terminal Number DeviceNo String(4) - 0010 StarPay server will
automatically generate it a
Numeric range from 0 to 9999.
Page 10 of 35
StarPay CPM Settlement API Specifications
Request Example
{
"Nonce":"WvuGS1KODEP2S4FY",
"Sign":"41040AFB6D8A5B78A3149FEECC0F57F8",
"AppVersion":"1.0.1.0",
"DeviceId":"STARPAY99990001",
"DeviceModel":"Test device model",
"LicenseNo":"123456"
}
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required iq9odtum2XT1yoEf
String
C15853E9432DBA8835
Digital Signature Sign String(32) Required
760CDF05254606
Page 11 of 35
StarPay CPM Settlement API Specifications
Request Example
{
"Nonce":"iq9odtum2XT1yoEf",
"Sign":"C15853E9432DBA8835760CDF05254606",
"Category":[
"紳士服 洋品",
"婦人服 洋品",
"その他衣料品",
"身のまわり品",
"化粧品",
"食堂 喫茶",
"家庭用品",
"飲料 食品",
"その他"
],
"DeviceNo":"1563",
"EntCode":"TES1",
"LicenseInfo":"NWGenius",
"ReceiptInfo":"NETSTARS",
"Result":"SUCCESS",
"ResultDesc":"SUCCESS",
"SecretKey":"xxxxxxxxxxxxxxxx",
"ShopCode":"MIK2"
}
Page 12 of 35
StarPay CPM Settlement API Specifications
Do not sign in at a regular interval, but only when receiving an error of POS_SIGN_ERROR or POS_NEED_SIGNIN.
The following is an example of the secret key expires.
a) When the Payment Request (pay) is invoked and the secret key has expired
1.pay
2.Result: POS_SIGN_ERROR
5.pay
❖ Same TradeNo & AuthCode as step 1
6.Result: SUCCESS
1.pay
2.Result: USERPAYING
3.payQuery
4.Result: POS_SIGN_ERROR
Payment StarPay
Terminal 5.signIn
Server
6.Get SecretKey
8.Result: SUCCESS
Page 13 of 35
StarPay CPM Settlement API Specifications
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random
Nonce String(32) Required LAlqm132GIN66tif
Character String
3007BA9369147D294
Digital Signature Sign String(32) Required
C0616457FE3AF65
❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required STARPAY99990001
Parameter Specifications”
Set a unique alphanumeric
Transaction value on the same terminal
TradeNo String(15) Required P20170206151553
Number ❖ See the Request Example
below
Categories selected during the
商品カテゴリ payment or item
_Category detailed information to be set on the
Product Details Detail String(256) -
(Product settlement terminal side. This value
Category) is not displayed on the user side.
Set this value arbitrarily.
Payment amount in Japanese
Payment Amount OrderAmount int Required 108
Yen up to 7 digits.
Settlement The settlement authorization
13049562333864774
Authorization AuthCode String(512) Required code read from the QR code on the
8
Code smartphone screen
This indicates which brand of
payment is used at the
terminal. If you do not specify a
payment type, the StarPay server
Payment Type TradeType String(16) - ALIPAY
automatically identifies it and
performs settlement processing.
❖ Refer to the chapter “1-6 Support
Payment Type”
Page 14 of 35
StarPay CPM Settlement API Specifications
Request Example
{
"Nonce":"LAlqm132GIN66tif",
"Sign":"3007BA9369147D294C0616457FE3AF65",
"AuthCode":"130495623338647748",
"Detail":"商品カテゴリ_Category",
"DeviceId":"STARPAY99990001",
"OrderAmount":108,
"TradeNo":"P20170206151553"
}
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random
Nonce String(32) Required t3YljmmsAhr6pVfO
Character String
22F47A31C2C4DEDFE7DEB
Digital Signature Sign String(32) Required
4FD510FC538
❖ Refer to the table “Operation
Operation Result Result String(32) Required SUCCESS
Result Codes” below
Operation Result
ResultDesc String(512) Required
Description
❖ Refer to the chapter “1-6
Payment Type TradeType String(16) Required MICROPAY
Available Payment Types”
Balance Balance Long - B20
Page 15 of 35
StarPay CPM Settlement API Specifications
Response Example
{
"Nonce":"t3YljmmsAhr6pVfO",
"Sign":"22F47A31C2C4DEDFE7DEB4FD510FC538",
"BankType":"CFT",
"Currency":"JPY",
"OrderAmount":108,
"OutTradeNo":"TES1MIK21563P20170206151553",
"Result":"SUCCESS",
"ResultDesc":"支払成功しました。(Payment Succeeded)",
"TradeNo":"P20170206151553",
"TradeTime":"20170206151558",
"TradeType":"MICROPAY"
}
❖ The Balance parameter is set only when the payment type is QUOPAY.
Page 16 of 35
StarPay CPM Settlement API Specifications
Example: If the payment amount exceeds the fixed amount, the customer will be prompted to input the password. If
this interface is invoked when the customer is entering the password, it responds back the status of USERPAYING
Also, if the following situation occurs, the merchant can check the actual payment status using this interface:
• When an abnormality occurs in the system or network, and the operation result of the payment request cannot
be received.
• When payment status confirmation is required before invoking the interface of cancellation request.
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random as8xA0fuzz4DsaFM
Character Nonce String(32) Required
String
Digital C5E47C5E7BB7CB5A2A6D
Sign String(32) Required
Signature D5161BAC06F9
STARPAY99990001 ❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required
Parameter Specifications”
P20170206151553 Transaction number
Transaction
TradeNo String(15) Required created during the
Number
payment process
Request Example
{
"Nonce":"as8xA0fuzz4DsaFM",
"Sign":"C5E47C5E7BB7CB5A2A6DD5161BAC06F9",
"DeviceId":"STARPAY99990001",
"TradeNo":"P20170206151553"
}
Page 17 of 35
StarPay CPM Settlement API Specifications
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random
Nonce String(32) Required 1HGien87rDRF6spL
Character String
9F208A3B7B507107F
Digital Signature Sign String(32) Required
FE4948C20185693
❖ Refer to the table
Operation Result Result String(32) Required SUCCESS “Operation Result Codes”
below
支払成功しました。
Operation Result
ResultDesc String(512) Required (Payment
Description
Succeeded)
❖ Refer to the chapter “1-6
Payment Type TradeType String(16) Required MICROPAY
Available Payment Types”
Response Example
{
"Nonce":"1HGien87rDRF6spL",
"Sign":"9F208A3B7B507107FFE4948C20185693",
"BankType":"CFT",
"Currency":"JPY",
"OrderAmount":108,
"OutTradeNo":"TES1MIK21563P20170206151553",
"Result":"SUCCESS",
"ResultDesc":"支払成功しました。(Payment Succeeded)",
Page 18 of 35
StarPay CPM Settlement API Specifications
"TradeNo":"P20170206151553",
"TradeState":"SUCCESS",
"TradeTime":"20170206151558",
"TradeType":"MICROPAY"
}
Page 19 of 35
StarPay CPM Settlement API Specifications
Transaction Status Codes
Code Description
SUCCESS Payment Success
REFUND Successful refund
Unpaid.
NOTPAY
(Unpaid due to user's cause. E.g. Cancel operation on password entry screen etc.)
It has already been canceled.
REVOKED ❖ Refer to the Supplementary Explanation section at `Operation Result Codes
(SUCCESS) of Chapter 2-2.
User is paying (including password being input).
USERPAYING
❖ It is recommended to inquire every 5 seconds for transaction status.
Failure of payment due to other causes (such as when the password is incorrect, the
PAYERROR
bank system returns an error, etc.)
❖ To identify whether the transaction status should be NOTPAY or REVOKED, please implement the conditions as
below.
Page 20 of 35
StarPay CPM Settlement API Specifications
Notes:
• Payments processed within 1 hour can be cancelled typically based on design. For general refund process,
e.g. return of purchases by customer, please make a refund request.
• Alipay payment does not allow cross-day cancellation. The server processes the cancellation as a refund
when it has past the Settlement End-Of-Day (EOD).
• When performing cancellation, if the payment transaction has already been processed as successful payment,
the server generates a cancellation record for the cancellation. If the transaction is an unsuccessful payment,
no cancellation record is being generated for the cancellation.
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random s0utbxu80o7WYvGa
Nonce String(32) Required
Character String
C52B29707D1B642A1271
Digital Signature Sign String(32) Required
35B632A0F29D
STARPAY99990001 ❖ Refer to chapter “1-3
Terminal ID DeviceId String(96) Required
Parameter Specifications”
Transaction P20170206151553 Transaction number created
TradeNo String(15) Required
Number during payment processing
Payment amount in Japanese
Yen. Up to 7 digits.
Payment Required
OrderAmount int 108 ❖ It is mandatory only if the
Amount (❖ )
payment is paid by LINEPay
and d payment.
Request Example
{
"Nonce":"s0utbxu80o7WYvGa",
"Sign":"C52B29707D1B642A127135B632A0F29D",
"DeviceId":"STARPAY99990001",
"TradeNo":"P20170206151553"
}
Page 21 of 35
StarPay CPM Settlement API Specifications
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random 6AXM7JoxctqIWHU1
Character Nonce String(32) Required
String
Digital DA023877DDBADDA6518F
Sign String(32) Required
Signature 81D27A5CE0D9
SUCCESS ❖ Refer to the table
Operation
Result String(32) Required “Operation Result Codes”
Result
below
取引のキャンセルが完了
Operation しました。
Result ResultDesc String(512) Required (Cancellation of
Explanation transaction has been
completed.)
Response Example
{
"Nonce":"6AXM7JoxctqIWHU1",
"Sign":"DA023877DDBADDA6518F81D27A5CE0D9",
"Result":"SUCCESS",
"ResultDesc":"取引のキャンセルが完了しました。(Cancellation of transaction has been
completed.)"
}
Page 22 of 35
StarPay CPM Settlement API Specifications
• The default value of the refund expiry is set as non-refundable at the same time (payment time) after the N (*)
days of the payment date, which based on the payment type of the payment transaction. If you have a request
to change the refund deadline, please contact us.
o (*) Number of days of the refund for specific payment type is set by the gateway operator
• The refund request is processed immediately, but the actual process duration of refunding the fund back to the
customer may be different among the payment types.
For the partial refund, it requires to specify the refund amount that does not exceed the payment amount. The
maximum times of partial refunds allowed on a single payment are 10.
Some payment types do not support partial refund (see 1-6. Available Payment Types).
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random 1Ef2EzfTnbrP30YR
Nonce String(32) Required
Character String
43646B12A53795B33
Digital Signature Sign String(32) Required
7E4570753A0A775
STARPAY99990001 The ID of the terminal which
refund is currently being
Refund Terminal
DeviceId String(96) Required processed.
ID
❖ Refer to the chapter “1-3
Parameter Specifications”
STARPAY99990001 ID of the terminal which the
Payment
PayDeviceId String(96) - payment was being
Terminal ID
processed
Transaction P20170206152837 Transaction number created
TradeNo String(15) -
Number during payment process.
The priority for this parameter
is higher than the
Mch Tansaction
OutTradeNo String(32) Required combination of
Number
PayDeviceID and
TradeNo.
Page 23 of 35
StarPay CPM Settlement API Specifications
R20170206152939 Set a value that is unique
and distinct from the
payment transaction number
Refund Number RefundNo String(16) Required for use on the same terminal.
Alphanumeric only
❖ See Request Example
below
1000 Refundable Amount: 1 Yen to
Refund Amount RefundFee int Required
Payment Amount.
❖ The refund process can proceed with either the Mch Transaction Number (OutTradeNo) or the combination of
Payment Terminal ID (PayDeviceID) and Transaction Number (TradeNo). If the server receives the refund request
with OutTradeNo, PayDeviceID, and TradeNo, the OutTradeNo parameter will be processed with priority.
Request Example
{
"Nonce":"1Ef2EzfTnbrP30YR",
"Sign":"43646B12A53795B337E4570753A0A775",
"DeviceId":"STARPAY99990001",
"PayDeviceId":"STARPAY9999-0001",
"RefundNo":"R20170206152939",
"TradeNo":"P20170206152837",
"RefundFee":1000
}
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required jvxy5z5etyIphuU0
String
EAB99A4DCCFA4B30
Digital Signature Sign String(32) Required
C348BC796FC54172
❖ Refer to the table “Operation
Operation Result Result String(32) Required SUCCESS
Result Codes”
返金成功しました。
Operation Result
ResultDesc String(512) Required (The refund was
Explanation
successful.)
❖ Refer to the chapter “1-6
Payment Type TradeType String(16) Required MICROPAY
Available Payment Types”
Page 24 of 35
StarPay CPM Settlement API Specifications
If the value of Result is SUCCESS, it includes the following parameters:
Name Parameter Data Type Required Data Example Remarks
Name Input
OutTradeNo String(32) TES1MIK21563P2017 Global unique number generated by
Mch Transaction
Required 0206152837 StarPay server for the refund
Number
transaction
Transaction TradeNo String(15) P20170206152837 Transaction number created during
Required
Number payment process
Refund Number RefundNo String(16) Required R20170206152939 Same as the request parameter
Payment Amount OrderAmount int Required 1000 Payment amount in Japanese Yen
Refund Amount RefundAmount int Required 1000 Refund amount in Japanese Yenß
Refund Time RefundTime String(16) Required 20170206152950 yyyyMMddHHmmss
❖ If the value of Result is other than SUCCESS, the above parameters may be included, but do not need to be
referred.
Response Example
{
"Nonce":"jvxy5z5etyIphuU0",
"Sign":"EAB99A4DCCFA4B30C348BC796FC54172",
"OrderAmount":1000,
"OutTradeNo":"TES1MIK21563P20170206152837",
"RefundAmount":1000,
"RefundNo":"R20170206152939",
"RefundTime":"20170206152950",
"Result":"SUCCESS",
"ResultDesc":"返金成功しました。(The refund was successful.)",
"TradeNo":"P20170206152837",
"TradeType":"MICROPAY"
}
Page 25 of 35
StarPay CPM Settlement API Specifications
REFUND_FEE_INVALID The refund amount is invalid, or the refund amount input exceeds its payment amount.
EXCEED_MAX_LIMIT The maximum count of partial refunds has been exceeded.
Page 26 of 35
StarPay CPM Settlement API Specifications
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random as8xA0fuzz4DsaFM
Nonce String(32) Required
Character String
C5E47C5E7BB7CB5A2A
Digital Signature Sign String(32) Required
6DD5161BAC06F9
STARPAY99990001 ❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required
Parameter Specifications”
Settlement 130495623338647748 The value decoded from the
Authorization AuthCode String(512) Required QR code presented by
Code customer
Request Example
{
"Nonce":"as8xA0fuzz4DsaFM",
"Sign":"C5E47C5E7BB7CB5A2A6DD5161BAC06F9",
"DeviceId":"STARPAY99990001",
"AuthCode":"130495623338647748"
}
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random
Nonce String(32) Required 1HGien87rDRF6spL
Character String
9F208A3B7B507107FF
Digital Signature Sign String(32) Required
E4948C20185693
❖ Refer to the table
Operation Result Result String(32) Required SUCCESS “Operation Result Codes”
below
Operation Result
ResultDesc String(512) Required QuerySuccess
Description
❖ Refer to the table “1-6
Available Payment Types”.
Payment Type TradeType String(16) Required QUOPAY
Currently only support for
QUO Card Pay.
Page 27 of 35
StarPay CPM Settlement API Specifications
If the Result value is SUCCESS, it includes the following parameters:
Name Parameter Name Data Type Required Data Example Remarks
Input
❖ Refer to the chapter “1-6
Available Payment Types”.
Balance Balance Long Required 108
Applicable to QUO Card Pay
only.
Currency Currency String(16) Required JPY
❖ If the Result value is other than SUCCESS, the above parameters may be included, but do not need to be referred.
Response Example
{
"Nonce":"1HGien87rDRF6spL",
"Sign":"9F208A3B7B507107FFE4948C20185693",
"Currency":"JPY",
"Balance":108,
"Result":"SUCCESS",
"ResultDesc":"QuerySuccess",
"TradeType":"QUOPAY"
}
Page 28 of 35
StarPay CPM Settlement API Specifications
A maximum of 3 months can be specified for the period (with the start and end dates). For example, specify the start
date/time as 12 May 2018 at 06:00:00, and the latest end date/time would 12 August 2018 at 05:59:59. If you specify a
date and time that is longer than that, a parameter error will be returned.
❖ This interface has been deprecated and will be removed in future. Please consult Netstars who has started
to provide this functionality in other means.
Request Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required YM7pVzQzhIYthw7U
String
9B4F114B22EE46E064
Digital Signature Sign String(32) Required
A285CBA7E6946A
❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required STARPAY-9999-0001
Parameter Specifications”
Start Date/Time BeginTime String(16) Required 20170206000000 yyyyMMddHHmmss
End Date/Time EndTime String(16) Required 20170206235959 yyyyMMddHHmmss
Terminal Number DeviceNo String(4) -- 0010
Payment / Refund
Transaction TradeRefundNo String(16) --
Number
SUCCESS: Payment
Transaction State
TradeState String(32) -- SUCCESS REFUND: Refund
(Transaction Type)
Null (Blank):All
❖ Refer to chapter “1.6 Available
Payment Type TradeType String(16) -- MICROPAY
Payment Types”
Request Example
{
"Nonce":"YM7pVzQzhIYthw7U",
"Sign":"9B4F114B22EE46E064A285CBA7E6946A",
"BeginTime":"20170206000000",
"DeviceId":"STARPAY-9999-0001",
"EndTime":"20170206235959",
}
Page 29 of 35
StarPay CPM Settlement API Specifications
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required ekD5tXF2JcV0d6v5
String
BA819960E4DBB0564415
Digital Signature Sign String(32) Required
A6DA8A5096A4
❖ Refer to table “Operation
Operation Result Result String(32) Required SUCCESS
Result Codes” below
取引照会が完了しました。
Operation Result
ResultDesc String(512) Required (Transaction inquiry
Description
has been completed.)
Page 30 of 35
StarPay CPM Settlement API Specifications
The Bank Abbreviation used in
Payment Bank BankType String(16) Required BOC_DEBIT
payment
Payment Amount in Japanese
Payment Amount OrderAmount Int Required 108
Yen
Currency Currency String(16) Required JPY
The terminal ID that made the
Terminal ID DeviceId String(96) Required STARPAY99990001
payment request
Terminal Number DeviceNo String(4) Required 1563
Store Code ShopCode String(4) Required MIK2 4 Alphanumeric Characters
Company Code EntCode String(4) Required TES1 4 Alphanumeric Characters
It is the category name selected
Product Details Detail String(256) - or the product details set at the
terminal when making payment
Response Example
{
"Nonce":"ekD5tXF2JcV0d6v5",
"Sign":"BA819960E4DBB0564415A6DA8A5096A4",
"PayAmount":216,
"Records":[
{
"BankType":"CFT",
"Currency":"JPY",
"Detail":"商品カテゴリ_Category",
"DeviceId":"STARPAY99990001",
"DeviceNo":"1563",
"EntCode":"TES1",
"OrderAmount":108,
"OutTradeNo":"TES1MIK21563P20170206151553",
"RefundOperator":"1563",
"ShopCode":"MIK2",
Page 31 of 35
StarPay CPM Settlement API Specifications
"TradeNo":"P20170206151553",
"TradeState":"SUCCESS",
"TradeTime":"20170206151558",
"TradeType":"MICROPAY"
},
{
"BankType":"CFT",
"Currency":"JPY",
"Detail":"商品カテゴリ_Category",
"DeviceId":"STARPAY99990001",
"DeviceNo":"1563",
"EntCode":"TES1",
"OrderAmount":108,
"OutTradeNo":"TES1MIK21563P20170206151553",
"RefundFee":"108",
"RefundOperator":"1563",
"RefundTime":"20170206152714",
"ShopCode":"MIK2",
"TradeNo":"P20170206151553",
"TradeState":"REVOKED",
"TradeTime":"20170206151558",
"TradeType":"MICROPAY"
},
{
"BankType":"CFT",
"Currency":"JPY",
"Detail":"商品カテゴリ_Category",
"DeviceId":"STARPAY99990001",
"DeviceNo":"1563",
"EntCode":"TES1",
"OrderAmount":108,
"OutTradeNo":"TES1MIK21563P20170206152837",
"RefundOperator":"1563",
"ShopCode":"MIK2",
"TradeNo":"P20170206152837",
"TradeState":"SUCCESS",
"TradeTime":"20170206152907",
"TradeType":"MICROPAY"
},
{
"BankType":"CFT",
"Currency":"JPY",
"Detail":"商品カテゴリ_Category",
"DeviceId":"STARPAY99990001",
"DeviceNo":"1563",
"EntCode":"TES1",
"OrderAmount":108,
Page 32 of 35
StarPay CPM Settlement API Specifications
"OutTradeNo":"TES1MIKI2563P20170206152837",
"RefundNo":"R20170206152939",
"OutRefundNo":"TES1MIK21563R20170206152939",
"RefundFee":"108",
"RefundOperator":"1563",
"RefundTime":"20170206152950",
"ShopCode":"MIK2",
"TradeNo":"P20170206152837",
"TradeState":"REFUND",
"TradeTime":"20170206152907",
"TradeType":"MICROPAY"
}
],
"RefundAmount":216,
"Result":"SUCCESS",
"ResultDesc":"取引照会が完了しました。(Transaction inquiry completed.)",
"TotalAmount":0,
"TotalCount":4
}
Page 33 of 35
StarPay CPM Settlement API Specifications
❖ When reading the QR code, it may not be recognized by the terminal due to the EMV standard composition for the
QR code could be defined differently. Please consult Netstars before use.
Request Parameters
Name Parameter Required Required Data Example Remarks
Name Input Input
Random Character
Nonce String(32) Required YM7pVzQzhIYthw7U
String
9B4F114B22EE46E064A28
Digital Signature Sign String(32) Required
5CBA7E6946A
❖ Refer to the chapter “1-3
Terminal ID DeviceId String(96) Required STARPAY-9999-0001
Parameter Specifications”
Request Example
{
"Nonce":"YM7pVzQzhIYthw7U",
"Sign":"9B4F114B22EE46E064A285CBA7E6946A",
"DeviceId":"STARPAY-9999-0001"
}
Response Parameters
Name Parameter Data Type Required Data Example Remarks
Name Input
Random Character
Nonce String(32) Required ekD5tXF2JcV0d6v5
String
BA819960E4DBB0564415A
Digital Signature Sign String(32) Required
6DA8A5096A4
❖ Refer to the table “Operation
Operation Result Result String(32) Required SUCCESS
Result Codes” below
サービス確認が完了しまし
Operation Result た。
ResultDesc String(512) Required
Explanation (Service confirmation has
been completed.)
Page 34 of 35
StarPay CPM Settlement API Specifications
If the value of Result is SUCCESS, it includes the following parameters:
Name Parameter Data Type Required Data Example Remarks
Name Input
Valid Payment PayTypes Array Required Array of PayTypes.
Types ❖ Refer to the table “Item
Parameters of PayTypes Array”
below
Response Example
{
"Nonce":"YM7pVzQzhIYthw7U",
"Sign":"9B4F114B22EE46E064A285CBA7E6946A",
"Result":"SUCCESS",
"ResultDesc":"SUCCESS",
"PayTypes":[
{ "TradeType":"MICROPAY", "Pattern":"^1[0-5](¥d{16}|¥d{15}N)$" },
{ "TradeType":"DPAY", "Pattern":"^71(¥d{20}|¥d{19}D)$" }
]
}
Page 35 of 35