v2
latestOpenAPI 3.1.02026-08-01244220427.0 KBGift Card Merchants
Initmerchantsession
Init or Refresh Merchant Session
Called by eposn-giftcards immediately after resolving a valid platform token. Looks up the merchant by (merchantId, platform). If a record exists the info is updated; if not, a new GiftCardMerchant document is created.
Locations are stored as embedded sub-documents. If locationId is provided, the matching location is upserted within the merchant document.
programId is stored per location — if supplied it will update only the active location's programId, not a merchant-level field.
Returns:
- Full merchant context including the active location's programId so callers can build a session without an additional API round-trip.
Status Codes:
- 200: Merchant record created or updated successfully
- 401: HMAC authentication failed
post/v2/giftcards/merchants/session
Request body
Response
Successful Response
Example response
{
"merchantId": "5eb7cf5a86d9755df3a6c593"
}