Jump to content
  • 0

Record Payment via API?


Question

4 answers to this question

Recommended Posts

  • 0
Posted
  On 4/22/2020 at 11:54 AM, Colin said:

Hi, new to Blesta. How do I go about replicating the 'Record Payment' process for an invoice via API calls?

record-payment-blesta-ui.png

Expand  

I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices.

  • 0
Posted
  On 4/22/2020 at 5:14 PM, Paul said:

I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices.

Expand  

Thank you Paul.

Couple of follow up questions if you don't mind.

1. I've looked at this process (add > apply) and can't see a way to trigger a receipt (or invoice paid) email for the client once the transaction is added/applied. Is this possible?

2. Also I'm a little lost as to how I format the invoice array ($vars) for the apply transaction?

 

Thanks again.

  • 0
Posted
  Quote

I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices.

Expand  

Thank you Paul ?. I didn't read the source properly and was using 'vars[transaction_id]' instead of 'transaction_id'.

Still looking for a way to send the client an email after applying a transaction as a receipt, as well as and email once an invoice has been paid in full by an applied transaction. 

  • 0
Posted

Currently no email template exists for transaction application or invoice closure.  There is also no event for transaction application, but you could create a plugin that ties into the Invoices.setClosed event.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...