Quick update to this. Following a question from one of the beta users asking how to determine which payment methods are valid for each invoice, I’ve made a small tweak to the API responses.
Now the list of payment methods against each invoice will only list those methods which can be applied to the invoice.
A summary of the rules around this is:
- Dwolla - the company must have enabled the Dwolla integration and the invoice currency must be USD
- GoCardless - the company must have enabled the GoCardless integration and the invoice currency must be GBP
- GoCardless Preauth - as GoCardless, but the contact must have a current active preauth agreement
- PayPal - the company must have a PayPal bank account
- PayPal Here - PayPal here must be enabled on the first PayPal bank account
- Stripe - the company must have the Stripe integration enabled and the invoice currency must be supported by Stripe
Example API responses:
bool
in each case may be true/false to signify whether that payment option is enabled for the specific invoice.
For a company with PayPal enabled but not PayPal Here:
{
"payment_methods": {
"paypal": bool
}
}
For a company with GoCardless enabled, on a GBP invoice to a contact without a preauth agreement:
{
"payment_methods": {
"gocardless": bool
}
}
For a company with GoCardless enabled, on a GBP invoice to a contact with a preauth agreement:
{
"payment_methods": {
"gocardless": bool,
"gocardless_preauth": bool
}
}
For a company with GoCardless enabled, on a USD invoice to a contact with a preauth agreement:
{
"payment_methods": {}
}
Hopefully that all makes sense, and will make the API responses more usable as you’ll be able to infer which payment methods are valid for any given invoice.
As always, any feedback on this will be gratefully received.
Cheers,
Paul.