Buy Gift Card

This page explains how to buy gift cards through the Prestmit API.

By buying gift cards through the Prestmit API, you offer your users a smooth, automated way to purchase digital gift cards.

Prerequisites

Before you can use the gift card buying endpoints, ensure you have:

  • API Authentication: Valid API key as specified in API Keys & Authentication
  • Funded Wallet: Sufficient balance in your Prestmit wallet
  • Webhook Setup: Configured webhook URL to receive gift card delivery notifications

πŸ”„ The Buy Gift Card Process

Here's how the process works from start to finish:

  1. Browse Gift Cards: Fetch available cards and their prices
  2. Calculate Payment: Get the exact cost for selected cards and quantity
  3. Create Order: Send a request to buy the card
  4. Payment: The system deducts the amount from your Prestmit wallet
  5. Delivery: Retrieve the gift card codes once payment is complete

πŸ“Š Available Endpoints

You'll use these endpoints for gift card purchase:

EndpointMethodPurpose
/giftcard-trade/buy/configGETGet configuration, available cards, and payment methods
/giftcard-trade/buy/calculate-paymentPOSTCalculate exact payment amount for selected cards
/giftcard-trade/buy/createPOSTCreate a new buy gift card transaction
/giftcard-trade/buy/fetch-codes/{reference}GETRetrieve gift card codes after successful payment
/giftcard-trade/buy/historyGETView your buy gift card transaction history

Tip: Always use the /calculate-payment endpoint before creating orders to show users the exact amount they'll pay in their preferred currency.