# notifyPayment

> Antom uses this API to send the payment result to the merchant when the payment processing reaches a final state of success or failure. Merchants promote merchant-side transactions based on the payment result.

Antom uses this API to send the payment result to the merchant when the payment processing reaches a final state of success or failure. Merchants promote merchant-side transactions based on the payment result.  

# Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see： 

-   [Request header](https://docs.antom.com/ac/ams/api_fund.md#ML5ur)
-   [Response header](https://docs.antom.com/ac/ams/api_fund.md#WWH90)

> **Note**: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
>
> -   If the data type of a field is Integer and its value is `20`, set it as "`20`". 
> -   If the data type of a field is Boolean and its value is `true`, set it as "`true`".

## Request parameters

#### notifyType (String, REQUIRED)

Type of the payment status notification. Valid values are:

-   `PAYMENT_RESULT`: Indicates that the notification is about the payment result.
-   `PAYMENT_PENDING`: Indicates that the user has completed the payment. The merchant needs to wait for the final payment result.

#### result (Result, REQUIRED)

Details about the payment result, such as payment status, result code, and result message.

##### resultCode (String, REQUIRED)

Result code. The possible result codes are listed in the Result/Error codes table on this page.

Not all the result codes listed in the table can be returned by every payment method. Whether the result codes can be returned depends on the capability of each payment method.

More information:

- Maximum length: 64 characters

##### resultStatus (String, REQUIRED)

Payment status. Valid values are:

-   `S`: indicates the payment is successful when _notifyType_ is `PAYMENT_RESULT`; indicates the payment is being processed when _notifyType_ is `PAYMENT_PENDING`. 
-   `F`: indicates the payment is failed.

##### resultMessage (String, REQUIRED)

Result message that explains the result code.

More information:

- Maximum length: 256 characters

#### paymentRequestId (String, REQUIRED)

The unique ID that is assigned by a merchant to identify a payment request.

More information:

- Maximum length: 64 characters

#### paymentId (String, REQUIRED)

The unique ID that is assigned by Antom to identify a payment. A one-to-one correspondence between _paymentId_ and _paymentRequestId_ exists.

More information:

- Maximum length: 64 characters

#### paymentAmount (Amount, REQUIRED)

The payment amount that the merchant requests to receive in the order currency.

##### currency (String, REQUIRED)

The transaction currency, which is a 3-letter currency code that follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.

More information:

- Maximum length: 3 characters

##### value (Integer, REQUIRED)

The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a 0-decimal currency).

Notes: For details about the smallest currency unit, see [Smallest unit of the currency](https://global.alipay.com/docs/ac/ref/cc#ONkIe).

More information:

- Value range: 1 - unlimited

#### paymentCreateTime (Datetime, REQUIRED)

The date and time when the payment is created.

More information:

- The value follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard format. For example, "2019-11-27T12:01:01+08:00".

#### paymentTime (Datetime)

The date and time when the payment reaches a final state of success.

> **Note**: This field is returned only when the payment reaches a final state of success (the value of _result.resultStatus_ is `S`).

More information:

- The value follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard format. For example, "2019-11-27T12:01:01+08:00".

#### pspCustomerInfo (PspCustomerInfo)

Information about the customer of the digital wallets.

> **Note**: This field is returned when the digital wallets can provide the related information.

##### pspName (String)

The name of the digital wallets.

> **Note**: This field is returned when the digital wallets can provide the related information.

More information:

- Maximum length: 64 characters

##### pspCustomerId (String)

The customer ID of the digital wallets.

> **Note:** This field is returned when the digital wallets can provide the related information.

More information:

- Maximum length: 64 characters

##### displayCustomerId (String)

The customer ID used for display. For example, _loginId_.

> **Note**: This field is returned when the digital wallets can provide the related information.

More information:

- Maximum length: 64 characters

#### customsDeclarationAmount (Amount)

The total amount for customs declaration.

> **Note**: This field is returned only when the payment succeeds and the wallet is AlipayCN.

##### currency (String, REQUIRED)

The currency used for declaration. The value is a 3-letter currency code that follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.

More information:

- Maximum length: 3 characters

##### value (Integer, REQUIRED)

The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a 0-decimal currency).

Notes: For details about the smallest currency unit, see [Smallest unit of the currency](https://global.alipay.com/docs/ac/ref/cc#ONkIe).

More information:

- Value range: 0 - unlimited

#### grossSettlementAmount (Amount)

The value of this field equals to transaction amount multiplied by the value of _settlementQuote_. This field is returned when the currency exchange is predetermined and the exchange rate is locked at the time of transaction.

##### currency (String, REQUIRED)

The 3-letter currency code that follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.

More information:

- Maximum length: 3 characters

##### value (Integer, REQUIRED)

The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a zero-decimal currency).

> **Note**: For details about the smallest currency unit, see [Smallest unit of the currency](https://docs.antom.com/ac/ref/cc.md#ONkIe).

More information:

- Value range: 1 - unlimited

#### settlementQuote (Quote)

The exchange rate between the settlement currency and transaction currency.

> **Note**: This field is returned when _grossSettlementAmount_ is returned.

##### guaranteed (Boolean)

Guaranteed exchange rate available for payment.

##### quoteCurrencyPair (String, REQUIRED)

The exchange rate between settlement currency and transaction currency. Two currencies are separated with a slash and use the three-letter [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.

More information:

- Maximum length: 16 characters

##### quoteExpiryTime (Datetime)

Expiration time of the exchange rate.

More information:

- The value follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard format. For example, "2019-11-27T12:01:01+08:00".

##### quoteId (String)

The unique ID that is assigned by Antom to identify an exchange rate.

More information:

- Maximum length: 64 characters

##### quotePrice (Decimal, REQUIRED)

The exchange rate used when a currency conversion between settlement currency and transaction currency occurs.

More information:

- Value range: 1 - unlimited

##### quoteStartTime (Datetime)

Effective time of the exchange rate.

More information:

- The value follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard format. For example, "2019-11-27T12:01:01+08:00".

#### acquirerReferenceNo (String)

The unique ID assigned by the non-Antom acquirer for the transaction.

More information:

- Maximum length: 64 characters

#### paymentResultInfo (PaymentResultInfo object)

The payment result information.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD`.

**Scenario: Card** (CARD)

##### cardNo (String)

The masked card number, which just shows part of the card number and can be used to display to the user.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and the merchant does not have the PCI qualification.

More information:

- Maximum length: 32 characters

##### cardBrand (String)

The card brand, which can be used to display to the user.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD`.

More information:

- Maximum length: 256 characters

##### cardToken (String)

The token of the card, the value of this parameter is used by _paymentMethodId_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API in subsequent payments.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and the merchant does not have the PCI qualification.

More information:

- Maximum length: 128 characters

##### issuingCountry (String)

The issuing country of the card. The value of this parameter is a 2-letter country code that follows [ISO 3166 Country Codes](https://www.iso.org/obp/ui/#search) standard.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD`.

More information:

- Maximum length: 2 characters

##### funding (String)

The funding type of the card. Valid values are:

-   `CREDIT`: indicates a credit card.
-   `DEBIT`: indicates a debit card.
-   `PREPAID`: indicates a prepaid card.
-   `CHARGE`: indicates a charge card.
-   `DEFERRED_DEBIT`: indicates a deferred debit card.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD`.

More information:

- Maximum length: 32 characters

##### paymentMethodRegion (String)

The region code that represents the country or region of the payment method. The value of this parameter is a 2-letter [ISO country code](https://www.iso.org/obp/ui/#search) or `GLOBAL`.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD`.

More information:

- Maximum length: 6 characters

##### threeDSResult (ThreeDSResult)

The result of 3D Secure authentication.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and the card authentication type is 3D secure.

###### threeDSVersion (String, REQUIRED)

The version of 3D Secure protocol. Valid values are:

-   `1.0.2`
-   `2.1.0`
-   `2.2.0`

More information:

- Maximum length: 16 characters

###### eci (String, REQUIRED)

Electronic Commerce Indicator (ECI) that is returned by the card scheme. This parameter is used to indicate the type of cardholder identity authentication. Valid values are:

-   `02` or `05`: Indicates fully authenticated transaction.
-   `01` or `06`: Indicates attempted authentication transaction.
-   `00` or `07`: Indicates non-3D Secure transaction.
-   `04`: Indicates 3D Secure data-only transaction. No authentication required (for Mastercard only).

> **Note**: This parameter is returned when the value of _paymentMethodType_ is `CARD` and the issuing bank returns this data.

More information:

- Maximum length: 2 characters

###### cavv (String)

The cardholder authentication value. The value of this parameter can be Cardholder Authentication Verification Value (CAVV) or Authentication Verification Value (AVV).

> **Note**: This parameter is returned when the cardholder passes the 3D Secure authentication.

More information:

- Maximum length: 64 characters

###### dsTransactionId (String)

The unique transaction identifier assigned by the Directory Server (DS) for 3D Secure authentication.

> **Note**: This parameter is returned for 3D Secure 2.

More information:

- Maximum length: 64 characters

###### xid (String)

The unique transaction identifier assigned by the Directory Server (DS) for 3D Secure authentication.

This parameter is returned for 3D Secure 1.0.

More information:

- Maximum length: 64 characters

###### threeDSOffered (Boolean)

Indicates whether 3D Secure authentication was triggered for the payment. Valid values are:

-   `true`: indicates 3D Secure authentication was triggered for the payment. Determine the authentication result by combining the other returned 3D Secure parameters.
-   `false`: indicates 3D Secure authentication was not triggered for the payment.

> **Note**: This parameter may be returned even if the payment fails.

###### threeDStransactionStatusReason (String)

When a transaction is unsuccessful due to 3D Secure authentication failure, you may receive the transaction status reason code returned by this parameter, indicating the reason for the failure.

More information:

- Maximum length: 2 characters

###### challengeCancel (String)

Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values are:

-   `01`: Cardholder selected cancel.
-   `02`: 3DS Requestor cancelled authentication.
-   `03`: Transaction abandoned.
-   `04`: Transaction timed out at ACS — other timeouts.
-   `05`: Transaction timed out at ACS — the first Client Request not received by ACS.
-   `06`: Transaction error.
-   `07`: Unknown.
-   `08`: Transaction timed out at SDK.

More information:

- Maximum length: 2 characters

###### exemptionType (String)

The exemption type that Antom requested during 3DS authentication, specified through the 3DS requestor challenge indicator. Valid values are:

-   `dataOnly`: Transactions where shopper data is shared with the card schemes directly using the 3DS2 infrastructure. This flow is currently only available for Visa and Mastercard outside PSD2 SCA regulated markets.
-   `lowValue`: Transactions below €30 may be exempt from Strong Customer Authentication, if certain cumulative amount and transaction count criteria are met.
-   `transactionRiskAnalysis`: Transactions considered at low risk of fraud based on the fraud level of the payment provider.

More information:

- Maximum length: 64 characters

###### challenged (Boolean, REQUIRED)

Indicates whether a 3DS challenge was triggered. Valid values are:

-   `true`: The transaction has been challenged, and the user is required to complete the 3D Secure authentication process.
-   `false`: The transaction is a frictionless process, where the user does not experience the 3D Secure authentication process.

##### avsResultRaw (String)

The raw AVS result. See [AVS result codes](https://docs.antom.com/ac/ref/risk_methods.md#uk0zA) to check the valid values.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and 3D Secure or non-3D Secure authentication is used.

More information:

- Maximum length: 128 characters

##### cvvResultRaw (String)

The raw Card Verification Value (CVV), Card Security Code (CSC), or Card Verification Code (CVC) result. See [CVV result codes](https://docs.antom.com/ac/ref/risk_methods.md#sBWzx) to check the valid values.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and 3D Secure or non-3D Secure authentication is used.

More information:

- Maximum length: 128 characters

##### networkTransactionId (String)

The unique ID assigned by the card scheme to identify a transaction. The value of this parameter is used by the same parameter of [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) request in subsequent payments.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` and 3D Secure or non-3D Secure authentication is used.

More information:

- Maximum length: 128 characters

##### cardCategory (string)

The payment card category. Valid vaules are:

-   `CONSUMER`: the personal card
-   `COMMERCIAL`: the business card

> **Note**: This parameter is returned when all the following conditions are met:
>
> -   The value of _paymentMethodType_ is `CARD`.
> -   The value of _cardNo_ is valid.
> -   The information is available in the Alipay card database.

More information:

- Maximum length: 32 characters

##### creditPayPlan (CreditPayPlan )

The installment plan information for an installment payment.

> **Note**: This parameter is returned when the buyer successfully made a payment in installments using a card.

###### installmentNum (Integer )

The number of installment payments.

> **Note**: This parameter is returned when the buyer successfully made a payment in installments using a card.

More information:

- Maximum length: 8 characters

###### interval (String)

The interval of each installment payment. The valid value is `MONTH`.

> **Note**: This parameter is returned when the buyer successfully made a payment in installments using a card.

More information:

- Maximum length: 16 characters

##### cardholderName (String)

The cardholder's name.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` for specific merchants in specific regions.

More information:

- Maximum length: 64 characters

##### cardBin (String)

The first six digits of the bank card number, used to identify the issuing bank and card type of the bank card.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` for specific merchants in specific regions.

More information:

- Maximum length: 8 characters

##### lastFour (String)

Last 4 digits of the card number.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` for specific merchants in specific regions.

More information:

- Maximum length: 4 characters

##### expiryMonth (String)

The month the card expires. Pass in two digits representing the month. For example, if the expiry month is February, the value of this parameter is `02`.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` for specific merchants in specific regions.

More information:

- Maximum length: 2 characters

##### expiryYear (String)

The year the card expires. Pass in the last two digits of the year number. For example, if the expiry year is 2025, the value of this parameter is `25`.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API or [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md) API is `CARD` for specific merchants in specific regions.

More information:

- Maximum length: 2 characters

##### refusalCodeRaw (String)

The response code indicates an issuer’s reason for declining a transaction. Valid values see [ISO codes](https://docs.antom.com/ac/ams/isocode.md).

> This parameter is returned when the following conditions are met:
>
> -   The transaction fails.
> -   The value of _paymentMethodType_ is `CARD`.
> -   The issuing bank has returned this data.

More information:

- Maximum length: 16 characters

##### refusalReasonRaw (String)

The error message that explains the response code.

> This parameter is returned when the following conditions are met:
>
> -   The transaction fails.
> -   The value of _paymentMethodType_ is `CARD`.
> -   The issuing bank has returned this data.

More information:

- Maximum length: 256 characters

##### merchantAdviceCode (String)

The Merchant Advice Code (MAC) provides additional information about the type of Mastercard transaction or the reason why the payment failed. If the payment failed, the MAC also gives guidance on if and when you can retry the payment. Valid values see [Merchant Advice Code](https://docs.antom.com/ac/ams/mac.md).

> Note: This parameter is returned when the value of _paymentMethodType_ is `CARD` and the issuing bank returns this value.

More information:

- Maximum length: 128 characters

##### credentialTypeUsed (String)

Indicates whether the transaction was processed with the primary account number (PAN) or a network token.

-   `PAN`: The transaction was processed using the PAN.
-   `NETWORK_TOKEN`: The transaction was processed using a network token provided by the merchant or Antom.

More information:

- Maximum length: 8 characters

##### exemptionRequested (String)

The exemption type that Antom requested for in the payment authorization. Valid values are:

-   `lowValue`: Transactions below €30 may be exempt from Strong Customer Authentication, if certain cumulative amount and transaction count criteria are met.
-   `transactionRiskAnalysis`: Transactions considered at low risk of fraud based on the fraud level of the payment provider.

More information:

- Maximum length: 64 characters

##### issuerName (String)

The issuing bank.

> This parameter is returned when the value of _paymentMethodType_ is `CARD`.

More information:

- Maximum length: 256 characters

**Scenario: Wallet** (Wallet)

##### funding (String)

The funding type of the wallet. This parameter is returned when the value of _paymentMethodType_ is `GRABPAY_MY` or `GRABPAY_SG`. Valid values are:

-   `WALLETS`: indicates a regular wallet payment using the wallet balance.
-   `BNPL_POSTPAID`: indicates a buy-now-pay-later payment, and the user pays the full amount.
-   `BNPL_INSTALLMENT`: indicates a buy-now-pay-later payment, and the user pays in installments.

More information:

- Maximum length: 20 characters

##### creditPayPlan (CreditPayPlan)

The installment plan information for an installment payment.

> **Note**: This parameter is returned when the value of _paymentResultInfo.funding_ is `BNPL_INSTALLMENT`.

###### installmentNum (Integer )

The number of installment payments. The value of this parameter is fixed as `4`.

> **Note**: This parameter is returned when the value of _paymentResultInfo.funding_ is `BNPL_INSTALLMENT`.

More information:

- Maximum length: 8 characters

###### interval (String)

The interval of each installment payment. The valid value is `MONTH`.

> **Note**: This parameter is returned when the value of _paymentResultInfo.funding_ is `BNPL_INSTALLMENT`.

More information:

- Maximum length: 16 characters

#### promotionResult (Array <PromotionResult>)

Promotion result.

> **Note**: This parameter is returned when the buyer applied a promotion while placing an order.

##### promotionType (String, REQUIRED)

Promotion type. Valid values are:

`DISCOUNT`: a deduction from the regular price.

`INTEREST_FREE`: payment in interest-free installments.

More information:

- Maximum length: 32 characters

##### discount (Discount)

Discount information.

> **Note**: This parameter is returned when the buyer applied a promotion while placing an order.

###### discountName (String)

The discount name displayed in the default language.

More information:

- Maximum length: 128 characters

###### savingsAmount (Amount)

Discount amount.

###### value (Integer, REQUIRED)

The discount amount as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a 0-decimal currency).

> **Note**: For details about the smallest currency unit, see [Smallest unit of the currency](https://docs.antom.com/ac/ref/cc.md#ONkIe).

###### currency (String, REQUIRED)

A 3-letter currency code that follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.

#### paymentMethodType (String)

The payment method type that is included in payment method options. See [Payment methods](https://global.alipay.com/docs/ac/pm/enumeration_values) to check the valid values.

> **Note**: Please specify this field when selecting the Antom Chechkout Page integration.

More information:

- Maximum length: 64 characters

#### metadata (String)

Your metadata provided during the payment process.

> This parameter is returned when you provided value to the parameter in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API.

More information:

- Maximum length: 2048 characters

#### authExpiryTime (Datetime)

The expiration date and time of the authorization payment. You cannot capture the payment after this time.

> **Note**: This parameter is returned when the value of _paymentMethodType_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API is `CARD`.

More information:

- The value follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard format. For example, "2019-11-27T12:01:01+08:00".

## Response parameters

#### result (Result, REQUIRED)

A fixed value, which is sent to Antom to acknowledge that the notification is received.

##### resultCode (String, REQUIRED)

The value is fixed as `SUCCESS`.

More information:

- Maximum length: 64 characters

##### resultStatus (String, REQUIRED)

The value is fixed as `S`.

##### resultMessage (String, REQUIRED)

The value is fixed as `success`.

More information:

- Maximum length: 256 characters

## More information 

This section provides additional information about the key parameter. See the following parameter for details:

-   _paymentTime_: The successful execution time of this payment by Antom, that is, the date and time when the payment reaches a final state of success. This value is used as the start time of the subsequent cancellable and refundable time. For example, if the refundable time is 6 months, the final time to accept the refund is _paymentTime_ plus 6 months.

## Result process logic

Send the following message with fixed values to Antom after receiving the notification, to acknowledge that the notification from Antom is received:

```json
{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"success"
 }
}
```

If no such message is returned to Antom due to operation issues or network issues, Antom will intermittently send the notification until the required message is returned by the merchant. Resending of the notification will be performed within 24 hours after the first notification is sent. The notification will be resent up to eight times, with an interval of 0s, 2min, 10min, 10min, 1h, 2h, 6h, and 15h.

> **Note**: In the sandbox environment, if you do not return information in the specified format, Antom will not resend asynchronous notifications to you.

## Result/Error codes

| Code | Value | Message | Further action |
| --- | --- | --- | --- |
| USER_NOT_SUBMITTED | F | Payment timeout due to user's failure to submit. When using the landing page/SDK integration, a timeout will be triggered if the user fails to submit after launching the payment details fill-in page. | Re-initiate a payment. |
| USER_AUTHENTICATION_NOT_FINISHED | F | User authentication failed due to a timeout.  This error code is returned when authentication is not completed after the 3D Secure page is launched during payment. | Re-initiate a payment. |
| PICKUP_CARD | F | The card issuer requests that the merchant retain the card.  This typically arises in cases of suspected counterfeit or stolen cards. | Contact the issuer immediately or use another card to pay the transaction. |
| DOMESTIC_DEBIT_TRANSACTION_NOT_ALLOWED | F | Domestic debit transaction not allowed. (Regional use only) | Contact the issuer immediately or use another card to pay the transaction. |
| BLOCKED_BY_CARDHOLDER | F | This card has been locked by the user. | Contact the issuer immediately or use another card to pay the transaction. |
| RESTRICTED_CARD | F | The card issuer has imposed restrictions on where the card can be used. | Contact the issuer immediately or use another card to pay the transaction. |
| CARD_EXPIRED | F | Card has expired. | Check whether the value of paymentMethod.paymentMethodMetaData.expiryYear or paymentMethod.paymentMethodMetaData.expiryMonth is correct. If not correct, pass in the correct value. If correct, contact Antom Technical Support for detailed reasons. |
| ACCOUNT_CLOSED | F | The account is closed.  Please verify the account number for accuracy and do not attempt to process the same PAN or token again. | Contact the issuer immediately or use another card to pay the transaction. |
| INVALID_CVV | F | The CVV code is invalid. | Prompt the user to check if the entered CVV is correct. |
| INSTALLMENT_NOT_SUPPORTED | F | This card or merchant does not support installments. | This card does not support installment, please change a card to pay. |
| PAYMENT_METHOD_SYSTEM_ERROR | F | Payment method system error. | Issuer system error, please contact the issuer. |
| INVALID_INSTALLMENT_PLAN | F | The number or the interval of installment plans is incorrect. | Please adjust the number of installments and try again. |
| SUCCESS | S | Success | The payment is successful, no further action is needed. |
| ACCESS_DENIED | F | Access is denied. | Contact Antom Technical Support for detailed reasons. |
| INVALID_API | F | The called API is invalid or not active. | Contact Antom Technical Support to resolve the issue. |
| CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Contact Antom Technical Support for detailed reasons. |
| EXPIRED_CODE | F | The payment code is expired.  | The user needs to refresh the payment code. |
| FRAUD_REJECT | F | The transaction cannot be further processed because of risk control. If the user has already paid for the transaction, the transaction will be refunded.  | Contact Antom Technical Support when one of the following conditions is met:  You want to make an appeal.  The user does not receive the refund within two weeks. |
| INVALID_ACCESS_TOKEN | F | The access token is expired, revoked, or does not exist. | Check whether the accessToken is expired, revoked, or does not exist. Re-sign the contract and re-initiate the authorization signing process. |
| INVALID_CONTRACT | F | The parameter values in the contract do not match those in the current transaction. | Check whether the parameter values in the contract match those in the current transaction. If the values match, contact Antom Technical Support to troubleshoot the issue. |
| INVALID_MERCHANT_STATUS | F | The merchant status is abnormal because restrictions exist. | Contact Antom Technical Support for detailed reasons. |
| KEY_NOT_FOUND | F | The private key or public key of <span>Antom</span> or the merchant is not found. | Check whether the private key or public key exists. If not, upload the private key in Antom Developer Center. |
| MERCHANT_BALANCE_NOT_ENOUGH | F | The merchant balance is not enough. | Call the interface again after the merchant has sufficient balance. |
| NO_INTERFACE_DEF | F | API is not defined. | Check whether the URL is correct. Please refer to the endpoint in the API documentation. |
| NO_PAY_OPTIONS | F | No payment methods are available. | Contact Antom Technical Support for detailed reasons. |
| ORDER_IS_CLOSED | F | The transaction is closed and cannot be paid again.  | Use a new paymentRequestId to initiate a payment. |
| ORDER_NOT_EXIST | F | The order does not exist. | Check whether paymentId is correct. |
| PARAM_ILLEGAL | F | The required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
| PAYMENT_AMOUNT_EXCEED_LIMIT | F | The payment amount is greater than the maximum amount allowed by the contract or payment method. | Check whether the payment amount exceeds the limit or use a lower amount and try again. Contact Antom technical support to know the specific limitation. |
| PAYMENT_COUNT_EXCEED_LIMIT | F | The maximum number of payments exceeds the limit that is specified by the payment method. | Contact Antom Technical Support to know the specific limitation. |
| PAYMENT_NOT_QUALIFIED | F | The merchant is not qualified to pay because the merchant is not registered, does not have a contract for Tokenized Payment, or is forbidden to make a payment. | Contact Antom Technical Support for detailed reasons. |
| PROCESS_FAIL | F | A general business failure occurred. | It is recommended that you contact Antom Technical Support to troubleshoot the issue. |
| RISK_REJECT | F | The transaction cannot be further processed because of risk control. If the user has already paid for the transaction, the transaction will be refunded.  | If the user does not receive the refund within two weeks, contact Antom Technical Support. |
| SUSPECTED_RISK | F | The transaction cannot be further processed because of suspected security issues. You can retry the transaction after one working day.  If the transaction is not secure and the user has already paid, the transaction will be refunded.  | Contact Antom Technical Support when one of the following conditions is met:  The transaction cannot be further processed after you retry. The user does not receive the refund within two weeks. |
| SYSTEM_ERROR | F | A system error occurred. | Do not retry, and contact Antom Technical Support for more details. |
| USER_AMOUNT_EXCEED_LIMIT | F | The payment amount exceeds the user payment limit. | Create a new payment by using an amount less than or equal to the account's available balance, or contact Antom Technical Support. |
| USER_BALANCE_NOT_ENOUGH | F | The payment cannot be completed because the user balance in the corresponding payment method is insufficient. | Please top up the account or choose other payment methods. |
| USER_KYC_NOT_QUALIFIED | F | The payment failed because of the user's KYC status. The user is either not KYC compliant, or the KYC status is not qualified for this transaction (for example, limitations on the payment amount or product information). | Complete the KYC verification first. |
| USER_NOT_EXIST | F | The user does not exist on the wallet side. | Contact Antom Technical Support for detailed reasons. |
| USER_PAYMENT_VERIFICATION_FAILED | F | The user is restricted from payment on the payment method side. | Contact Antom Technical Support to know the specific reasons. |
| USER_STATUS_ABNORMAL | F | The user status is abnormal on the payment method side. | Contact Antom Technical Support to know the specific reasons. |
| VERIFY_TIMES_EXCEED_LIMIT | F | The current verification code failed to pass the payment verification too many times.  | The user must get a new verification code. |
| VERIFY_UNMATCHED | F | The verification code is invalid.  | The user must get a new verification code. |
| AUTHENTICATION_REQUIRED | F | 3D Secure authentication is required. | Reinitiate the payment and redirect the user to perform 3D Secure authentication. |
| PAYMENT_PROHIBITED | F | The payment cannot be processed because the goods are prohibited from sale in the country. | You are not allowed to appeal against this transaction. |
| CARD_NOT_SUPPORTED | F | The card used for the transaction is not supported. | Use another card to pay the transaction. |
| INVALID_EXPIRATION_DATE | F | The value of paymentMethod.paymentMethodMetaData.expiryYear or paymentMethod.paymentMethodMetaData.expiryDate is invalid.  | Check whether the value of paymentMethod.paymentMethodMetaData.expiryYear or paymentMethod.paymentMethodMetaData.expiryDate is correct:  If not correct, pass in the correct value.  If correct, contact AntomTechnical Support for detailed reasons. |
| INVALID_CARD_NUMBER | F | The number of the card used for the transaction is invalid.  | Check whether the value of paymentMethod.paymentMethodMetaData.cardno is correct:  If not correct, pass in the correct value and try again.  If correct, this card is not supported by the transaction, use another card to pay the transaction. |
| DO_NOT_HONOR | F | The payment is declined by the issuing bank.  | Retry the payment using a different card or contact the issuing bank. |
| INVALID_AMOUNT | F | The transaction was declined by the issuing bank due to various reasons. For example, the specified amount is invalid or exceeds the maximum amount limit.  | Contact Antom Technical Support for detailed reasons. |
| INVALID_CPF | F | The provided CPF number is invalid. | Please confirm your identification details and try again. |
| REFERRAL_ISSUER | F | The transaction was declined by the card issuer. | The cardholder should contact their issuer for clarification and retry after resolution. |
| TRANSACTION_NOT_PERMITTED | F | The card issuer declined the transaction on this card/account. | Use an alternative payment method or contact the issuer. |
| LIFECYCLE | F | Declined due to invalid card data. | Verify card details (number/expiry/CVV). |
| LAW_VIOLATION | F | The issuing bank declined the transaction. | Contact the issuer for details. |
| PIN_REQURED | F | PIN is mandatory but not provided. | Reattempt with a valid PIN. |
| LOST_CARD | F | Lost card, pick up card (fraud account). | Contact the issuer immediately. |
| STOLEN_CARD | F | Stolen card, pick up (fraud account). | Contact the issuer immediately. |
| SECURITY_REJECT | F | The transaction was declined due to a security issue detected by the card issuer. | Verify Information: Ensure that all card details, including the CVV/CVC and billing address, are entered correctly.Contact Issuer: Reach out to the bank or financial institution that issued the Mastercard for more information and assistance.Use Alternative Payment: If immediate payment is necessary, consider using a different card or payment method. |
| BLOCKED_FIRST_USED | F | When a card is either temporarily blocked, has not been activated for first use, or is subject to special conditions that prevent processing (e.g., new cardholder not activated). | Activate the card or check with the issuer. |
| CANNOT_VERIFY_PIN | F | PIN verification failed. | Retry without PIN or contact issuer. |
| SURCHARGE_NOT_ALLOWED | F | Surcharge not permitted on this card. | Contact the issuer. |
| EXCEEDS_PREAUTHORIZED_AMOUNT_LIMIT | F | Transaction exceeds preauthorized approval limit. | Reduce amount or request higher limit. |
| STOP_RECURRING_PAYMENT | F | The buyer has requested to cancel or stop their subscription. | The cardholder should contact their issuer for clarification and can either try again after resolving the issue. |
| POLICY | F | Policy restrictions. | The cardholder should contact their issuer for clarification. |
| INVALID_TRANSACTION | F | Invalid transaction. | Do not retry, and contact Antom Technical Support for more details. |
| RE_ENTER_TRANSACTION | F | Transaction temporarily cannot be processed. | The cardholder should contact their issuer for clarification and may attempt again once the issue is resolved. |
| TRANSACTION_NOT_ALLOWED_AT_TERMINAL | F | Transaction is not allowed at terminal. | The cardholder should contact their issuer for clarification and can either try again after resolving the issue. |
| INVALID_MCC | F | Invalid MCC. | Do not retry, and contact Antom Technical Support for more details. |
| NO_SELECTED_ACCOUNT | F | Used when the cardholder has selected specific account but does not have. | May reattempt using correct account type. |
| INVALID_ISSUER | F | It is not possible to reach out to the buyer's issuer for transaction authorization. | Do not retry. Please contract your issuer to confirm the card status. |

## Request

### SUCCESS_PAYMENT_RESULT

```json
{
  "notifyType": "PAYMENT_RESULT",
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  },
  "paymentRequestId": "2020010123456789XXXX",
  "paymentId": "2020010123456789XXXX",
  "paymentAmount": {
    "value": "8000",
    "currency": "EUR"
  },
  "paymentCreateTime": "2020-01-01T12:01:00+08:30",
  "paymentTime": "2020-01-01T12:01:01+08:30"
}
```

### FAIL_PAYMENT, FAILED_PAYMENT_RESULT

```json
{
  "result": {
    "resultStatus": "F",
    "resultCode": "ORDER_IS_CLOSED",
    "resultMessage": "The order is closed."
  },
  "notifyType": "PAYMENT_RESULT",
  "paymentId": "114224160915574411714286711949108821ECthvfMDVP20201227000329XXXX",
  "paymentRequestId": "PAY_2020122819422XXXX",
  "paymentTime": "2020-12-28T19:42:24+08:00",
  "paymentAmount": {
    "currency": "PHP",
    "value": "1314"
  },
  "paymentCreateTime": "2020-12-28T19:42:24+08:00"
}
```

### PAYMENT_PENDING_RESULT

```json
{
  "notifyType": "PAYMENT_PENDING",
  "paymentAmount": {
    "currency": "PLN",
    "value": "1212"
  },
  "paymentCreateTime": "2022-04-01T16:37:31+08:00",
  "paymentId": "083731164880225121121416522615603095xyGkJbdkym202203311003871293",
  "paymentRequestId": "PR_1644317047523158228811559",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```

### ALIPAYPLUS_PAYMENT_RESULT

```json
{
  "notifyType": "PAYMENT_RESULT",
  "paymentAmount": {
    "currency": "IDR",
    "value": "14900000"
  },
  "paymentCreateTime": "2022-08-08T23:10:50-07:00",
  "paymentId": "20220809154010800100188630284840601",
  "paymentRequestId": "ALIG_20220809011049_2584925181",
  "paymentTime": "2022-08-08T23:11:29-07:00",
  "pspCustomerInfo": {
    "pspCustomerId": "20210608111215830126DANAW3ID856277393465",
    "pspName": "DANA"
  },
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```

### CARD_AUTH_SUCCESSFUL

```json
{
  "paymentResultInfo": {
    "cardBrand": "SAMSUNG",
    "cardNo": "123456789000****",
    "funding": "DEBIT",
    "issuingCountry": "KR",
    "paymentMethodRegion": "KR",
    "cardholderName": "Jane Doe",
    "cardBin": "541111",
    "lastFour": "2345",
    "expiryMonth": "12",
    "expiryYear": "26"
  },
  "notifyType": "PAYMENT_RESULT",
  "paymentAmount": {
    "currency": "KRW",
    "value": "30000"
  },
  "paymentCreateTime": "2023-01-09T22:07:22-08:00",
  "paymentId": "2023011019401080010018892020491****",
  "paymentRequestId": "20230110140713pay_req_APM_evie126396****",
  "paymentTime": "2023-01-09T22:07:34-08:00",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```

### CARD_AUTH_WITH_3DS_AUTH_SUCCESSFUL

```json
{
  "paymentResultInfo": {
    "cardBrand": "SAMSUNG",
    "cardNo": "123456789000****",
    "funding": "DEBIT",
    "issuingCountry": "KR",
    "paymentMethodRegion": "KR",
    "cardholderName": "Jane Doe",
    "cardBin": "541111",
    "lastFour": "2345",
    "expiryMonth": "12",
    "expiryYear": "26",
    "threeDSResult": {
      "cavv": "AJkBCVSAkwAAAABkcCCQdAAA****",
      "dsTransactionId": "e39d744b-b3af-4e0f-9141-c74d1979****",
      "eci": "05",
      "threeDSVersion": "2.1.0"
    }
  },
  "notifyType": "PAYMENT_RESULT",
  "paymentAmount": {
    "currency": "KRW",
    "value": "30000"
  },
  "paymentCreateTime": "2023-01-09T22:07:22-08:00",
  "paymentId": "2023011019401080010018892020491****",
  "paymentRequestId": "20230110140713pay_req_APM_evie126396****",
  "paymentTime": "2023-01-09T22:07:34-08:00",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```

### WALLET_INSTALLMENT_PAYMENT_SUCCESSFUL

```json
{
  "notifyType": "PAYMENT_RESULT",
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  },
  "paymentRequestId": "2020010123456789****",
  "paymentId": "2020010123456789****",
  "paymentAmount": {
    "value": "8000",
    "currency": "EUR"
  },
  "paymentResultInfo": {
    "funding": "BNPL_INSTALLMENT",
    "creditPayPlan": {
      "installmentNum": 4,
      "interval": "MONTH"
    }
  },
  "paymentCreateTime": "2020-01-01T12:01:00+08:30",
  "paymentTime": "2020-01-01T12:01:01+08:30"
}
```

### PAYMENT_WITH_CKP

```json
{
  "notifyType": "PAYMENT_RESULT",
  "paymentAmount": {
    "currency": "EUR",
    "value": "8000"
  },
  "paymentCreateTime": "2020-01-01T12:01:00+08:30",
  "paymentId": "2020010123456789XXXX",
  "paymentRequestId": "2020010123456789XXXX",
  "paymentTime": "2020-01-01T12:01:01+08:30",
  "paymentMethodType": "GRABPAY_SG",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success",
    "resultStatus": "S"
  }
}
```

## Response

### SUCCESS

```json
{
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  }
}
```