KeysenderhomeSupport help center home
IntegrationsPricingDemoSubmit a ticketTicket statusLog inStart free
KeysenderSupport home

The Keysender help center. Setup, connected channels, orders, and delivery, for digital product vendors.

Product

  • Integrations
  • Pricing
  • Demo
  • API

Resources

  • Help Center
  • Submit a ticket
  • Ticket status
  • Request an integration
  • Connect a supplier
  • Insights
  • Refer & earn
  • Contact sales

Legal

  • Privacy Policy
  • Terms & Conditions
  • Violation Report

Bought from a seller?

Keysender is the delivery platform, not the seller. If your order has not arrived or is not as described, contact the seller directly. They can help fastest.

Get help with your order →
© 2026 Keysender. Made in the USA.
Keysender is the delivery system, not the seller.
Back
Help CenterDevelopers and APIConnecting your own app to Keysender

Connecting your own app to Keysender

Last updated Aug 26, 2026Developers and API

Reading this in another language? Use your browser's built-in translate option. Button and field names stay in English on purpose, to match what you see in Keysender.

Overview

This is the end-to-end path for a store, marketplace, or back office that Keysender does not connect to natively: your software records each sale through the API and Keysender delivers the code. It takes four calls to go from a fresh API key to a buyer holding a working code, and the same calls run every day after that.

TL;DR

  • Four calls take you from a fresh API key to a delivered code: log in, create a database, load codes, record the sale.
  • Reuse one bearer token per integration, and keep the API secret server-side only.
  • There is no deduplication on addcustom, so store every transaction id you receive before doing anything else.

Before you start

Make sure you have:

  • Access to your Keysender vendor account, with your API key and secret from Account > Settings > API Information.
  • A default email template in Templates, so deliveries have something to send.
  • Credits on the account (one per dispatch).

If your platform is one Keysender already connects to, use that integration instead; see Connected channels. Guides for popular automation platforms are being published as those integrations are released.

Steps

Log in once

  1. POST /login with api_key and api_secret, store the access_token, and send it as Authorization: Bearer ... on every call. Details: Getting started with the Keysender API.

Create the product's database

  1. POST /database with name, sku, and type: 0. Use your own product code as the sku; a repeat call with the same SKU returns the same database, so you can run it on every sync. Details: Managing inventory databases with the API.

Load stock

  1. POST /code?database_id=... with an array of {"value": "..."} objects, 1,000 per request at most. Details: Uploading and managing codes with the API.

Record the sale

  1. When a buyer pays, POST /transaction/addcustom with payer, quantity, database_id, amount, currency, and name. Keysender picks the codes, sends them with your template, and spends a credit.
  2. Store the returned transaction id against your order immediately. There is no deduplication: a retried call delivers again. Details: Creating transactions with the API.

Verify

  1. GET /transaction/{id}/inventory shows exactly which codes went out, and Transactions in the panel shows the same sale.

Keep it safe

  1. Keep the API secret on your server only. Never place it in a browser, a mobile app, or a public repository.
  2. Reuse one token per integration instead of logging in before each request, and call GET /logout when you retire a token.
  3. Stay under 600 requests per minute; on 429, wait and retry with the same body only for reads, never for addcustom.
  4. Log every transaction id you receive. It is the only handle you have on a delivery.

Confirm it works

A test order placed in your own system ends with a delivery email in the buyer's inbox, a transaction under Transactions in the panel, and the database's available count one lower.

Troubleshooting

Symptom Cause Action
The buyer got nothing The database had no available codes, or the account had no credits Check quantity_sent on the transaction, the database's available count, and the credit balance
The buyer got two emails The same sale was sent twice Use the stored id to make retries safe; never retry a call that already returned 200
401 mid-way The token expired or was logged out Log in again and continue

If it still is not working

Submit a ticket with the transaction id and the time of the calls.

Frequently asked questions

When should I use the API instead of a connected channel?

When Keysender does not connect natively to the store or marketplace you sell on. For channels it does connect to, the built-in integration records the sale and delivers without any code on your side.

How many calls does a first delivery take?

Four: log in, create the product's database, upload codes, and record the sale with /transaction/addcustom. After that, only the sale call runs per order, plus code uploads as stock is replenished.

What must my integration never do?

Never place the API secret in a browser, mobile app, or public repository; never retry a transaction call that already returned 200; and never log in before every request when one token will do.

Related articles

Getting started with the Keysender APICreating transactions with the APIUploading and managing codes with the APIManaging inventory databases with the API
Back to Help Center
If this still is not workingSubmit a Ticket