RefCampaign/docs
Référence APIConversions

Refund a conversion and claw back its commission

Signals that a previously reported conversion was refunded or charged back. Intended for merchants billing outside Stripe Connect (e.g. Shopify Payments), where RefCampaign receives no refund webhook. The conversion is identified by its `externalId`. Omit `amount` for a full refund, or pass the refunded amount in minor units (cents, in the conversion currency) for a partial refund. Pending commissions are rejected; already-paid commissions get a prorated negative clawback entry. Idempotent: a second call on an already-refunded conversion is a no-op.

POST
/api/v1/conversions/refund

Signals that a previously reported conversion was refunded or charged back. Intended for merchants billing outside Stripe Connect (e.g. Shopify Payments), where RefCampaign receives no refund webhook. The conversion is identified by its externalId. Omit amount for a full refund, or pass the refunded amount in minor units (cents, in the conversion currency) for a partial refund. Pending commissions are rejected; already-paid commissions get a prorated negative clawback entry. Idempotent: a second call on an already-refunded conversion is a no-op.

Authorization

bearerAuth
AuthorizationBearer <token>

API key issued from the merchant dashboard (prefix rc_live_ / rc_test_). Sent as Authorization: Bearer <token>. Used by the SDK and any direct server-to-server integration.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://app.refcampaign.com/api/v1/conversions/refund" \  -H "Content-Type: application/json" \  -d '{    "externalId": "string"  }'
Empty
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}
Empty
Empty
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "details": null
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "requestId": "string"
  }
}