unPLUGDevelopers

Test helpers API

Expire wallet items

POST/v1/test/members/{id}/expire_wallet_items

Expires every available item in the member's wallet now. Use it to test how your app handles an expired reward, and what happens when a guest pays with a wallet item that expired after preview.

Maya's two pastries are now expired. They no longer appear in GET /v1/members/me/wallet without a filter, and a redemption that names one fails with 422 reward_expired.

Permissions: Sandbox secret key.

Guide

Sandbox

Request headers#

  • Idempotency-Keystring
    Any string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response with Idempotent-Replayed: true.
    Max Length 255

Path parameters#

  • idstring (uuid)Required

Response fields#

Returns 200 with object

  • expiredinteger

Error descriptions#

404Not found
member_not_found

No member with this id.

404Not found
not_found

Called on production.

Any endpoint can also return the common errors.