question

Danielle Cox avatar image
Danielle Cox asked Jeffrey Blattman answered

can I cache the response to v2 pay/key

Can I cache the response to the v2 pay/key call? I see that I am getting the same results, but I don't know the rules for it. Does this expire or is it always safe to repeat with that value? If it does change, I don't see how Clover would know, but I don't want to get in trouble later for making this assumption.

Thanks,

Danielle
Payments
2 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.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Can you link to whatever documentation you are following for this API?

0 Likes 0 ·
Danielle Cox avatar image Danielle Cox Jeffrey Blattman ♦♦ commented ·
0 Likes 0 ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered
From what I can tell it's safe to cache this forever. That being said, it would be robust to write your code such that if you get an error response from /pay, you re-fetch the key and try again.

The docs should describe the exact usage, and I filed an internal issue to get them updated.
10 |2000

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