question

levon avatar image
levon asked levon commented

include note to payment

I create an API which create payment and I need to include note for each api but it is not working Is it possible if yes send me an example please

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

q-factor avatar image
q-factor answered levon commented

I guess you could make use of the setNote(string) method of the payment object.

7 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

levon avatar image levon commented ·

for creating I send this format {"amount":"543","tipAmount":"345","taxAmount":"345","result":"SUCCESS","cashbackAmount":"4353","setNote":"3543345","order":{"id":"9DRSM96WTGQJM"},"employee":{"id":"805ZKRAYA76AT"},"tender":{"id":"XMR12V49FFFVM"}}

after I use this url GET /v3/merchants/{mId}/payments/{payId} for getting payment and in output I don't see note

0 Likes 0 ·
q-factor avatar image q-factor commented ·

sorry there was a typo in my answer. instead if "setNote", give "note". note is the property name. SetNote is a method to set it.

0 Likes 0 ·
levon avatar image levon commented ·

so how can i run setNote method ?

0 Likes 0 ·
q-factor avatar image q-factor commented ·

setNote is a method of the payment class. It can be called on a payment object. Din't the above payment JSON worked with the note property?

0 Likes 0 ·
levon avatar image levon commented ·

{"amount":"543","tipAmount":"345","taxAmount":"345","result":"SUCCESS","cashbackAmount":"4353","note":"3543345","order":{"id":"9DRSM96WTGQJM"},"employee":{"id":"805ZKRAYA76AT"},"tender":{"id":"XMR12V49FFFVM"}}

sorry but I when I use this format it is not adding note in payments. I get payment by this GET /v3/merchants/{mId}/payments/{payId} maybe I need to add something in url to see note thanks

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community