CheckStatus

Purpose

Checks the transaction's current status on a payment gateway.

Mandatory

No.

Input Parameters

An associative array that contains the following values:

Param name Description Type
config The plug-in configuration values saved in the Billing database. array
environment The Billing environment information. Environment
account_info The account's details. AccountDetails
vendor_info The vendor's details. AccountDetails
document_info The payment document description. DocumentInfo
payment_method

The attributes of the previously saved payment method.

This contains name-value pairs returned by the ADD_NEW_METHOD parameter.

array
previous_transaction_data

(Optional) Data saved in the previous transaction.

This contains name-value pairs returned previously in the TRANSACTION_DETAILS array.

array

transaction_category

The transaction category for merchant-initiated payments (relevant and available only for transaction_initiator = MIT). Possible values are:

  • C: for Unscheduled Credential on File payments,
  • R: for recurring payments (payments at regular intervals).
string

transaction_moto

The parameter that defines whether it is the MOTO transaction. Possible values are:

  • true: for MIT payments on behalf of a customer,
  • transaction_moto is not sent: for CIT payments and recurring or renewing MIT payments.
boolean

transaction_initiator

The transaction initiator. Possible values are:

string
ref_no The Billing transaction identifier. integer
transaction_amount The transaction amount. double
currency_iso The currency of the transaction amount in the ISO format (for example, USD or EUR). string

current_lang

The current language. string
client_ip The IP from the client computer. string

The example of input parameters is shown below as a JSON object:

Response

An associative array that contains the following keys:

Param name Description Type
STATUS

(Mandatory) The method execution status. Valid values for the CheckStatus method are:

  • APPROVED: The request is successfully processed and the payment gateway approved the transaction.
  • DECLINEDThe request is successfully processed and the payment gateway declined the transaction.
  • FRAUD: The request is successfully processed and the payment gateway declined the transaction due to a suspected fraud.
  • 3DSECURE: The request is successfully processed and the payment gateway requires a customer to be redirected to an Authentication page at the 3D Secure Gateway server.
  • PENDING: The request is successfully processed, but the transaction has the pending status in the payment gateway. The NEXT_TRANSACTION_GAP parameter may be used together with this status, so Billing can schedule the CheckStatus method call to verify whether the status is changed in the payment gateway. Refer to the NEXT_TRANSACTION_GAP parameter for details.
  • DECLINED: The request processing failed. The reason can be sent in the TEXT parameter.
  • ERROR: An error occurred while processing the request. The error reason can be sent in the TEXT parameter.
string
TEXT (Optional) The array that contains the following parameters:
  • customer_message: Contains text that will be displayed to a customer as the status message (String, optional).
  • vendor_message: Contains text that will be displayed to a vendor (String, optional).
array
TRANSACTION_DETAIL

(Optional) The array that will be associated with the current transaction and will be represented back in an unchanged form as the value of the previous_transaction_data parameter at the next call of transaction processing methods of the plugin.

Note: Billing looks up the trans_id parameter that identifies a transaction on the gateway side to display it in the provider's UI. So, we highly recommend that you use this parameter.

array
NEXT_TRANSACTION_GAP

(Optional) The delay, in seconds, to dispatch the CheckStatus method call. This parameter may be used when the STATUS parameter is PENDING.

When Billing receives this parameter, it will schedule the CheckStatus method call event to be dispatched in NEXT_TRANSACTION_GAP seconds. It may be useful when the payment gateway expects API consumers to actively check a transaction status.

integer

The example of a response is shown below as a JSON object:

Example

The Stripe plugin implements the CheckStatus method. The example below shows how it is implemented:

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.