Skip to main content
Skip table of contents

How to Process real-time Card transactions

In order to process a real-time card transaction, the Payrix platform offers a solution to have the customer submit payment via API on your own payment page or the Payrix Hosted Payment Page (HPP).

Note - If you are using your own payment page, ensure it is compliant with our eDDR requirements checklist.

Note - If you are using the Payrix HPP to process a real-time card payment AND save payment details for future payments, ensure the ‘savepayer’ property field within the API body request is set to true.

The Payrix API offers a few API solutions when processing real-time card transactions, please refer to the headings on the right to jump to the documentation relevant to your solution.


Tokenised real-time card transaction (Software managed payment page)

The Payrix platform offers a JavaScript suite which will tokenise the data on the page which can used to add the card details to an existing payer, or it can be used to make a live real-time card transaction against those details.

The Payrix JavaScript can be found here in our API documentation - Building a Webpage:


Tokenised real-time card transaction

A live card transaction is referred to within Payrix’s system as a real-time transaction with card details submitted for immediate processing. This can be completed in two ways via our API:

Sample flow:

Tokenised real-time card transaction with payment details saved to record

A live card transaction can be submitted for immediate processing whilst saving the payers payment details securely. This can be completed via our API:

Must ensure the payer property field is included within the API body AND the ‘savepayer' property is set to true.

Note - If you are using your own payment page, ensure it is compliant with our eDDR requirements checklist.

Once a payer submits their payment details, future payments can be either processed via POST Process a transaction using saved card details (real-time card transaction - immediate processing) OR via non real-time card debit (2 Business day settlement).

Sample flow:

Real-time charge stored card

A live card transaction can be submitted for immediate processing if the payers payment details have been saved. This will allow the ability to charge the payers stored card in real-time and receive an immediate transaction result by simply using the API below:


Q: How to determine the result of a real-time card transaction via API / software payment page

When processing a real-time tokenised card transaction, the result is returned in real-time.

  • If the response returns a statuscode of 'C' or an 'S’ you can presume the transaction was successful.

    • If you are using Payrix merchant facility you will see a statuscode of ‘C' (Cleared - Processed by Payrix and debited from Payers account) immediately.

    • If you are using your own merchant facility, you will typically see a status of 'S' (Settled - Funds settled).

  • If the response returns a statuscode of 'F', the transaction was declined with the rejection reason supplied in the status description.

    • If a transaction is rejected with a decline reason supplied by the issuer we will return this response. Refer to Transaction Sub-Status Code.

If a transaction is rejected, some decline responses by the card issuer return a generic reason, so it’s not always possible to know exactly why the payment was declined. If all of the information seems correct, it is best to have your customer contact their card issuer and ask for more information. For privacy and security, financial institutions are only obligated to discuss the specifics of a declined payment with their card holder.


Real-time card transaction via Payrix HPP

The Payrix platform offers the ability to utilise the Payrix Hosted Payment Page which is implemented via a re-direction to the Payrix Payment page. This offering is the simplest way to integrate a payment solution to your software with minimal development work required.

The process for using the Payrix HPP token is simply:

  1. Call the POST Generate HPP Token to obtain a token and a redirect URL.

  2. Redirect your customer to the URL you received with the token.

  3. After your customer has completed the form we will redirect them back to your website using the returnURL you provided when generating the token.

  4. Call the token lookup endpoint to obtain the result of the token.

Please note the token is valid for 20 minutes. You may wish to use a landing page to trigger this if the page will not be completed as part of the flow.

Note - If you are using the Payrix HPP to process a real-time card payment AND save payment details for future payments, ensure the ‘savepayer’ property field within the API body request is set to true.

Should the customer opt in to save their payment details, future payments can be either processed via POST Process a transaction using saved card details (real-time card transaction - immediate processing) OR via non real-time card debit (2 Business day settlement).


Q: How to determine the result of a real-time card transaction via Payrix HPP

  • Within the response body of the transaction field, if the statuscode is ‘C' or 'S’, the transaction was successful.

    • If you are using Payrix merchant facility you will see a statuscode of ‘C' (Cleared - Processed by Payrix and debited from Payers account) immediately.

    • If you are using your own merchant facility, you will typically see a status of 'S' (Settled - Funds settled).

  • Within the response body of the transaction field, if the statuscode is 'R', the transaction was declined with the rejection reason supplied in the status description.

    • If a transaction is rejected with a decline reason supplied by the issuer we will return this response. Refer to Transaction Sub-Status Code.

If a transaction is rejected, some decline responses by the card issuer return a generic reason, so it’s not always possible to know exactly why the payment was declined. If all of the information seems correct, it is best to have your customer contact their card issuer and ask for more information. For privacy and security, financial institutions are only obligated to discuss the specifics of a declined payment with their card holder.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.