API/RetailServices/CreatePayment
Purpose The CreatePayment function allows you to submit a payment that has been taken via a third party system against a client, thus recording it against their account in Emersion. This offers the same functionality as the Receive Payment interface in Cumulus.
Inputs
<soapenv:Header/> <soapenv:Body> <ret:CreatePaymentRequest> <ret:AccountID>396901</ret:AccountID> <ret:TransactionCategory>CASH</ret:TransactionCategory> <ret:Reference>abc123456</ret:Reference> <ret:Note>Payment for outstanding debt</ret:Note> <ret:Amount>25.00</ret:Amount> <ret:TransactionDate>25 MAR 2013</ret:TransactionDate> </ret:CreatePaymentRequest> </soapenv:Body>
Important notes:
194. Account ID must be someone whom is managed by your certificate account
195. Transaction date must be in the format DD MMM YYYY i.e. 12 MAR 2013
196. Transaction Category must be one of the following from the left column of values, right column is it’s meaning:
o VISA_MC Credit Card - VISA/MASTERCARD
o AMEX Credit Card - AMEX
o DINERS Credit Card - DINERS
o CONTRA Contra
o AGENT Agent Collected
o DIRECTDEBIT Direct Debit
o EFT EFT or Direct Deposit
o EFTPOS EFTPOS
o CASH Cash
o CHEQUE Cheque
o MORDER Money Order
o BPAY BPay
o PAYBYPHONE Pay By Phone
o POSTBILLPAY Australia Post Bill Pay
o CREDITCARD Credit Card
o INTERNAL Internal Charge
197. If transaction date is omitted, today’s date will be used.
Output
<SOAP-ENV:Body> <ns1:CreatePaymentResponse> <ns1:paymentID>374057</ns1:paymentID> </ns1:CreatePaymentResponse> </SOAP-ENV:Body>
A successful insert of the payment should provide you with the payment ID that was created. Any errors or validation problems should result in an exception or a soap fault. This new payment will be unallocated against any invoices.
Error String
198. The customer account ID is invalid.
199. You can only operate on accounts that are your direct children.
200. You must provide a valid transaction category, please check documentation for the category types
201. Exception while processing payment, error was: ".$e->getMessage()