Skip to main content
Skip table of contents

Process a transaction using saved card details (charge stored card)

When you elect to save payer data via the Payrix HPP or through your own payment page, the payer must agree to the Direct Debit Terms & Conditions. This allows Payrix to debit their nominated account as and when required directed by the business.

Please note:

  • If you implement the Payrix Hosted Payment Page, the compliance requirements around the Direct Debit Terms & Conditions are handled automatically by Payrix.

  • If you implement card payments through your own payment page, the compliance requirements will need to be managed by your application.

To collect future payments, the Payrix platform offers 3 solutions:

  • Process a transaction using saved card details / charge stored card

    • Processes a real-time card transaction on the card account registered to the payers account

  • Schedule a single payment

    • A non real-time card transaction allowing you to schedule a payment to be processed on the current or future date

  • Schedule multiple future payments

    • A non real-time card transaction allowing you to schedule multiple future payments to be processed on the current and future date

Should your application intend to utilise the scheduling API, refer to the Scheduling API guide here for steps to initiate a scheduled debit.

Steps to implement - Process a transaction using saved card details

API workflow

API

POST Process a transaction using saved card details

  • Minimum API property requirements

    • ProcessType

    • Reference

    • Amount

Sample

Example Request

JSON
{{url}}/businesses/{{business-id}}/payers/{{payer-reference}}/transactions/card
JSON
{
    "ProcessType": "COMPLETE",
    "Reference": "Transaction-001",
    "Amount": 100.75,
    "Description": "This is a test transaction",
    "Audit": {
      "Username": "Example-User",
      "UserIP": "1.2.3.4"
    }
}

Example Response for successful transaction

JSON
{
  "transactionId": "71403",
  "reference": "Transaction-001",
  "statusCode": "S",
  "subStatusCode": null,
  "statusDescription": null,
  "processedAmount": 100.75,
  "cardType": "Visa",
  "redirectId": null,
  "redirectUrl": null,
  "cardAuthorizationReference": null
}

Example Response for failed/rejected transaction

JSON
{
    "transactionId": "71403",
    "reference": "Transaction-001",
    "statusCode": "F",
    "subStatusCode": "R6",
    "statusDescription": "Transaction Declined",
    "processedAmount": 100.51,
    "cardType": "Visa",
    "redirectId": null,
    "redirectUrl": null,
    "cardAuthorizationReference": null

What to do if the payment is failed / rejected?

Depending on your scenario and reason for the rejection, you can simply re-attempt payment via the same API workflow. However, if the payment has failed due to ‘insufficient funds’, it is recommended to have the business contact the payer before re-attempting payment to ensure sufficient funds are available to reduce the risk of the payment failing once more.


This concludes the API workflow of implementing the Process a transaction using saved card (charge stored card) to your application. Refer to our other methods available for accepting payments.


 

 

JavaScript errors detected

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

If this problem persists, please contact our support.