question

ahmad1122 avatar image
ahmad1122 asked ahmad1122 commented

Clover recurring payments - How to add additional information to the subscription and receive it in the webhook packet.

Hi,

I have implemented the Clover recurring payment API and am successfully able to create the plan, customer, and subscription—everything is working fine following this link.The problem I am facing is that I want to add additional information to the subscription and receive it in the webhook packet. I have tried using the "note" field in both the plan and subscription at the time of creation, but I am not receiving it in the webhook packet . Currently I am receiving the following object in webhook following this link.

{"appId":"xxxxxxxxxxxxx","merchants":{"xxxxxxxxxxxxx":[{"objectId":"P:xxxxxxxxxxxxx","type":"CREATE","ts":1727253717635}]}}


REST APIPaymentse-commerce apiWebhooks
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

·
parquet76 avatar image
parquet76 answered ahmad1122 commented

The web hook provides you with the pid of the payment that was creates. You need to use the REST API and query for the payment to read the note.

1 comment
10 |2000

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

ahmad1122 avatar image ahmad1122 commented ·
I have used the payment ID received from webhook to get payment there is not note in response following is the res

{
  "id": "xxxxxxxxxxxxx",
  "order": {
    "id": "xxxxxxxxxxxxx"
  },
  "tender": {
    "href": "https://sandbox.dev.clover.com/v3/merchants/xxxxxxxxxxxxx/tenders/xxxxxxxxxxxxx",
    "id": "xxxxxxxxxxxxx"
  },
  "amount": 10000,
  "cashbackAmount": 0,
  "employee": {
    "id": "xxxxxxxxxxxxx"
  },
  "createdTime": 1727253714000,
  "clientCreatedTime": 1727253714000,
  "modifiedTime": 1727253713000,
  "offline": false,
  "result": "SUCCESS"
}
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community