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 Payment has processed the request, you will receive the payment result.
The main process is as follows:
When calling the
Paymentinterface, 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 whenpaymentMethod.typeiscard.paymentMethod.token.value: Filed that contains the token of your shopper. Mandatory whenpaymentMethod.typeis 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.
Check the
payment.statusfield in the EVO Payment response. If the value isCaptured,Authorised, orCapturing(depending on the value of thecaptureAfterHoursfield), then the transaction was successful. Otherwise, checkresult.codeandresult.messagefor the reason for the transaction failure.TIP
The relationship between
captureAfterHoursandpayment.statusis as follows:captureAfterHours payment.status Explanation 0 Captured Payment successful, no further action needed; the transaction will be settled. 1 - 168 Capturing Authorization 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 Captureinterface.None Authorised Authorization successful; you need to manually call the POST Captureinterface to trigger settlement.If you do not receive a response message from EVO Payment, you will need to call
GET Paymentto query the transaction result. When you receive the query response, you should also determine the transaction result based on thepayment.statusfield, using the same method as in Step 2. If the transaction fails, you can refer topayment.failureCodeandpayment.failureReasonto understand the reason for the failure.If you included a
webhookin yourPOST Paymentrequest and the transactionpayment.statusisCaptured,Authorised, orCapturing, you can also receive the transaction result through asynchronous notifications, where theeventCodewill bePayment. Again, you should determine the transaction result based on thepayment.statusfield, using the same method as in Step 2.Present the payment result to the consumer.

