Examples
After you have looked at some examples below, be sure to head on over to our live demo page and try out your own examples!
At a bare minimum, you must:
If you don't provide an amount, an amount field will be included in the payment popup. Generally, this would only be used when taking donations and not accepting a specific payment amount.
This code . . .
Produces a "Pay Now" button on the page (the "Pay Now" text is configurable)
That when clicked produces this popup:
Configuration options can be grouped together when calling the payButton()
method or added separately. The following are all equivalent:
As you saw in the configuration page there are many options that can be configured. Below we are adding an optional billing address and changing the heading text of the popup.
The Hosted Payment Page is responsive and designed use the screen efficiently. The same screen as above but viewed on a larger, non-mobile screen:
By setting the "show-save-card-option", your customers can save their card data securely in our vault. A token is returned from the sale request that can be stored on your servers without storing sensitive card data.
Your customer would then have the option of saving their card information for future purchases.
They can even save a meaningful name for their card:
Depending on how your site is designed, you may have a need to save a card token without doing a sale.
This code . . .
Produces an "Add payment method" button on the page (the "Add payment method" text is configurable)
That when clicked produces this popup:
The next time the customer logs into your site, you can provide saved payment methods to make the checkout process even easier. You simply provide the token, card type, and description that was returned from the token-only request or the token returned from the sale with card card option request.
The next time the customer logs into your site, you can provide saved payment methods using the Clearent.addToken() method to make the checkout process even easier. You simply provide the token, card type, and description that was returned from the token-only request or the token returned from the sale with card card option request.
The saved cards are presented to the user in a dropdown list:
Ready to try some examples on your own? Visit our live demo page and try out your own examples!