Track a payment
POST
Report a successful payment. Rewards are calculated from the net amount.
apiKeyheader
AuthorizationBearer <token>Use a secret key such as sk_test_... in test mode or sk_live_... in production.
Idempotency-Key?stringA unique key that makes retries safe. Keys expire after 24 hours.
Format
uuidapplication/json- body
external_id*stringThe customer who paid.
payment_id*stringYour payment or invoice ID. Used to match refunds later.
amount*integerNet amount in the smallest currency unit, after tax and discounts.
currency*stringThe payment was accepted for processing.
curl -X POST 'https://api.referralapi.example/v1/events/payment' \ -H 'Content-Type: application/json' \ -d '{ "external_id": "string", "payment_id": "in_1PqR2s", "amount": 4900, "currency": "usd"}'Example Response202
Empty