cancel
Showing results for 
Search instead for 
Did you mean: 

I need help in JSON adding the invoice number via API

I need help in JSON adding the invoice number via API

The following code works great:

```

"{

    \"createTransactionRequest\": { ¶ 

        \"merchantAuthentication\": { ¶ 

 

            \"name\": \"" & $name||Company_API_Login & "\", ¶ 

 

            \"transactionKey\": \"" & $transactionKey||Company_Transaction_Key & "\" ¶ 

        }, ¶ 

 

        \"refId\": \"" & $refId||Appointment_Serial_Id & "\", ¶ 

        \"transactionRequest\": { ¶ 

 

            \"transactionType\": \"" & $transactionType||authCaptureTransaction & "\", ¶ 

 

            \"amount\": \"" & $amount||appt_charge_total & "\", ¶ 

 

              \"profile\": { ¶ 

 

      \"customerProfileId\": \"" & $customerProfileId||auth_account_profile_id & "\", ¶ 

 

      \"paymentProfile\": { \"paymentProfileId\": \"" & $paymentProfile ||auth_account_payment_id & "\" } ¶ 

  }, ¶ 

            \"lineItems\": { ¶ 

                \"lineItem\": { ¶ 

 

                    \"itemId\": \"" & $itemId||appt_id_serial & "\", ¶ 

 

                    \"name\": \"" & $name||type_of_service & "\", ¶ 

 

                    \"description\": \"" & $description ||account_type_of_service & "\", ¶ 

 

                    \"quantity\": \"" & $quantity||appt_duration_total & "\", ¶ 

 

                    \"unitPrice\": \"" & "0" & "\", ¶ 

 

                    \"taxable\": \"" & "true" & "\" ¶ 

                } ¶ 

            } ¶ 

        } ¶ 

    } ¶ 

}"

```

How would I add invoiceNumber to that code.

I have been trying for an hour an can't get it.

I don't do this all the time and I am so close!

I really appreciate any feedback.

Troy

troyk
Member
1 ACCEPTED SOLUTION

Accepted Solutions

I spoke to an 'API' rep at authorize. And even though the invoiceNumber is listed in the 'request fields definition' section of the documentation. She said that it was not available thru API, although it WAS available when you charged a CC manually thru their interface. - It all made no sense to me....| - I have opted to put the invoice number at the beginning of the description for the clients reference. - Problem solved, although not the cleanest. - thank you Troy

View solution in original post

troyk
Member
3 REPLIES 3

invoiceNumber does not appear as a property of the object transactionRequest.
But  "poNumber": "456654" is an optional property of the transactionRequest object.
If poNumber does not work for you because of business logic, then consider, the transactionRequest object, property:

"userFields": { "userField": [ { "name": "InvoiceNumber", "value": "123456" }, { "name": "favorite_color", "value": "blue" } ] }


I have not personally done this, I'm just reading the documentation.
hth!
David

marine2026
Trusted Contributor

Have you configured your Account to accept Invoice No?

marine2026
Trusted Contributor

I spoke to an 'API' rep at authorize. And even though the invoiceNumber is listed in the 'request fields definition' section of the documentation. She said that it was not available thru API, although it WAS available when you charged a CC manually thru their interface. - It all made no sense to me....| - I have opted to put the invoice number at the beginning of the description for the clients reference. - Problem solved, although not the cleanest. - thank you Troy

troyk
Member