Process Payment
Payment (Integrated Gateways)
Retrieve the Invoice GUID for the Enrolment Invoice
To obtain the invoice GUID for an enrolment invoice, make a GET request to /accounting/invoice/:invoiceID. The response will contain an INVGUID key.
It is highly recommended that you display the invoice details with line items to the student prior to continuing with the payment processing flow.
Process the Payment
There are two options for capturing payment for the invoice:
Option 1: Generate a Form to Display on Your Site
Make a POST request to /accounting/ecommerce/payment/form with the necessary parameters, including invoiceGuid and a reference parameter that serves as your internal identifier.
We suggest appending the reference value to the redirectURL parameter for later use.
Once the user is redirected back to your site, retrieve the reference parameter value.
Option 2: Generate a Redirect URL
Make a GET request to /accounting/ecommerce/payment/url with the necessary parameters, including invoiceGuid and your internal reference parameter.
As with Option 1, we recommend appending the reference value to the redirectURL parameter.
The response will contain a PAYMENTURL key with a URL value that you can use for the transparent redirect process.
Once the user is redirected back to your site, retrieve the reference parameter value.
Verify the Payment
Since the payment may not be immediate and the redirect may not include the payment outcome, you must make an additional request to verify the payment.
Send a request to /accounting/ecommerce/payment/ref/:reference to check the payment status (pending, paid, or failed).
If the payment fails, you will receive error details and can handle them accordingly. If the payment is successful, proceed with the enrolment as needed.
Payment (Non Integrated)
When your integration handles payments through a system outside of aXcelerate, follow these steps to apply payments to an invoice in aXcelerate. This method can also be used for handling manual payments (e.g., cash) or payments made via BPAY or direct deposit.
To apply a payment, send a POST request to /accounting/transaction with the parameters contactId, invoiceId, and amount. You can apply multiple payment transactions to a single invoice. Once the invoice balance reaches $0.00, the invoice will be marked as paid as denoted by the ISPAID key. Additionally, you can specify the transaction date (transDate) and payment method (paymentMethodId) in the POST request. Refer to the API documentation for further details on this endpoint.