Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides details about using the transactions endpoint to submit card and bank payments. See the transactions documentation in our Payrix Integrated REST API documentation for further information.

Info

You must be PCI certified to submit card transactions directly via the API. Your application will need to handle protected customer and payment method data.

Info

If you are using your own Payment Page, there are Payment Page requirements which are mandatory for compliance and security. Ensure you are following the requirements by checking out the Payment Page Requirement documents.

The Payrix API supports card and bank payments using a new or stored payment method. The same request can also tokenize a new payment method for future use.


Card Payments

Expand
titleView Details about submitting payments using credit/debit cards.

To submit a card payment using the API, send a POST request to the transactions endpoint with the payment details in the body of the request. The examples below show request bodies for the following use cases:

  • New Card - Submit a transaction by sending the payment card details.

  • Stored / Saved Card - Submit a transaction using a previously stored payment token.

  • Tokenized Card Payment - Submit a transaction by sending payment through tokenized card details.

New Card Payment

Info

You must be PCI Level 1 compliant to submit unencrypted card data directly via the API.

The example below shows a sample request body for card payment using a new payment method:

Code Block
languagejson
{
    "ProcessType": "COMPLETE",
    "Reference": "JTest Transaction 101",
    "Description": "This is an example real-time transaction",
    "Amount": 100.25,
    "CurrencyCode": "AUD",
    "CardToken": null,
    "Card": {
      "CardNumber": "4111111111111111",
      "CardholderName": "TEST Card",
      "ExpiryYear": 2023,
      "ExpiryMonth": 10,
      "Ccv": "123"
    },
    "Payer": null,
    "Audit": {
    "Username": "Example-User",
      "UserIP": "1.2.3.4"
    }
  }

Stored Card Payment

The example below shows a sample request body for card payment using a stored token as the payment method:

Code Block
languagejson
{
    "ProcessType": "COMPLETE",
    "Reference": "JTest Transaction 1001",
    "Amount": 100.75,
    "Description": "This is a test transaction",
    "CurrencyCode": "AUD",
    "ServiceDate": "2022-03-01T10:00:00+10:00",
    "Audit": {
      "Username": "Example-User",
      "UserIP": "1.2.3.4"
    }
}

Tokenized Card Payment

The example below shows a sample request body for card payment using tokenized card data:

Code Block
languagejson
{
    "ProcessType": "COMPLETE",
    "Reference": "JTest Transaction 101",
    "Description": "This is an example real-time transaction",
    "Amount": 100.25,
    "CurrencyCode": "AUD",
    "CardToken": "cbd86c35289249eb86759453cea4025b",
    "ServiceDate": "2022-03-01T10:00:00+10:00",
    "Payer": {
    	"uniqueReference": "A306026D-0B4B-479F-9716-256152C8D310",
    	"groupReference":"A306026D-0B4B-479F-9716-256152C8D310",
    	"familyOrBusinessName":"Surname",
    	"givenName":"First Name",
    	"billingAddress":{"Line1": "1 Test St","Line2": "Test Building","Suburb": "Testville","State": "QLD","PostCode": "4001","Country": "AUS" },
    	"email":"test@test.com",
    	"phone":"0733331111",
    	"savePayer":"true"
    },
    "Audit": {
		"Username": "Example-User",
    	"UserIP": "1.2.3.4"
    }
  }


Bank payments

Expand
titleView details about submitting payments using Bank Account.

To submit a payment via Bank Account (BECS) using the API, send a POST request by scheduling a single or multiple future payments.

The example below shows a sample request body for scheduling a single payment:

Code Block
languagejson
{
    "Date": "2022-11-15",
    "Amount": 33.75,
    "Reference": "Scheduled-Payment-001",
    "Description": "This is the first scheduled payment",
    "SubBusinessId": null,
    "ServiceDate": "2022-03-01T10:00:00+10:00",
    "Audit": {
      "Username": "Example-User",
      "UserIP": "1.2.3.4"
    }
}