code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.Refund.create(
    charge="ch_3LSd9N2eZvKYlo2C1na6w0E5",
  )
  '''Response {
    "id": "re_3LSd9N2eZvKYlo2C1xXmZeJl",
    "object": "refund",
    "amount": 100,
    "balance_transaction": null,
    "charge": "ch_3LSd9N2eZvKYlo2C1na6w0E5",
    "created": 1659516119,
    "currency": "usd",
    "metadata": {},
    "payment_intent": null,
    "reason": null,
    "receipt_number": null,
    "source_transfer_reversal": null,
    "status": "succeeded",
    "transfer_reversal": null
  }'''
nl: Create a refundWhen you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
  Creating a new refund will refund a charge that has previously been created but not yet refunded.
  Funds will be refunded to the credit or debit card that was originally charged.
  You can optionally refund only part of a charge.
  You can do so multiple times, until the entire charge has been refunded.
  Once entirely refunded, a charge can’t be refunded again.
  This method will raise an error when called on an already-refunded charge,
  or when trying to refund more money than is left on a charge.Parameters charge optional The identifier of the charge to refund. amount optional, default is entire charge A positive integer in cents representing how much of this charge to refund. Can refund only up to the remaining, unrefunded amount of the charge. metadata optional dictionary, default is { } A set of key-value pairs that you can attach to a Refund object. This can be useful for storing additional information about the refund in a structured format. You can unset individual keys if you POST an empty value for that key. You can clear all keys if you POST an empty value for metadata payment_intent optional ID of the PaymentIntent to refund. reason optional, default is null String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. If you believe the charge to be fraudulent, specifying fraudulent as the reason will add the associated card and email to your block lists, and will also help us improve our fraud detection algorithms. refund_application_fee optional, default is false Connect only Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded.An application fee can be refunded only by the application that created the charge. reverse_transfer optional, default is false Connect only Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).A transfer can be reversed only by the application that created the charge.ReturnsReturns the Refund object if the refund succeeded. Raises an error if the Charge/PaymentIntent has already been refunded, or if an invalid identifier was provided