Skip to main content
POST
/
v1
/
transactions
Referral transactions
curl --request POST \
  --url https://api.example.com/v1/transactions
{
  "data": {
    "key": "transaction_123",
    "action": "sale",
    "amount": 99.99,
    "customer": "customer_123",
    "referred_customer": "customer_456",
    "credit": false,
    "is_currency": true,
    "amount_units": "USD",
    "created_at": "2025-05-12T15:43:55.000000Z",
    "rewards": []
  },
  "status": 1
}
Track purchases made by referred customers to calculate rewards for referring customers.
In refer-a-friend programs, response fields use customer (referring customer) and referred_customer instead of partner and customer used in affiliate programs.

Create transaction

POST https://api.partnero.com/v1/transactions

Request body

ParameterTypeRequiredDescription
keystringNoUnique transaction ID (recommended for refund handling)
amountnumberYesTransaction amount
amount_unitsstringNoCurrency code (e.g., USD, EUR)
actionstringNoTransaction type (e.g., sale)
customer.idstringYes*Referred customer’s ID
customer.emailstringYes*Referred customer’s email (alternative to ID)
customer.keystringYes*Referred customer’s key (alternative to ID)
*Provide at least one customer identifier.

Request

cURL
curl --location 'https://api.partnero.com/v1/transactions' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "customer": {
      "id": "customer_456"
    },
    "key": "transaction_123",
    "amount": 99.99,
    "action": "sale"
  }'

Response

{
  "data": {
    "key": "transaction_123",
    "action": "sale",
    "amount": 99.99,
    "customer": "customer_123",
    "referred_customer": "customer_456",
    "credit": false,
    "is_currency": true,
    "amount_units": "USD",
    "created_at": "2025-05-12T15:43:55.000000Z",
    "rewards": []
  },
  "status": 1
}

Response fields

FieldTypeDescription
keystringTransaction identifier
actionstringTransaction type
amountnumberTransaction amount
amount_unitsstringCurrency code
customerstringReferring customer’s identifier
referred_customerstringReferred customer’s identifier
creditbooleanWhether this is a credit transaction
is_currencybooleanWhether the amount is monetary
rewardsarrayAssociated rewards
created_atstringISO 8601 timestamp

List transactions

GET https://api.partnero.com/v1/transactions
ParameterTypeDefaultDescription
limitinteger15Results per page (1–250)
pageinteger1Page number
cURL
curl --location 'https://api.partnero.com/v1/transactions' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Get transaction

GET https://api.partnero.com/v1/transactions/{key}
cURL
curl --location 'https://api.partnero.com/v1/transactions/transaction_123' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Delete transaction

DELETE https://api.partnero.com/v1/transactions/{key}
Deleting a transaction is permanent and will also remove any rewards earned by the referring customer.
cURL
curl --location --request DELETE 'https://api.partnero.com/v1/transactions/transaction_123' \
  --header 'Authorization: Bearer YOUR_API_KEY'