Oscar Posted July 6, 2018 Report Posted July 6, 2018 Hi, How can i add credit to an account via the API? Using PHP as language.
Tyson Posted July 6, 2018 Report Posted July 6, 2018 Credits are just transactions that are not applied to an invoice, so you can simply create a transaction.
Oscar Posted July 6, 2018 Author Report Posted July 6, 2018 16 minutes ago, Tyson said: Credits are just transactions that are not applied to an invoice, so you can simply create a transaction. Okay, Do you have an example PHP snippet?
Oscar Posted July 6, 2018 Author Report Posted July 6, 2018 And how can i make it say it was paid via "Prepraid" when adding it?
evolvewh Posted July 6, 2018 Report Posted July 6, 2018 It's already setup so there is a credit added to the customers account after you record the payment and once it's applied to an invoice, it says the original payment method and amount applied to it.
Oscar Posted July 6, 2018 Author Report Posted July 6, 2018 Need to word myself better. Change the transaction type from f.ex "In house credit" or "Money Order" to something custom?
Tyson Posted July 7, 2018 Report Posted July 7, 2018 You should create a new custom payment type if you haven't already, under Settings > System > Payment Types. Then when you create the transaction by calling Transactions::add over the API, include in $vars the keys type and transaction_type_id. type would be set to "other" and transaction_type_id would be set to the integer ID representing the payment type you created under Settings > System > Payment Types.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now