Skip to content

Payment

Payment

When the consumer initiates a payment using a credit card, you need to call the POST Payment interface to initiate the payment. Once EVO Cloud has processed the request, you will receive the payment result.

The main process is as follows:

  1. When calling the Payment interface, you need to include, but not limited to, the following parameters. For field details, refer to the API documentation:

    • paymentMethod.type: Filed that indicates the transaction type.
    • paymentMethod.card: Object contains the shopper's card information. Mandatory when paymentMethod.type is card.
    • paymentMethod.token.value: Filed that contains the token of your shopper. Mandatory when paymentMethod.type is token.
    • transAmount: Object contains the currency and value of the payment.
    • transInitiator: Object that contains the shopper's device type.
    • authentication.authenticationOnly: The filed used to indicate the request is only get authentication(3DS, Secureplus) result or not.
    • authentication.authenticationMethod: The filed to indicate the authentication way when this transaction need to authorise.
    • authentication.authenticationType: The filed used to indicate the authentication type.
  2. Check the payment.status field in the EVO Cloud response. If the value is Captured, Authorised, or Capturing (depending on the value of the captureAfterHours field), then the transaction was successful. Otherwise, check result.code and result.message for the reason for the transaction failure.

    TIP

    The relationship between captureAfterHours and payment.status is as follows:

    captureAfterHourspayment.statusExplanation
    0CapturedPayment successful, no further action needed; the transaction will be settled.
    1 - 168CapturingAuthorization successful; delayed settlement in progress. The transaction will be settled after the delay period ends, and you can also trigger settlement early by calling the POST Capture interface.
    NoneAuthorisedAuthorization successful; you need to manually call the POST Capture interface to trigger settlement.
  3. If you do not receive a response message from EVO Cloud, you will need to call GET Payment to query the transaction result. When you receive the query response, you should also determine the transaction result based on the payment.status field, using the same method as in Step 2. If the transaction fails, you can refer to payment.failureCode and payment.failureReason to understand the reason for the failure.

  4. If you included a webhook in your POST Payment request and the transaction payment.status is Captured, Authorised, or Capturing, you can also receive the transaction result through asynchronous notifications, where the eventCode will be Payment. Again, you should determine the transaction result based on the payment.status field, using the same method as in Step 2.

  5. Present the payment result to the consumer.