Use a refund to return a payment to a customer.
Note: We do not currently support partial refunds. The original charge will therefore be fully refunded.
|The secret key for your account|
|The charge id returned when you originally did the charge. |
|A set of key-value pairs that you can attach to a Refund object.|
# Anonymous test key. Replace with your key.
SECRET_KEY = 'sk_test_960bfde0VBrLlpK098e4ffeb53e1'
response = requests.post(
# response.status_code will contain the HTTP status code
# response.json() will contain the response body
HTTP: 200 OK
"message": "Your refund has been processed",