Payments – Hosted Payment Page (HPP) - Online Payments

Processing a payment

When you use the Simulate Live Environment option in our integration environment, the payment page is displayed where you can enter some test card details or select an alternative payment method. For more information, see Testing.

When you simulate a successful or failed payment in our integration environment, we send you back a webhook to notify you about the payment status, for example when the payment changes from Pending to Paid. If you haven’t already done so, you need to tell us where to send these notification webhooks. For information, see Where should we send payment status updates?

You can then use the paymentJobReference and paymentReference from the notification webhook to check the status of the order, update your system or database and continue with your own business processes for arranging fulfilment.

Tip: For security reasons, we recommend that you update an order only when you receive the payment status notification from us. A notification from our Cashflows Gateway assures you that a payment request has not been intercepted during transfer.

When we direct shoppers back to your website after we finish processing their payments, we direct them back to the confirmation webpage that corresponds to the status of their payment (successful, failed or cancelled). By default, we use the addresses of the pages (return URLs) that you set up in Cashflows Go. For information, see Where should we redirect shoppers after payment processing?

If your business has more than one website for selling different things, you can override the default address and tell us to use a different one that you specify in the payment job request. For information, see How to override a default return URL.

How to override a default return URL

When you use our Hosted Payment Page, we provide default pages to display when we direct a shopper back to your website after a successful, failed or cancelled payment. You can use these default pages, or you can display your own. You just need to set the addresses (return URLs) of the pages that you want us to display instead. You do this in Cashflows Go. For information, see Where should we redirect shoppers after payment processing?

Sometimes you might not want to use our default pages or yours. For example, if your business has more than one website for selling different things, you can override the default page. You can use an individual payment job request to tell us where to direct the shopper. The shopper then returns to your website via a webpage that relates to their purchase rather than the default page. For recurring payments, you may not want to specify a return URL at all.

To override a default return URL:

1.     Include the return URL, for example https://www.mywebshop.com?status=success, in the create payment job request.

Example

{"amountToCollect": "10.00", "currency": "GBP", "locale": "en_GB", "order": {"orderNumber":"Your ref1", "billingAddress" : {"firstName" : "Alex", "lastName" : "Smith"}, "billingIdentity": {"emailAddress": "alex@test.com"}}, "parameters": { "returnUrlSuccess": "https://www.mywebshop.com?status=success", "returnUrlCancelled": "https://www.mywebshop.com?status=cancelled", "returnUrlFailed": "https://www.mywebshop.com?status=failed"}}

Back to top