Payforit Single Click With The Charge To Account Gateway
Overview
The Payforit scheme now includes optional Single Click purchasing.
If a merchant site offers Single Click, the end user can opt in after making a purchase; subsequently, the user can make one-off payments to the same merchant site by selecting a graphical button, with no need to confirm their purchase.
This guide explains how to offer Single Click purchasing using the Charge To Account Gateway. It assumes that you are familiar with the documentation on making one-off charges with the Charge To Account Gateway.
Contents
- Enabling Single Click
- Single Click user experience
- Offering a Single Click purchase
- Displaying the Single Click button
- Single Click workflow
- Multiple buttons on a single page
- Further information
Enabling Single Click
Single Click is available to end users visiting a site with a WAP browser. End users visiting with a web browser or on a smartphone via a Wi-Fi connection will continue to use the standard web workflow described in Web Payforit.
If you wish to use Single Click, please contact your account manager to arrange for activation. Note that it must be enabled separately for each brand.
Single Click user experience
For each item available for purchase by Single Click, the end user sees a button like this on the merchant site WAP/XHTML page:

The first time the end user selects a Single Click button, they confirm their purchase as usual for Payforit. On the post-confirmation screen, they are then offered the chance to opt-in to Single Click (as well as the usual Payforit marketing opt-in if requested).
Once the user has opted in, the next time they use Single Click, they will be charged and taken straight to the fulfilment URL with no confirmation screen.
The user then stays opted in until one of the following happens:
- their Single Click spend (on this brand) reaches £20
- 30 days pass since the initial opt-in
- they switch their number to a different network
At this point, the user needs to opt in again. The Charge To Account Gateway automatically handles opt-in renewal.
Offering a Single Click purchase
To offer the end user a Single Click transaction, make a charge request using the One-off Charges API with the singleclick parameter set to yes. (Subscription charging with Single Click is not supported).
With Single Click, you make the request when you wish to offer the user a Single Click button; this differs from a one-off or subscription request, where you would make the request only after the end user has initiated a purchase.
This table explains some points to bear in mind about selected parameters for a Single Click request. The full parameters are documented on the One-off Charges API page.
| Parameter | Required? | Allowed values for Single Click | Notes |
| singleclick | Yes (for Single Click) | yes | Indicates that this is a Single Click transaction. |
| postConfirmationPage | No | confirmation | The request will be rejected if the value is none. If the user is already opted in to Single Click for this brand, no post-confirmation page will be shown even if the value is confirmation. |
| optIn | No | yes, no | There is no opportunity for a marketing opt-in if the user is opted in to Single Click; in this case, the Gateway will ignore any optIn value. |
Assuming the request is valid, the Charge To Account Gateway returns a 200 HTTP response with a body similar to this:
outcome:userinputrequired outcomeReasonId:2002 outcomeReasonText:Missing information that requires user input. redirectUrl:http://mxpay.net/3/avqS8Y... imageUrl:http://mxpay.net/3/nZBkPGM... singleclickId:15730809
The imageUrl parameter specifies the URL of the payment button image, displaying the price specified in your request.
The singleclickId parameter is a unique identifier for this Single Click request. The transactionId normally used to identify a Charge To Account transaction is not assigned until the end user clicks on the button. Later notifications will contain both the singleclickId and the transactionId, so your application can match them up.
Displaying the Single Click button
The Single Click button must be embedded in the WAP/XHTML product page with markup similar to this:
<a href="redirectUrl"> <img src="imageUrl" /> </a>replacing redirectUrl and imageUrl with the URLs provided by the Gateway.
The dimensions of the button are always 180 pixels wide by 54 pixels high.
For compliance with the Single Click scheme and for the transaction to work you must observe the following rules when presenting the button:
- You must design your pages so that the button is rendered on the mobile handset without being obscured or distorted, and the product it refers to must be clear.
- Each redirectUrl/imageUrl pair returned must be used together; for example, it is not permissible to use a redirectUrl returned from one request as the link target for an imageUrl from a different request.
- The end user handset must have requested the image before visiting the redirectUrl.
- The end user must follow the redirectUrl within 30 minutes of downloading the image.
- You may only present each redirectUrl/imageUrl pair to one end user; once an imageUrl has been downloaded by one MSISDN, it will not work for another (you can use the Gateway's Anonymous User ID API to distinguish users).
- Each redirectUrl/imageUrl pair can only be used once, and is only valid for 24 hours.
Single Click workflow
The diagrams below show the process of charging a user using Single Click.
Workflow for initial sign-up
-
The end user arrives at the product page on the merchant site.
In order to present a Single Click button, your application makes a Single Click request, for example:
http://cta.mxtelecom.com/api?username=youruser& password=yourpass& responseFormat=plain& action=charge& transactionMode=AutoConfirm& amount=500& currency=GBP& productGroup=Wallpapers& productCat=Nature& productSubCat=Wild& productName=Tiger+Wallpaper+4& productDescription=Crouching+Siberian+Tiger+Wallpaper+004& isAdult=nonadult& postConfirmationPage=confirmation& singleclick=yes Your application receives an HTTP response with the imageUrl and redirectUrl, as well as a singleclickId identifier.
Your application presents the payment button to the user.
The end user clicks on the button.
The Gateway returns the usual Payforit payment page.
The end user confirms their purchase.
The Gateway charges the end user's mobile account.

The Gateway uses the Notification API to inform your application of the outcome of the charge with a notification like this:http://merchant.example.com/mxpay?
transactionId=5147761& singleclickId=15730809& updateId=92647076& state=confirmed& transactionState=confirmed& requirefulfilmentUrl=yes& date=2008-04-29+11%3A46%3A12+%2B0100& msisdn=447700900999& uniqueUserIdentifier=Lrmi9uBI9H& network=TMOBILEUK& useragent=SonyEricssonD750i& channel=wap Your application responds with the fulfilment URL (in the case of a successful charge, this would usually be the URL to download the purchased content).
-
The Gateway directs the user to a Payforit UI screen with a Single Click opt-in, as well as the marketing opt-in if requested:

The link to "What is Payforit Single Click?" goes to a standard explanation to comply with the Payforit guidelines.
By default, the Single Click opt-in is not selected.
The user submits this screen with their opt-in preferences selected.
The Gateway notifies your application about the user's Single Click opt-in status with a notification like this: http://merchant.example.com/mxpay?
transactionId=5147761& singleclickId=15730809& singleclickOptIn=yes& marketingOptIn=no The Gateway redirects the user to the fulfilment URL.
Workflow for opted-in user
The workflow for an opted-in user is the same as above up to step 5.
Once the user clicks on the Single Click button, the Gateway immediately attempts the charge.
The Gateway notifies your application of the charge outcome and requests a fulfilment URL. The user is directed straight to the fulfilment URL with no confirmation steps.
The Gateway does not send a marketing/Single Click opt-in notification if the user is already opted in.
Multiple buttons on a single page
You may wish to present a list of several products, for example all the wallpapers of a certain type, each with its own Single Click buy button.
This is supported by the Charge To Account Gateway. Simply send multiple requests for all the imageUrl/redirectUrl pairs you require. Bear in mind these requirements:
- You must ensure that prices and product information are presented in a way that is clear and not confusing to the end user.
- The default link must reside on the first price on the page or the lowest priced item, and it must be clear that this is the default link.
- A button cannot be reused once clicked, so if a page contains multiple buttons for items of the same price, each one should use a separate imageUrl/redirectUrl pair so that if the end user returns to that page after clicking one button, they can purchase additional items.
Further information
See the latest version of the official Payforit Scheme Rules for more information about Single Click user experience and regulatory compliance.

