COF purchase registration
In addition, use the following materials to gain a fuller understanding of processing COF purchases:
- articles On-demand COF purchase and Scheduled COF purchase in the section Payment models and statuses that provide a general description of processing COF purchases in the ecommpay payment platform and cover information about operations utilised to execute a payment of this type and statuses that are assigned to the payment and the operations performed within it.
- articles of the Payment methods section containing a description of COF purchase registration via Payment Page with the focus on the specific features of the payment method used and information about relevant requests and callbacks.
General information
The ecommpay payment platform allows you to register COF purchases in a variety of ways by processing payments via Payment Page, Gate (details), and Dashboard (details) as well as by migrating information about COF purchases and payment card tokens (details). This article covers information about registering COF purchases via Payment Page by performing one-time purchases and payment instrument verification.
Recurring purchase is a payment type which uses only one request to make one (recurring) transfer of funds from customer to merchant. Recurring payments are processed by using previously stored payment credentials with no need for validation of the payment instrument (such as card validation code, or CVC).
Support for COF purchases processing may be convenient when building lasting customer relationships when you would like to offer your customers an option to make purchases with no extra effort on their side.
In terms of processing COF purchase registration using Payment Page, the basic steps that the customer performs may be selecting payment instrument, specifying its details and waiting for notification about the payment processing result.
The payment platform supports the following COF purchase types:
- OneClick purchases are initiated by the customer and do not depend on any schedule or predetermined payment amount. For instance, the customer can make a one-click purchase in order to watch a movie online.
- Autopurchases are initiated by merchant and do not depend on any schedule or predetermined payment amount. For example, when customer's mobile phone account balance falls below specific threshold, merchant may automatically top up the account.
- Regular purchases are initiated by the merchant and are based on specific schedule and fixed amount. The schedule may be stored either on the payment platform side or in your web service. For instance, weekly payment for online subscription may be regularly debited to customer's account.
Registration of any type of COF purchase requires customer's consent for storage of their payment information and its usage on certain terms.
COF purchase is registered by using the Purchase and Card Verify operation modes. To initiate COF purchase processing, change its terms, cancel it, or to issue a refund, the merchant can use Gate (for all types of COF purchases) and Dashboard (for regular COF purchases).
If there are changes in the payment provider's service settings, you may need to register COF purchase again. In such cases, the merchant receives an email from the ecommpay technical support with a list of IDs of COF purchases that should be re-registered. For this registration, merchant must notify customers of the termination of previous debits and the need to initiate new ones by unlinking the saved card, and then initiate registration in the platform. Each newly registered COF purchase receives a new ID, which is sent to the merchant in the callback with information on successful registration.
Workflow
COF purchase registration by using Payment Page requires the merchant web service to do the following:
- Create and send a request for opening Payment Page to the payment platform.
- Receive callback with the result of the request processing from the payment platform.
COF purchase registration may involve auxiliary procedures:
- 3‑D Secure authentication, in terms of which the customer is transferred to the service of the issuer where the customer needs to complete authentication using the code received by SMS or performing other required steps, or loading page is displayed (while issuer confirms authentication with no user input required).
- Customer authentication on merchant's request, in terms of which an additional page is displayed and the customer needs to enter special verification code received by SMS or in a bank statement; this type of authentication involves a temporary hold of the agreed amount on the customer's account. This type of authentication can be used instead of 3‑D Secure authentication or in addition to it.
- Submission of additional payment information, in terms of which notification and additional fields to be completed are displayed on the payment form. The fields should be completed on the same page of the payment form.
These procedures do not require any additional effort on the merchant's web service side, but usually require customer effort.
The following sections cover information about request and callback formats to use when registering COF purchases by using payment cards. For more information about request and callback formats to use when registering COF purchases by using alternative payment methods, see Methods.
Request format
The format of the request for opening Payment Page to register COF purchases is the same as the format described in the Payment Page API Description. When creating request, you should consider the following:
- The basic minimum of parameters required for any payment must be specified:
project_id
—project identifier obtained from ecommpaypayment_id
—payment identifier unique within the projectcustomer_id
—customer identifier unique within the projectpayment_amount
—payment amount in the smallest currency unit (to register COF purchases in terms of payment instrument verification, you need to specify the0
value)payment_currency
—payment currency code in the ISO-4217 alpha-3 formatsignature
—request signature generated after all required parameters were specified (for more information, see the section Signature generation and verification)
- For registering a COF purchase along with payment instrument verification, the
mode
parameter should be additionally specified. This parameter indicates the Payment Page operation mode and should have thecard_verify
value. - For specifying the properties of a COF purchase, the request should contain the
recurring
parameter as a JSON object—if the payment form is opened via the JavaScript library of ecommpay—or as a string generated as a result of URL encoding—if the payment form is opened via another method. Therecurring
parameter must contain the main details about COF purchase registration:register
, boolean—parameter which indicates whether the payment should be registered as recurring and which should be assigned thetrue
value.type
, string—COF purchase type which should be assigned one of the following values:C
—one-click purchaseU
—autopurchaseR
—regular purchase
period
, string—frequency of debits (for a regular purchase), this parameter should be assigned one of the following values:D
—dailyW
—weeklyM
—monthly (if the set day is not available in the next month, for example, 31, the payment is performed on the last day of the month)Q
—quarterlyY
—annually
time
, string—time of performing subsequent debits (for a regular purchase) inhh:mm:ss
format. The parameter is used if theperiod
parameter is specified in the request.interval
, integer—interval of performing regular purchases. This parameter should be assigned a numeric value from1
to100
(for example, each three weeks) and is necessarily used in conjunction with theperiod
parameter.
- For specifying the properties of a regular purchase, the
recurring
parameter can also contain other details:amount
, integer—fixed amount of subsequent debits in the smallest currency unitexpiry_day
, integer or string—COF purchase expiry dayexpiry_month
, integer or string—COF purchase expiry monthexpiry_year
, integer—COF purchase expiry yearstart_date
, string—date on which the first debit is performed in thedd-mm-yyyy
format (the parameter is necessarily used in conjunction with thescheduled_payment_id
parameter)scheduled_payment_id
, string—identifier assigned to the payment within which scheduled debits are performed; it must differ from the identifier of the payment made to register a COF purchase and must be unique within the project; (also, not to be confused with the debiting series record identifier specified in theid
parameter of therecurring
object that is passed in the callback with the COF purchase registration information)Warning: If the identifier that should be assigned to the COF purchase (scheduled_payment_id
) matches the identifier of the payment made to register a COF purchase (payment_id
), the request to register a COF purchase is declined.
- To make sure that all required parameters are specified if the capability of collecting such customer data is not implemented (details), pass at least one of the following parameters in the request:
customer_email
orcustomer_phone
. - For displaying the payment form to the customer in a specified language, the
language_code
parameter should be used with the language code specified in the ISO 639-1 alpha-2 format. If this parameter is not specified, the payment form is displayed in the language selected automatically (by the browser language, by the region, or by default—learn more). - For adding a payment description, the
payment_description
parameter can be used. The value of this parameter is a string displayed to the customer on the page with the information about the operation result and to the merchant in the Dashboard interface and sent to the merchant in the callback with information about the payment result. - Additionally, it is possible to use any other parameters available for the Purchase and Card Verify modes of the Payment Page operation. The full list of parameters for opening Payment Page is provided in the Parameters for opening payment form section.
Thus, a request for COF purchases registration must include:
- in terms of payment instrument verification—parameters for opening Payment Page for payment instrument verification and the
recurring
parameter with information about COF purchase registration. - in terms of purchase processing—parameters for opening Payment Page for processing a purchase and the
recurring
parameter with information about COF purchase registration.
Callback formats
The format of the callback to notify the merchant about the result of purchase processing or payment instrument verification with COF purchase registration is the same as the format described in the Callbacks section.
The following is an example of a callback with information about successful registration of COF purchase using the card 431422******0056
; COF purchase is registered for the customer customer_10
in terms of the project 42
.