API Reference

TeamBounty API

The TeamBounty API lets you create payment links, verify transactions, manage subscriptions, issue refunds, and receive real-time webhook notifications from your application.

Base URLhttps://api.teambounty.io/calls

Your PublicToken and PrivateToken can be found in the merchant dashboard under /app/api. Webhook configuration is also managed from the same section.

POST/create-payment

Generate Payment Link

This endpoint is used to create a payment link for processing transactions. Once generated, the payment link can be integrated into your application in multiple ways, including:

  • Embedded within an iframe
  • Displayed inside a modal
  • Redirected to as a standalone payment page

All generated payment links will appear in the merchant dashboard as unprocessed payments until successfully completed. For recurring payments, the dashboard provides visibility into all subsequent billing cycles associated with the transaction.

Request Headers

HeaderDescription
PublicTokenYour merchant public token for authentication

Body Parameters

ParameterTypeDescription
product_namerequiredstringName of the product or service
descriptionrequiredstringDescription of the product
emailrequiredstringCustomer email address
referencerequiredstringUnique transaction reference
amountrequiredstringPayment amount
quantitynumberNumber of items (default: 1)
currencystringTransaction currency (default: USD)
recurringstringBilling frequency. Accepted values: None, Hourly, Daily, Weekly, Monthly, Quarterly, Semi-Annually, Annually

Sample Error Response

json
{
  "status": 400,
  "success": false,
  "note": "Email cannot be empty"
}

Sample Success Response

json
{
  "status": 200,
  "success": true,
  "uniqueID": "RIEI30OPLD",
  "reference": "3024ujf",
  "token": "fhwfuigyf4g96ryg34r344",
  "payment_link": "https://teambounty.io/pay/fhwfuigyf4g96ryg34r344",
  "note": "Payment link successfully created"
}
POST/verify-payment

Verify Payment

This endpoint allows you to verify the status of a payment using either the reference or the uniqueID generated during payment link creation. It returns the current payment status and full transaction details.

Payment Status Codes

CodeStatus
0Not yet paid
1Paid
2Cancelled
3Chargeback
4Refunded

Request Headers

HeaderDescription
PrivateTokenYour merchant private token

Body Parameters

ParameterDescription
uniqueIDOptional if reference is provided
referenceOptional if uniqueID is provided

Sample Success Response

json
{
  "status": 200,
  "success": true,
  "uniqueID": "ERUI490OLF",
  "reference": "",
  "data": [
    {
      "id": 2,
      "uniqueID": "EIRU490POL",
      "name": "sample product",
      "description": "sample description",
      "amount": 120,
      "currency": "GBP",
      "quantity": 1,
      "total_amount": 120,
      "fee": 10,
      "total_earned": 110,
      "date_added": 1003202944,
      "date_charged": 1003459090,
      "token": "543920839823",
      "payment_status": 1
    }
  ],
  "note": "Successfully Fetched"
}
POST/cancel-sub

Cancel Subscription

This endpoint is used to cancel a recurring subscription. Once cancelled, the customer will not be billed in subsequent billing cycles.

Request Headers

HeaderDescription
PrivateTokenYour merchant private token

Body Parameters

ParameterDescription
referenceOptional if uniqueID is provided
uniqueIDOptional if reference is provided

Sample Success Response

json
{
  "status": 200,
  "success": true,
  "uniqueID": "4389ASO0PL",
  "reference": "",
  "note": "Subscription successfully cancelled"
}
POST/refund

Refund

This endpoint allows merchants to process refunds back to the original payment method used by the customer.

To minimize the risk of chargebacks, it is strongly recommended that merchants provide users with an easy refund process.

Request Headers

HeaderDescription
PrivateTokenYour merchant private token

Body Parameters

ParameterDescription
referenceOptional if uniqueID is provided
uniqueIDOptional if reference is provided
amountAmount to refund

Sample Success Response

json
{
  "status": 200,
  "success": true,
  "uniqueID": "WUIR44J05J",
  "reference": "",
  "note": "Subscription successfully refunded"
}
EVENT

Webhooks

Webhooks enable your application to receive real-time event notifications for payment-related activities. Before using webhooks, ensure that you have configured your webhook URL in the /app/api section of the merchant dashboard. All webhook calls sent to your endpoint will also be logged in this section.

Note: Webhook event logs are stored for 3 months. For extended storage, please contact support.

Supported Event Types

payment.created
payment.completed
payment.failed
subscription.renewed
subscription.cancelled
refund.processed
refund.failed

Webhook Payload Structure

json
{
  "status": 200,
  "success": true,
  "event": "payment.created",
  "email": "aikwebdesign@gmail.com",
  "uniqueID": "A1B2C3D4E5F6",
  "name": "Premium Subscription",
  "description": "Monthly premium subscription plan",
  "amount": 29.99,
  "currency": "USD",
  "quantity": 1,
  "total_amount": 29.99,
  "fee": 15,
  "total_earned": 25.49,
  "reference": "ORDER_12345",
  "recurring_status": "1",
  "recurring_duration": "Monthly",
  "payment_link": "https://teambounty.io/pay/UYEWOIUYEY87398YUhjgcj"
}

Important Notes

Every webhook response will always include:

status
success
event
email
uniqueID
reference

Additional fields may vary depending on the event type and should be handled dynamically in your application.

Security: For security verification, the PrivateToken will also be sent in the request headers. You should validate this token to ensure the webhook request is legitimate.