Jump to content
  • 0

Record Payment via API?


Colin

Question

4 answers to this question

Recommended Posts

  • 0
5 hours ago, 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

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.

Link to comment
Share on other sites

  • 0
1 hour ago, 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.

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.

Link to comment
Share on other sites

  • 0
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.

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...