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. Quote
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. Quote
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? Quote
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? Quote
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. Quote
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? Quote
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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.