Scenario
When the ChoosePayment parameter is ALL or Credit
- Step 1. Merchant:Set the ChoosePayment payment method to Credit.
- Step 2. ECPay:accepts order from merchant and check details.
Special Note:
- It is not possible to set the parameters for periodic fixed-amount purchases and instalment payments at the same time.
- Stage environment: Please use the credit card test number provided by ECPay to simulate payment.
Transaction Flow Chart
Request Parameters Description (Common Parameters)
MerchantID String(10)
Required
MerchantTradeNo String(20)
Required
- Merchant Transaction IDs are unique and can not be reused.
- The value of this parameter is a combination of upper and lower case alphanumeric characters.
MerchantTradeDate String(20)
Required
Transaction time.
- Format:yyyy/MM/dd HH:mm:ss
PaymentType String(20)
Required
Transaction type.
- Please fill in aio
TotalAmount Int
Required
- Only integer is allowed; decimal is not accepted.
- The currency should be New Taiwan Dollars only.
TradeDesc String(200)
Required
Transaction description.
- Do not use special characters.
ItemName String(400)
Required
- 1. If this field will include more than 1 product and on the webpage each product is expected to be displayed line by line, each product’s name should be separated by hash (#).
- 2. Maximum length: 400 characters(Chinese and English). ECPay will automatically cut the length exceeding this maximum. Please refer to the FAQ.
ReturnURL String(200)
Required
A return URL for payment notification.
- When the consumer completes payment, ECPay will respond payment completed notification (callback) to this parameter (using server Site POST). For more detail about the data of the callback please see Payment result notification (callback).
Special note:
- This is a server-side URL. Please do not set this URL the same as [OrderResultURL], which is the URL of the client-side, in order to avoid errors.
- Upon receiving the callback from ECPay, please respond a string “1|OK“.
- The string “1|OK” is merely a response, which is to tell ECPay’s server that this callback is successfully received by merchant’s server. This response “1|OK” will not change the payment status.
ChoosePayment String(20)
Required
Choose default payment method.
ECPay provides the following payment methods which are transmitted at the time the order is created:
- Credit: Credit card
CheckMacValue String
Required
Checksum.
- Please refer to the Appendix Checksum Mechanism.
EncryptType Int
Required
CheckMacValue encryption type.
Possible value:
- 1:SHA256 encryption.
Merchant store ID.
- Allows merchants to enter specific store ID.
- This parameter only allows a combination of upper and lower case alphanumeric characters.
Button to return to merchant on client’s end.
- The page will be directed to the URL when the customer clicks on this button
Special Note:
- The URL only redirects the page to the URL set on client’s end without payment result.
- If this parameter is set, ECPay will display the “Back to store” button on the payment complete page or the ATM virtual number retrieval page.
- If this parameter is set, the page will display the “Back to store” button when OTP authentication fails.
- If this parameter is not set, then ECPay will not display the “Back to store” button on the payment complete page or the ATM virtual number retrieval page.
- Some browsers may display a warning if the return URL is not an https address.
ItemURL String(200)
The client end returns the payment result URL.
- If merchants set a URL in this parameter, when a payment is completed, ECPay will return the payment result to the URL set using client site post.
Special Note:
- If this parameter is set with [ClientBackURL], ECPay will accept this parameter but ignore [ClientBackURL].
- This parameter does not support UnionPay cards or non-real-time transactions (ATM, CVS, BARCODE).
- OrderResultURL can easily be affected by user mishandling or temporary network issues, resulting in not receiving log.It is recommended to rely on the return log from the ReturnURL.
Do you require additional payment information
Additional payment information:
- Please return N for parameter value if you do not need to return additional payment information.
- Please return Y for parameter value if you need to return additional payment information. After payment is completed, ECPay will return the additional payment information via Server Site POST.
Special Note:Please refer to the additional returns parameter page for information on returning additional payment information parameters.
Platform merchant ID (Provided by Green World).
- Used by contracted platform merchants.
- For general merchants or platform merchant interfacing, please leave empty.
- For use by platform merchants, please set [MerchantID] as the parameter.
- English: ENG
- Korean: KOR
- Japanese: JPN
- Simplified Chinese: CHI
Pay at once by Credit Card Parameters
Redeem String(1)
Are bonus points being redeemed for the credit card purchase?.
- When set to Y, the bonus point redemption process will be open when the merchant selects credit card payment.
UnionPay Int
UnionPay Options
- 0: choose whether to use UnionPay card in ECPay’s payment page.
- 1: indicating it is UnionPay card. (If = 1, ECPay will redirect the page to the UnionPay website).
- 2: indicating it is not UnionPay card. ECPay’s payment page will hide the UnionPay card option.
Special Note:
- If merchants want to use UnionPay card to collect payments, please apply with ECPay.
- ECPay’s Stage environment (testing environment) is a simulated test page.
- UnionPay card is not applicable to credit card installment and periodic fixed-amount payment.
- UnionPay card is not applicable to [Redeem] (credit card bonus).
Save a Credit Card Number
BindingCard Int
- If merchants need to bind the card: please set 1 as the value of this parameter.
- If merchants do not need to bind the card: please set 0 as the value of this parameter.
MerchantMemberID String(30)
- Saved credit card identification number( MerchantID + MemberID.)
Special Note:
- To use the BindingCard and MerchantMemberID parameters, the merchant must have a membership system.
- If the saved credit card identification numbers is the platform provider’s membership ID, you must apply to ECPay to use the function.
- The binding card function supports only VISA/MasterCard/JCB.