Payment Instruments

Payment instruments make using various payments methods more straightforward and, in the case of payment cards, more secure. Payment instruments can be used to charge a shopper without any action on the shopper's side.

The payment instruments records are available if the Payment Instruments feature is enabled on the Transactions subtab at Setup > Company > Setup Tasks > Enable Features.

Payment instruments are available on the Financial subtab of customer records. Payment instruments include the following three records:

For information about working with payment instruments in the UI, see Payment Instruments.

Payment instruments are defined in the listAcct (accounting) XSD.

Supported Operations

The following operations can be used with the payment instruments.

add | addList | delete | deleteList | get | getDeleted | getList | getSavedSearch | getSelectValue | search | update| updateList | upsert | upsertList

Field Definitions

The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to these records. For details, see the SOAP Schema Browser’s reference pages:

Note:

For information on using the SOAP Schema Browser, see SOAP Schema Browser.

Usage Notes

  • To enable the Payment Instruments feature, you must also enable the Credit Card Payments feature. You can enable the Credit Card Payments feature on the Transactions subtab at Setup > Company > Setup Tasks > Enable Features.

  • Payment methods must have the tokenized flag set to true to be settable on token payment instruments.

Sample Code

In the following example, a new payment card is attached to a customer record.

Java

                  public void paymentCard() throws Exception {

        PaymentCard record = new PaymentCard();
        record.setExternalId("12543");
        record.setEntity(Utils.createRecordRef("107", RecordType.customer));
        record.setPaymentMethod(Utils.createRecordRef("8", RecordType.paymentMethod));
        record.setCardType(PaymentCardType._debit);
        Calendar cal = Calendar.getInstance();
        cal.set(2018, Calendar.JANUARY, 4, 2, 56, 0);
        Calendar cal2 = Calendar.getInstance();
        cal1.set(2022, Calendar.DECEMBER, 1, 5, 2, 6);
        record.setValidFromDate(cal);
        record.setExpirationDate(cal2);
        record.setIssueNumber("1234");
        record.setCardNumber("4012888888881881");
        record.setCardBrand(PaymentCardBrand._visa);

        c.addRecord(record); 

            

SOAP Request

                    <soapenv:Body>  
         <add xmlns="urn:messages_2018_2.platform.webservices.netsuite.com">   
            <record externalId="12543" xsi:type="ns7:PaymentCard" xmlns:ns7="urn:accounting_2018_2.lists.webservices.netsuite.com">    
               <ns7:entity internalId="107" type="customer" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2018_2.platform.webservices.netsuite.com"/>    
               <ns7:paymentMethod internalId="8" type="paymentMethod" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2018_2.platform.webservices.netsuite.com"/>    
               <ns7:cardNumber xsi:type="xsd:string">4012888888881881</ns7:cardNumber>    
               <ns7:expirationDate xsi:type="xsd:dateTime">2022-12-01T04:02:06.286Z</ns7:expirationDate>    
               <ns7:cardBrand xsi:type="ns10:PaymentCardBrand" xmlns:ns10="urn:types.accounting_2018_2.lists.webservices.netsuite.com">_visa</ns7:cardBrand>    
               <ns7:cardType xsi:type="ns11:PaymentCardType" xmlns:ns11="urn:types.accounting_2018_2.lists.webservices.netsuite.com">_debit</ns7:cardType>    
               <ns7:validFromDate xsi:type="xsd:dateTime">2018-01-04T01:56:00.286Z</ns7:validFromDate>    
               <ns7:issueNumber xsi:type="xsd:string">1234</ns7:issueNumber>   
            </record>  
         </add> 
      </soapenv:Body> 

            

SOAP Response

                    <soapenv:Body>
         <addResponse xmlns="urn:messages_2018_2.platform.webservices.netsuite.com">
            <writeResponse>
               <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2018_2.platform.webservices.netsuite.com"/>
               <baseRef internalId="107" externalId="12543" type="paymentCard" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2018_2.platform.webservices.netsuite.com"/>
            </writeResponse>
         </addResponse>
      </soapenv:Body> 

            

Related Topics

Lists
Other Lists
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices