1. Payment
Merchant Connect API
latest
  • latest
  • HASE
  • Version Record
  • Integration Guide
    • EC Payment
      • Merchant API
        • Overview
        • Payment
        • Payment Methods
        • Response code
        • After Payment
          • Capture
          • Cancel
          • Refund
          • Cancel or Refund
          • Accept Notification
        • Features
          • Account Status Inquiry (ASI)
          • COF
          • Multi-Currency Transaction
          • Recurring
          • Smart Routing
          • Transaction Retry
          • Payout
          • Authentication
            • 3D Secure
            • FIDO Authentication
            • Authentication only
            • Authorization only
          • Tokenization
            • Gateway Tokenization
            • Create a gateway token
            • Network Tokenization
            • Pay with gateway token
            • Manage token
            • Network Token update notification
            • Card Based Network Token
    • In-store Payment
      • Merchant API(QR)
        • Payment
          • CPM
          • MPM
          • MPM static QR code
        • After Payment
          • Capture
          • Cancel
          • Refund
          • Cancel or Refund
          • Accept Notification
      • Merchant API (Card)
        • ZPK
          • ZPK
        • Payment
          • Payment
        • After Payment
          • Capture
          • Cancel
          • Refund
          • Cancel or Refund
          • Accept Notification
  • API Explorer
    • API Rules
    • PaymentMethod
      • PaymentMethod
      • PaymentMethod
      • PaymentMethod
      • PaymentMethod
    • FXRateInquiry
      • FXRateInquiry
      • FXRateInquiry
    • Payment
      • Payment
      • Payment
      • Payment
    • Payout
      • Payout
      • Payout
    • Capture
      • Capture
      • Capture
    • Cancel
      • Cancel
      • Cancel
    • Refund
      • Refund
      • Refund
    • Cryptogram
      • Cryptogram
      • Cryptogram
    • Cancel or Refund
      • Cancel or Refund
      • Cancel or Refund
    • Notification
      • Notification for PaymentMethod
      • Notification for Payment
      • Notification for Capture
      • Notification for Cancel
      • Notification for Refund
      • Notification for DataSubmission
      • Notification for MPM Static QR Code
      • Notification for Token Status Update
      • Notification for Settlement
      • Notification for Reversal
      • Notification for Cryptogram
      • Notification for Payout
    • Appendix
      • Result Code
      • Payment Brands
      • Payment Method Variant
      • Currency list
      • Country and region list
      • Product Code
    • HealthCheck
      • HealthCheck
    • Coupon Write-off
      • Coupon Write-off
    • Coupon Reversal
      • Coupon Reversal
    • ZPK
      • ZPK
latest
  • latest
  • HASE
  1. Payment

Payment

Step 1: Get available payment method(s)#

When a user is ready to pay or enters your payment page, get a list of the available payment method(s) with the corresponding information that needs to be filled in by the user.
Although we highly recommend using the below endpoint to ensure you always offer the most up-to-date payment method(s) list to your customer, the step is optional. You can also cache the API response and update it once a week.
From your server, you can make an HTTP GET request to EVO Cloud endpoint
/g2/v1/payment/mer/{sid}/paymentMethod
and specify either of the parameters below.
Query parameterRequiredDescription
paymentBrandOThe specific Payment Brand which you intend to provide to user. With this parameter, you will get the available payment method(s) and payment information for this specific Payment Brand in response.
cardBINOThe specific card BIN which the user intends to use to pay. With this parameter, you will get the available payment method(s) and payment information for this specific card BIN in response.
CurrencyOThe specific currency which the user intends to use to pay. With this parameter, you will get the available payment method(s) and payment information for this specific currency in response.
TokenizeOThe Boolean filed. Used to indicate Inquiry the payment method which support tokenization. With the value true, you will get the payment method(s) and payment information which support tokenization.
Only one parameter above is allowed to be used for each request. If multiple parameters are sent, the system will reply you with a priority of cardBIN, paymentBrand, and then currency.
If no query parameter is specified, you will get all the payment method(s) and payment information required to be collected based on your integration with EVO Cloud.
Here is an example of requesting the API without any query parameter:
The response includes the list of available payment method(s) in a paymentBrandList array, containing below fields in each payment method.
1.
brandName: The brand name of the payment method.
2.
brandImage: The logo image of the payment method, a URL for you to get the logo to display on your payment page.
3.
paymentInfo: The payment information that required by the Card Scheme or E-Wallet to initiate the payment.
4.
authenticationInfo: The authentication information that required by the Card Scheme to initiate the user authentication.
5.
promotionInfo: The list of the promotion names supported by the payment method.
See EVO Cloud API Specification for more details.
Here is an example of the response:
If you want to guide your user to pay on your frontend page or client APP, you can use paymentMethod.paymentBrandList.paymentInfo to provide the list of payment methods and the required payment information for each payment method.
If you want to guide your user to conduct a payment authentication, you can use paymentMethod.paymentBrandList.authenticationInfo. See chapter Authentication for more details.
You can add additional tips or format check by your own if needed.
Please note that for the following fields, after you collect it from the user, before you send them to EVO Cloud, you need to ensure your request follows the ISO specification. See EVO Cloud API Specification for more details.
Key name in paymentBrandListField name in EVO Cloud APIISO specification
Country (in Delivery Address)userInfo.deliveryAddress.countryISO-3166-1 alpha-3. For example, SGP.
State or Province(in Delivery Address)userInfo.deliveryAddress.stateOrProvinceISO-3166-2. For example, North East.
Country (in Billing Address)userInfo.billingAddress.countryISO-3166-1 alpha-3. For example, SGP.
State or Province(in Billing Address)userInfo.billingAddress.stateOrProvinceISO-3166-2. For example, North East.

Step 2: Collect user's payment information#

Collect your user's payment information based in the fields required by each payment method, then send them to your host.
Please note that if the user selects to pay with a card, the merchant must obtain the PCI DSS compliance. You have 2 ways to collect card details:
1.
Use EVO Cloud client-side solution to securely encrypt your user's card details. This option ensures you meet the PCI DSS compliance, as you're only required to submit PCI DSS Self-Assessment Questionnaire A (SAQ A). See EVO Cloud SDK Integration Guide for more details.
2.
Collect and send raw card data. This option requires you to assess your PCI DSS compliance according to PCI DSS Self-Assessment Questionnaire D (SAQ D), the most extensive form of self-certification.

Step 3: Make a payment#

After the user chooses the payment method and submits the required payment information, you need to make a payment request to EVO Cloud.
From your server, you can make an HTTP POST request to EVO Cloud endpoint
/g2/v1/payment/mer/{sid}/payment
and specify the parameters below.Common Payment fields
Field pathM/ODescription
merchantTransInfoMMerchant transaction identification object.
storeInfoOSupplemental store information.
transAmountMThe currency and value of the payment. The value must follow the currency's minor unit.
captureAfterHoursOControls immediate, automatic, or manual Capture behavior.
paymentMethodMPayment method object.
paymentMethod.typeMMust be card for this document's scenario.
transInitiatorMTerminal initiation context.
transInitiator.platformMMust be POS for the POS route.
transInitiator.paymentScenarioOinStore when required by deployment routing.
transInitiator.terminalIDORegistered terminal identifier
More details about the paymentMethod object:
A. When the user chooses to pay with Offline Card:
1.paymentMethod.type: Set as card in your request.
2.paymentMethod.card.encryptedCardInfo: The encrypted card information. If you use EVO Cloud client-side solution to securely encrypt your user's card details, your frontend will get the value from EVO Cloud SDK, and you need to send it to your host, then your host needs to forward the original data to EVO Cloud.
3.paymentMethod.card.cardInfo: The raw data of the card information. If you collect and send raw card data to EVO Cloud, you need to specify the cardNumber, expiryDate, and cvc (optional),track2 and holderName in this object. For some of the UnionPay debit cards, the expiryDate is also optional.
(If both paymentMethod.card.encryptedCardInfo and paymentMethod.card.cardInfo are present, paymentMethod.card.cardInfo will be applied.)
4.paymentMethod.cardfields
Field pathM/OConditionDescription
paymentMethod.cardMpaymentMethod.type=cardCard-related transaction object.
paymentMethod.card.encryptedCardInfoOApproved encrypted-card integrationEncrypted card information.
paymentMethod.card.cardInfoOApproved card-information integrationCard information container.
paymentMethod.card.cardInfo.cardNumberMManual/MOTO or final schema requirementCard number. Never use a real value in examples or test fixtures.
paymentMethod.card.cardInfo.expiryDateOMOTO requirementExpiration date in MMYY format.
paymentMethod.card.posEntryModeOPOS card routeCard data input mode.
paymentMethod.card.pinFlagOTerminal supports PINtrue means the terminal can accept PIN; false means it cannot.
paymentMethod.card.termReadabilityOTerminal capability is providedTerminal card-data input capability.
paymentMethod.card.icCardCondCodeOUnionPay IC scenarioUnionPay card condition code.
paymentMethod.card.noSecretNoSignFlagOUnionPay scenarioUnionPay no-secret/no-sign indicator.
paymentMethod.card.cardInfo.track1OMagnetic or channel-specific requirementTrack 1 data. The final field name must follow the approved schema.
paymentMethod.card.cardInfo.track2OMagnetic, ICC, contactless, or fallback requirementTrack 2 data. Must not be stored or logged in plaintext.
paymentMethod.card.cardInfo.cardSequenceNumOICC or contactless requirementIC card sequence number.
paymentMethod.card.cardInfo.icCardDataOICC or contactless requirementEMV/ICC TLV data.
paymentMethod.card.pinOPIN transactionPIN container, if included in the final schema.
paymentMethod.card.pin.encryptedPinMPIN transactionEncrypted PIN block. Never log or persist as plaintext.
paymentMethod.card.pin.pinEncryptMethodMPIN transactionApproved PIN encryption method, for example 3DES, when supported.
paymentMethod.card.pin.checkValueOKey-version lookup is enabledValue used to identify the applicable working-key version, when supported.
5.Card posEntryMode Modes
posEntryMode modeTransaction activityTypical conditional data
magneticMagnetic-stripe readtrack2
ICCContact chip insertiontrack2 、icCardData 、cardSequenceNum
contactlessNFC EMV taptrack2 、icCardData 、cardSequenceNum
contactless magneticContactless transaction using a magnetic-stripe pathtrack2
fallbackEMV-to-magnetic fallbacktrack2
manualManual card entrycardNumber 、expiryDate
MOTOMail order / telephone ordercardNumber 、expiryDate
The final API schema is the authority for exact field names, lengths, conditional requirements, and PSP-specific restrictions.
6.Purchase Request Example
The following example uses placeholders for all environment-specific and sensitive values.
7.
Pre-authorization Request Example
8.
Response and Status Handling
8.1 Representative Purchase response
{
  "result": {
    "code": "S0000",
    "message": "Success"
  },
  "merchantTransInfo": {
    "merchantTransID": "{{merchantTransId}}"
  },
  "payment": {
    "status": "Captured",
    "transID": "{{platformTransactionId}}",
    "transAmount": {
      "currency": "{{currency}}",
      "value": "{{amount}}"
    }
  },
  "paymentMethod": {
    "type": "card"
  },
  "transInitiator": {
    "platform": "POS",
    "terminalID": "{{terminalId}}"
  }
}
8.2 Payment status model
StatusMeaningMerchant action
PendingRequest accepted but processing is not finalQuery the transaction or wait for Notification according to the integration contract.
AuthorisedAuthorization succeeded but Capture is outstandingSend Capture or wait for automatic Capture.
CapturedAuthorization and Capture completedFulfil the order and store the final transaction identifiers.
FailedValidation, business, risk, or PSP processing failedDo not fulfil the order. Inspect the result code and message.
ReversedAuthorization was reversed after timeout or recovery handlingDo not treat the transaction as captured. Reconcile the final result.
8.3 Notification
When a Payment Notification is configured, the merchant should use it to receive asynchronous state changes such as:
Purchase completed: Captured;
Pre-authorization completed: Authorised;
Capture completed: Captured;
PSP decline or processing failure: Failed;
Timeout/reversal: final status defined by the deployed contract.
The notification must not expose PIN blocks, key material, CVV/CVC, full track data, raw PAN, or unapproved raw EMV authentication data.
8.3 Follow-up APIs
OperationPurposeExpected source status
POST CaptureComplete a successful pre-authorizationAuthorised
POST CancelCancel an eligible authorization before captureContract-defined authorization status
POST RefundRefund a captured transactionCaptured or eligible partially refunded status
POST CancelOrRefundSelect cancellation or refund behavior according to transaction stateContract-defined status
GET PaymentQuery the latest Payment statusExisting transaction identifier
These operations reuse the existing Merchant Connect transaction lifecycle. They do not create a separate card transaction mechanism.

Step 4: Retrieve the payment result#

You will get the result of this payment,From your server, you can make an HTTP GET request to EVO Cloud endpoint
/g2/v1/payment/mer/{sid}/payment
and specify the parameter below.
Parameter Required Description
merchantTransID M The merchantTransInfo.merchantTransID of the requesting payment.
Example of Retrieving the Payment Result
{
  "result": {
    "code": "S0000",
    "message": "Success"
  },
  "merchantTransInfo": {
    "merchantTransID": "{{merchantTransId}}"
  },
  "payment": {
    "status": "Captured",
    "transID": "{{platformTransactionId}}",
    "transAmount": {
      "currency": "{{currency}}",
      "value": "{{amount}}"
    }
  },
  "paymentMethod": {
    "type": "card"
  },
  "transInitiator": {
    "platform": "POS",
    "terminalID": "{{terminalId}}"
  }
}

Step 5: Present the payment result#

After the user completes the payment and no further actions are required on the frontend or client APP, you can use the result.code and payment.status to inform the user of the payment status.
Result CodeDescription
S0000Success
V0008Field {} is not applied with {...}
C0004Request resource merchantTransID {XXX} not exist
C0006Request resource vault ID {XXX} not exist
C0008Request resource paymentMethod token {XXX} not exist
B0005Unsupported function {XXX}, please check your profile setup in EVO Cloud
B0012Invalid transaction status {XXX} to complete the request
B0019Authentication required, please ask user to input authentication info
B0021{Payment / Tokenization} failed due to user authentication results with high risk, please ask user to try again
For other possible result.code values and recommended messages that you can present to your user, see Appendix in EVO Cloud API Specification.
If the result.code is S0000, you need to check the payment.status to judge and inform your user the payment status.
StatusDescription
AuthorisedUsed for card transaction, means the transaction authorization is successfully completed and pending for Capture (merchant can submit cancel).
CapturedIf card transaction, means transaction authorization and capture are successfully completed; If e-wallet transaction, means transaction is successfully completed.
FailedPayment failed.
For other possible payment.status values and description, see payment.status in EVO Cloud API Specification.

Error handling#

For HTTP POST request to EVO Cloud: It is suggested to wait at least 45 seconds after the request is sent to EVO Cloud. If you don't receive the response within the time frame, you need to retrieve the result from EVO Cloud, follow Step 6 to initiate the request.
For HTTP GET request to EVO Cloud: You can initiate the request several times until you get the result, and it is suggested to wait at least 45 seconds before you initiate the subsequent request. If you still fail to receive the result after several times of the request, you can initiate a Cancel or Refund request (based on your capture mode) to cancel the payment. See chapter After Payment for more details.
Previous
ZPK
Next
Capture
Built with