Hi Team, Could you help me with the following iss...
# suitetalkapi
a
Hi Team, Could you help me with the following issue. In NetSuite I have the following payment method - MasterCard. This method has the offline type. I tried to create a payment in NetSuite with this parameter. In the Payment Option drop-down list I selected this method and NetSuite created the payment. But, when I create a payment via API and send this payment option in the request, I receive the following error: NetSuiteAccessException: Invalid paymentoption I cannot understand why I receive this error via API. Because I create the same payment with the same parametrs. Maybe I should send some additional parameters if the payment mathed has the offline type and I use the Payment option? Because if I create a payment and the payment option has the cash type, in this case evertyng is good. Problems only with offline types
Team, could you help me with my question?
b
probably want to get the payment you created in the ui and compare the response to what you are sending in your add request
a
Yes, I did that. The parameters are identical
b
what does the get response look like
a
Currently, I have only DTO Received payment request. SuccessPaymentEventDTO(currency=USD, baseCurrency=USD, externalId={ID}, customerId={ID}, authCode=null, sourceType=NET_SUITE, transactionDate=Mon Jan 25 232448 UTC 2021, totalAmount=1.000000, exchangeRate=1.000000, paymentType=CREDIT_CARD, paymentMethodId=13, accountNumber=null, isManuallyPosted=true, accountInternalId=null, invoices=[InvoiceEventElementDTO(type=invoice, amount=1.00, discount=0.00, documentInternalId=13223, currencyName=USD, customerId={ID})], credits=[])
This request includes the offline payment type
But, once I use the same with cash type evertyng is good
b
that doesnt look like a payment option
a
yes, because other parameters in config
b
im more interested in the get response
afterwards comes the add request
a
okay, thank you. just a moment, I will create a payment so that to find a log
I found an error
Once we create a payment for credit card, NetSuite requires the following parameters:
customerPayment.setChargeIt(false);
customerPayment.setCcApproved(true);
We didn't send customerPayment.setCcApproved(true)
You provided a link how to see logs once we create a request from our cloud system. Is it possible see logs if I create a payment in NetSuite?
b
Webservice usage log is only for webservices
a
okay, thank you!
Hi Battk, I need you help once again with payments. customerPayment.setCcApproved(true) didn't help Here is the successful request and response: I used payment option and payment type is cash
Here is an unsuccessful response. I used the payment option, and payment type has the offline type:
Maybe some problems with NetSuite API?
NetSuite returns errors if we send the payment method that has offline type
b
Still missing the get of the payment that you creates via the ui
My personal guess is that you are confusing payment method internal ids and payment option internal ids
a
In NetSuite I can create a payment with payment option that includes the offline type. But via API we receive an error
The problem occurs once we start use the offline payment option
Maybe NeTSuite requires some additional parametrs?
b
Nope, same requirements as the ui
So make the payment you want to create in the ui
And do a get on it so you can compare it to your request
a
I made it. Everything matches
Is it possible to receive logs in NetSuite if I create a payment in NetSuite manually?
b
Do a get on the record
a
I made it
b
That is the name of the operation in suitetalk
get the payment so you can see it in the web service usage logs
a
okay, I will try
just a moment
I found the problem. Payment method identifiers for a payment option are different from identifiers if a payment method is used. This is very strange, because NetSuite has one journal for payment methods. Where in NetSuite can I find a journal with internal IDs for payment options?
For example, I have the ERP payment method. In Setup -> Accounting List -> Accounting it has the following ID 27
But, if I create a payment with payment option, the ID is 461
a
Yes, you were completely right
How I can receive IDs for payment option?
b
probably do a search for payment options
a
Because currently we receive IDs from Setup -> Accounting List
Maybe NetSuite has a separte list with IDs?
b
you can also use getSelectValue if you want to programatically get values specific to your transaction and customer
a
You helped me a lot!