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
Solved! Go to Solution.
07-25-2023 06:16 PM
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
08-02-2023 04:47 AM
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
07-26-2023 07:55 PM
Have you configured your Account to accept Invoice No?
07-26-2023 08:26 PM
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
08-02-2023 04:47 AM