Skip to content

Refunds & cancellations

Refund a transaction, fully or partially, with its internal transaction id:

Terminal window
# Full refund
curl "https://api.creditcore.io/api/refund/99101" \
-H "Authorization: Bearer $CREDITCORE_API_TOKEN"
# Partial refund of 4.50
curl "https://api.creditcore.io/api/refund/99101?amountToRefund=4.50" \
-H "Authorization: Bearer $CREDITCORE_API_TOKEN"
  • Only transactions with refundStatus REFUNDABLE or ALERT can be refunded.
  • The amount can’t exceed the original amount.
  • A transaction can be refunded once. After a partial refund its refundStatus becomes PARTIALLY_REFUNDED and the rest can’t be refunded.
  • A new transaction of type REFUNDED with a negative amount is recorded and a REFUND webhook is sent.
  • Refunding does not cancel the subscription. Unsubscribe the customer too if you want to stop renewals.

Stop every subscription of a customer, using the customerId from the checkout response or webhooks:

Terminal window
curl -X POST "https://api.creditcore.io/api/unsubscribe/all/5812" \
-H "Authorization: Bearer $CREDITCORE_API_TOKEN"

To cancel a single subscription, use POST /api/unsubscribe/{subscriptionId} with the subscription ID instead.

  • The subscription status becomes UNSUBSCRIBED and renewals stop immediately.
  • A CANCELLATION webhook is sent for each subscription cancelled.
  • Past transactions are not refunded automatically.