Skip to main content
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
cards
/
{cardId}
/
transactions
/
{transactionId}
/
refund
Refundgiftcardtransaction
curl --request POST \
  --url https://api.loyalty.dog/v2/giftcards/programs/{programId}/cards/{cardId}/transactions/{transactionId}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1,
  "reason": "<string>",
  "posTransactionId": "<string>"
}
'
{
  "transactionId": "5eb7cf5a86d9755df3a6c593",
  "giftCardId": "5eb7cf5a86d9755df3a6c593",
  "refundedAmount": "<string>",
  "remainingBalance": "<string>",
  "success": true,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

JWT access token obtained from POST /v2/token.

Headers

idempotency-key
string | null
X-Eposn-Customer-Token
string | null
X-Eposn-Merchant-Token
string | null

Path Parameters

transactionId
string
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

programId
string | null
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

cardId
string | null
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Body

application/json
amount
Required range: x > 0
reason
string | null
Maximum string length: 500
posTransactionId
string | null
Maximum string length: 100

Response

Successful Response

transactionId
string
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

giftCardId
string
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

refundedAmount
string
required
remainingBalance
string
required
success
boolean
required
message
string
required