I’m working on an integration with Salesforce and Stripe and I’m afraid I need to ask for help. We’re creating invoices via API based on a web form and Salesforce records, then need to mark them as ‘Paid’ for their full amount when a payment is received through the Stripe subscription.
While I’m aware that Stripe can be specified as a payment option on an invoice sent to a customer, my client in this case specifically doesn’t want to do this and wants the automatic payment collection of a Stripe subscription to be the only way he collects the payment - just using FreeAgent as a way to track the invoices.
I’m not from FreeAgent and I don’t know about SalesForce, but my product DoubleAgent reconciles payments received independently through Stripe.
It will explain payouts appearing in your bank feed in FreeAgent via whichever of three methods you prefer, one of which is invoices. It will look for suitable invoices and/or create them if they don’t already exist. It correctly handles various Stripe fees and any application fees, as well as VAT.
In this case, there is no bank feed enabled to contain the payment - FreeAgent is purely being used to track invoices and who has paid what, and not handling cash in any way. The Stripe subscription payment and the FreeAgent invoice are wholly separate. Hopefully this answers your question!
I’ve talked to the product experts and their advise is to create a dummy bank account and create a manual bank account explanation against the invoice to mark it as paid.
In FreeAgent an invoice is only ever considered as paid once it has been explained by a bank transaction and as you will not be reconciling the invoice against a bank transaction coming in via a bank feed the best thing to do is create a dummy bank account and then use that to create the hold the manual transactions that pays off the invoice.
To create the manual transaction in the account you can specify the bank_account parameter on the bank transaction explanations endpoint. So your post request to FreeAgent would look something like this
curl -vvvv -XPOST "https://api.freeagent.com/v2/bank_transaction_explanations
" -H "Authorization: Bearer xxxx” \
-H "Content-type: application/json" \
-H "Accept: application/json" \
--data @- << EOH
{ "bank_transaction_explanation":
{
"bank_account":"https://api.freeagent.com/v2/bank_accounts/1", # replace this with the correct bank account url
"dated_on”:”2021-02-22”,
"description”:”Invoice payment from stripe”,
"gross_value":"-730.0",
"sales_tax_status": "TAXABLE",
"sales_tax_rate": "20.0",
“paid_invoice”: “https://api.freeagent.com/v2/invoices/200” # replace this with the correct invoice url
}
}
EOH