Scenario
Before using ECPay’s Embedded Checkout Page, merchant’s server should call ECPay’s API to get a Token. After receiving the token, merchants should set this token onto merchant’s webpage with the integration of ECPay’s JavaScript SDK to access the checkout page. ECPay will then validate this token to check merchant’s identity before displaying the checkout page.
Credit card payment process flow with 3D secure authentication
- Initialize the SDK and inputting ServerType.
- Send API request (/GetTokenByTrade) to get a Token.
- Call createPayment() of SDK (inputting Token, Language, and callback) to get payment methods.
- Receive payment result from createPayement().
- Receive payment result from ReturnURL.
Credit card payment without using 3D secure authentication
- Initialize the SDK and inputting ServerType.
- Send API request (/GetTokenByTrade) to get a Token.
- Call createPayment() of SDK (inputting Token, Language, and callback) to get payment methods.
- Receive payment result from createPayement().
- Receive payment result from ReturnURL.
UnionPay card payment
- Initialize the SDK and inputting ServerType.
- Send API request (/GetTokenByTrade) to get a Token.
- Call createPayment() of SDK (inputting Token, Language, and callback) to get payment methods.
- Receive payment result from createPayement().
- Receive payment result from ReturnURL.
Non-credit card payment process
- Initialize the SDK and inputting ServerType.
- Send API request (/GetTokenByTrade) to get a Token.
- Call createPayment() of SDK (inputting Token, Language, and callback) to get payment methods.
- Display the payment number to consumer.
- Receive payment result from createPayement().
- Receive payment result from ReturnURL.
ApplePay payment process
Before integration of ApplePay, please send the ApplePay certificate to ECPay’s techsupport team. Details of setting of ApplePay’s certification please check the chapter: Preliminary preparation for Apple developers.
- Initialize the SDK and inputting ServerType.
- Send API request (/GetTokenByTrade) to get a Token.
- Call createPayment() of SDK (inputting Token, Language, and callback) to get payment methods.
- Receive payment result from createPayement().
- Receive payment result from ReturnURL.