Refunds & cancellations
Refunds
Section titled “Refunds”Refund a transaction, fully or partially, with its internal transaction id:
# Full refundcurl "https://api.creditcore.io/api/refund/99101" \ -H "Authorization: Bearer $CREDITCORE_API_TOKEN"
# Partial refund of 4.50curl "https://api.creditcore.io/api/refund/99101?amountToRefund=4.50" \ -H "Authorization: Bearer $CREDITCORE_API_TOKEN"- Only transactions with
refundStatusREFUNDABLEorALERTcan be refunded. - The amount can’t exceed the original amount.
- A transaction can be refunded once. After a partial refund its
refundStatusbecomesPARTIALLY_REFUNDEDand the rest can’t be refunded. - A new transaction of type
REFUNDEDwith a negative amount is recorded and aREFUNDwebhook is sent. - Refunding does not cancel the subscription. Unsubscribe the customer too if you want to stop renewals.
Cancellations
Section titled “Cancellations”Stop every subscription of a customer, using the customerId from the checkout response or webhooks:
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
UNSUBSCRIBEDand renewals stop immediately. - A
CANCELLATIONwebhook is sent for each subscription cancelled. - Past transactions are not refunded automatically.