Exchange points for gift card

Exchange Points for Gift Card

This endpoint allows business customers to redeem their accumulated reward points by purchasing gift cards from supported brands. The transaction requires multi-factor authentication via a one-time code to ensure security. Upon success, the response includes the full gift card order details including the redemption URL and order status.

Endpoint

POST /api/UsersReward/exchange/giftcard

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a business customer wants to redeem their reward points balance in exchange for a digital gift card. This is typically triggered from a rewards redemption UI where the customer selects a gift card brand and denomination. The endpoint supports two request variants: a base issue request (points-only redemption) and a buy request that additionally specifies a financial account and explicit points amount.

Request Body

This endpoint accepts one of two request shapes:

Option 1 — Issue Gift Card Request (issuegiftcardrequest)

FieldTypeRequiredDescription
brandIdstringNoThe ID of the gift card brand to purchase
faceAmountinteger (int64)NoThe denomination (face value) of the gift card
oneTimeCodestringYesA 6-digit one-time code for MFA verification (pattern: ^\d{6}$)
secureOperationTypestring (enum)YesThe MFA mechanism used: ShortMessageCode, TimeBasedCode, or LegacyTimeBasedCode

Option 2 — Buy Gift Card Request (buygiftcardrequest, extends Option 1)

Includes all fields from Option 1, plus:

FieldTypeRequiredDescription
fromFinancialAccountIdstringNoThe financial account ID from which to debit if supplementing points
rewardsPointsinteger (int32)NoThe explicit number of reward points to apply toward the purchase
{
  "brandId": "brand_abc123",
  "faceAmount": 25,
  "oneTimeCode": "847392",
  "secureOperationType": "ShortMessageCode",
  "fromFinancialAccountId": "fa_98765xyz",
  "rewardsPoints": 2500
}

Response

200 OK

FieldTypeDescription
idstringUnique identifier for the gift card order
brandIdstringThe brand ID of the purchased gift card
brandNamestringHuman-readable name of the gift card brand
logoUrlstringURL to the brand's logo image
urlstringRedemption URL for the issued gift card
currencystringCurrency of the gift card (e.g., USD)
faceAmountinteger (int64)The face value/denomination of the gift card
amountinteger (int64)The actual points or monetary amount charged
discountnumber (double)Any discount applied to the transaction
expirationDatestring (date-time)Expiration date of the gift card, if applicable
createdDatestring (date-time)Timestamp when the order was created
cancelDatestring (date-time)Timestamp when the order was canceled, if applicable
issueTransactionIdstringTransaction ID associated with the issuance
cancelTransactionIdstringTransaction ID associated with cancellation, if applicable
statusstring (enum)Order status: Issued or Canceled
userNamestringUsername of the customer who placed the order
userIdinteger (int32)Internal user ID of the customer
{
  "id": "gco_7f3a91bc2e",
  "brandId": "brand_abc123",
  "brandName": "Amazon",
  "logoUrl": "https://cdn.example.com/brands/amazon_logo.png",
  "url": "https://giftcards.example.com/redeem/abc123xyz",
  "currency": "USD",
  "faceAmount": 25,
  "amount": 2500,
  "discount": 0.0,
  "expirationDate": "2027-06-30T00:00:00Z",
  "createdDate": "2026-06-09T14:22:00Z",
  "cancelDate": null,
  "issueTransactionId": "txn_issue_44d9a1",
  "cancelTransactionId": null,
  "status": "Issued",
  "userName": "[email protected]",
  "userId": 10482
}

Error Codes

CodeWhen it happens
400Missing required fields (oneTimeCode or secureOperationType), invalid one-time code format (must be exactly 6 digits), or insufficient reward points balance
401Token missing, expired, or invalid
403Insufficient permissions or customer is not eligible for rewards redemption
404Specified brandId not found or fromFinancialAccountId does not exist
500Internal server error

Common Mistakes

  • Sending a oneTimeCode that is not exactly 6 digits — the field enforces the pattern ^\d{6}$ and will fail validation if the code has any non-numeric characters or wrong length.
  • Omitting secureOperationType — this field is required even when the code is provided; the server needs to know which MFA method was used to validate it.
  • Using a financial account ID that belongs to a different customer — fromFinancialAccountId must be owned by the authenticated user.
  • Attempting to redeem more points than the customer's current rewards balance without providing a fromFinancialAccountId to cover the shortfall.
  • Reusing an expired or already-consumed one-time code — each code is valid for a single use only.

Related Endpoints

  • GET /api/UsersReward/balance — Retrieve the current reward points balance for the authenticated customer
  • GET /api/UsersReward/giftcard/brands — List available gift card brands and their supported denominations
  • GET /api/UsersReward/exchange/history — View past reward redemption and exchange transactions
  • POST /api/UsersReward/exchange — Redeem reward points directly to a financial account

Example

curl -X POST https://api.banking.netevia.dev/api/UsersReward/exchange/giftcard \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "brandId": "brand_abc123",
    "faceAmount": 25,
    "oneTimeCode": "847392",
    "secureOperationType": "ShortMessageCode",
    "fromFinancialAccountId": "fa_98765xyz",
    "rewardsPoints": 2500
  }'
Body Params
string | null
int64
string
required
length ≥ 1
^\d{6}$
string
enum
required
Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json