v1

latestOpenAPI 3.0.02026-07-264731126.7 KB

The refund call is similar to the sale call. It works the same way, except that it generates negative commissions. <Tip>HTTP Request <br/>POST https://api.firstpromoter.com/api/v2/track/refund</Tip>

post/refund

Headers

Account-IDstring required

Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations

Request body

OR

Response

Success response

idinteger
typestring
amount_centsinteger

Example response

{
  "id": 33847726,
  "type": "refund",
  "amount_cents": -1000,
  "reward": {
    "id": 10940148,
    "status": "approved",
    "amount": -200,
    "unit": "cash",
    "created_at": "2024-09-11T14:36:01.016Z",
    "lead": {
      "id": 20738339,
      "state": "cancelled",
      "email": "hello@testmintli.com",
      "customer_since": "2024-09-11T14:22:12.160Z",
      "cancelled_at": "2024-09-11T15:07:46.174Z",
      "suspicion": "no_suspicion",
      "created_at": "2024-09-09T16:22:44.168Z"
    },
    "event_id": "test_sale_12340987_refund",
    "conversion_amount": -1000,
    "tier_level": 1
  },
  "lead": {
    "id": 20738339,
    "state": "cancelled",
    "email": "hello@testmintli.com",
    "customer_since": "2024-09-11T14:22:12.160Z",
    "cancelled_at": "2024-09-11T15:07:46.174Z",
    "suspicion": "no_suspicion",
    "created_at": "2024-09-09T16:22:44.168Z"
  },
  "promoter": {
    "id": 3920164,
    "status": "active",
    "email": "peluwydo@mailinator.com",
    "created_at": "2022-04-26T15:28:24.800Z",
    "temp_password": "xxxxxxxxxx",
    "default_promotion_id": 4210919,
    "pref": "db1znwe",
    "default_ref_id": "8yi2epelut",
    "note": "This is a note",
    "parent_promoter_id": 577918,
    "earnings_balance": {
      "cash": 50744
    },
    "current_balance": {
      "cash": 20044
    },
    "paid_balance": {
      "cash": 30700
    },
    "auth_token": "xxxxxxxxxxxxxx"
  }
}