Hi, I'm working on a service that posts payments f...
# integrations
s
Hi, I'm working on a service that posts payments from an external system to NetSuite, currently using SOAP. Part of this project, we're creating Payment Instruments (ex: Payment Card Token / General Token) so that we can process refunds from NetSuite if needed later on - which is all working fine. There's one scenario that we're a bit stumped on how to do via API/SOAP, but works fine through the web interface. We'd like to create some Payment Instruments with the
preserveOnFile = False
so that it can't be used for future payments within NetSuite. The web interface lets you create it from the Receive Payment page with this flag unchecked and then use it on that same payment. I have tried creating the Payment Instrument in 1 SOAP call, using the resulting ID on a subsequent CustomerPayment SOAP call and it fails. Does anyone know how to resolve this? Am I able to pass in the Payment Instrument record within the Customer Payment request?
e
Check permissions first
s
Hi @Eric B any idea what permissions would be required in addition to the ones required for creating payments & creating payment instruments? Again, we are able to create things when
preserveOnFile = True
(well technically we don't send it at all on our SOAP request, but it defaults to True).
For clarification, here's the response when I try making a CustomerPayment that references the payment instrument with
preserveOnFile = False
Copy code
<platformCore:status isSuccess="false" xmlns:platformCore="urn:core_2021_1.platform.webservices.netsuite.com">
          <platformCore:statusDetail type="ERROR">
            <platformCore:code>INVALID_KEY_OR_REF</platformCore:code>
            <platformCore:message>Invalid paymentoption reference key 6336 for customer 3688.</platformCore:message>
          </platformCore:statusDetail>
        </platformCore:status>
Bump, does anyone know if this is possible?
n
Are you sure that's your issue only, the error message says you've selected an invalid "paymentoption" for that customer? Perhaps setting the flag means you have to specify a different "paymentoption" as the one you set is no longer valid as a result of setting that flag? (Just throwing that out there I don't know the answer but might give you an avenue of investigation, anyone reading this thinking I'm leading Simon "up the garden path" please do say!)
s
Hey, I double checked (because it would have been a silly mistake) and the payment instrument is 100% for the same customer. Just had a call with NS support and it sounds like there's likely a defect/gap here, but I'll know more later.