Common Issues and Troubleshooting

This guide explains some possible sell gift card issues and their solutions.

Before diving into gift card selling using Prestmit API, make sure you've completed the API authentication setup and reviewed the Sell Gift Card API guide.

This guide covers the most common issues you might encounter when using the Sell Gift Card API and provides practical solutions with real-world examples.


1. Invalid Gift Card ID

Problem: API returns 400 Bad Request with message "Invalid giftcard_id"

Cause: You're using an incorrect or non-existent gift card subcategory ID.

Solution:

  • Always use the giftcard_id from the Subcategories Endpoint
  • Remember: gift card category and subcategory are different - you need the subcategory ID

Example:

// ❌ Wrong - using category ID
{
  "giftcard_id": "amazon", 
  "amount": 100
}

// βœ… Correct - using subcategory ID from the lookup endpoint
{
  "giftcard_id": "73", 
  "amount": 100
}

Error message: {"error": "Invalid giftcard_id provided"}


2. Missing or Invalid Attachments

Problem: API returns 422 Unprocessable Entity with attachment-related errors

Common error messages:

  • "No valid attachments found"
  • "File size exceeds maximum limit"
  • "Unsupported file format"

Requirements:

  • Format: JPG or PNG only
  • Size: Under 5MB per file
  • Quality: Clear, readable images without reflections or blur

What to avoid:

  • Screenshots from phones that hide card details
  • Blurry or pixelated images
  • Images with glare or reflections covering the code
  • Files larger than 5MB

3. Trade Rejected After Submission

Problem: Your trade gets rejected during review

Solution: Review the complete list of rejection reasons and ensure your submission meets all requirements.


4. Delayed Processing

Problem: Your transaction is stuck in "pending" status longer than expected

How to track progress:

  1. Using the History Endpoint:
// Check transaction status
GET /api/partners/v1/giftcard-sell/history
  1. Using Webhooks (recommended).

When to contact support: If your transaction remains pending for more than 4 hours.

Also, see: How Long Does Sell Gift Card Transaction Take?


5. Authentication Issues

Problem: API returns 401 Unauthorized or 403 Forbidden

Common authentication errors:

// Invalid API key
{
  "error": "Invalid API key",
  "message": "The provided API key is not valid"
}

// IP not whitelisted
{
  "error": "Access denied",
  "message": "Request from unauthorized IP address"
}

Troubleshooting steps:

  1. Verify you're using the correct environment (sandbox vs. live)
  2. Check if your API key was recently regenerated
  3. Confirm your server's IP is whitelisted (if IP whitelisting is enabled)
  4. Ensure the API key is included in the request header.

6. Webhook Configuration Issues

Problem: Not receiving webhook notifications for transaction updates

Common webhook errors:

  • Webhook URL returns non-200 status code
  • SSL certificate issues
  • Timeout (webhook endpoint too slow)
  • Wrong event type configuration

Debugging webhooks:

  1. Test your endpoint:
curl -X POST https://your-domain.com/webhook \
  -H "Content-Type: application/json" \
  -d '{"test": "webhook"}'
  1. Verify event types:
// Make sure you're listening for the right events
{
  "events": [
    "giftcard-trade.sell.approved",
    "giftcard-trade.sell.rejected"
  ]
}
  1. Check webhook logs: Check your logs to help debug issues.

Need More Help?

If you're still experiencing issues after following this guide:

  1. Check our API Status Page for ongoing issues
  2. Review related documentation:
  3. Contact our developer support: [email protected] or using our official communication channel.

When contacting support, please include:

  • Transaction ID (if applicable)
  • Full error message
  • Request payload (remove sensitive data)
  • Timestamp of the issue

What’s Next

Next... Let's look at some frequently asked questions about sell gift card transactions.