cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass invoiceNumber in Json format using Node js

Hello All,

I want to pass my custom order number in invoiceNumber in Json token, I am using Node js and 

createTransactionRequest Method, but I can't see order object in Json request format https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card , I have tried to add order object same as XML format but it's not working for me. Below is my code.
    "createTransactionRequest": {
      "merchantAuthentication": {
        "name": apiLoginID,
        "transactionKey": transactionKey
      },
      "refId": "123456",
      "transactionRequest": {
        "transactionType": "authCaptureTransaction",
        "amount": data.amount,
        "payment": {
          "opaqueData": data.opaqueData
        },
         "order": {
             invoiceNumber: "INV-12345",         
            "description": "Product description",
          },
        "profile": {createProfile: true},
        "customer": {
          type: 'individual',
          id: order.GP_customer,
          "email" : order.email
        },
        "billTo": {
            "firstName": order.billing_first_name,
            "lastName": order.billing_last_name,
            "company": order.billing_company,
            "address": order.billing_street + order.billing_street_2,
            "city": order.billing_city,
            "state": order.billing_state,
            "zip": order.billing_zip,
            "country": order.billing_country
        }
      }
    }


Can you please help me? how to pass invoiceNumber in json format on charge credit card Json Request.

Thanks

 

Jsgreengalaxy
Member
0 REPLIES 0