v1

latestOpenAPI 3.1.02026-07-24170121.2 MB

Refund a Charge

This API refunds a previously created charge.

post/v1/charges/{charge_id}/refunds

Path parameters

charge_idstring required

charge_id here represents a specific charge that should be refunded.

Request body

amountinteger

A positive integer in cents representing how much to charge.

reason'requested_by_customer' | 'fraudulent' | 'duplicate' | 'other'

Reason for refunding a transaction.

descriptionstring

Description for refunding a transaction.

do_not_send_email_to_customerstring

To prevent sending mail to customer for transaction. By default the system will sent mail

do_not_send_sms_to_customerstring

Do not send sms to customer. in order to prevent sending sms the value must be yes. If not present sms will be send

Response

200

Example response

{
  "data": {
    "object": "Charge",
    "id": "DLbnOBbBDWMRROoM",
    "amount": 99,
    "amount_approved": 99,
    "amount_captured": 99,
    "amount_voided": 99,
    "type": "Sale",
    "customer_email": "eric.yulfo@payarc.com",
    "captured": 1,
    "status": "void",
    "auth_code": "TAS843",
    "statement_description": "Eric's Energy Drinks",
    "created_at": 1725461676,
    "updated_at": 1725461750,
    "card_level": "LEVEL1",
    "created_by": "serviceuser0567051053675152@payarc.com",
    "void_reason": "requested_by_customer",
    "void_description": "requested_by_customer",
    "tsys_response_code": "A0000",
    "host_response_code": "00",
    "host_response_message": "Success",
    "host_reference_number": "424814503459",
    "card": {
      "data": {
        "object": "Card",
        "id": "vmy905NNNm5y0M2L",
        "card_source": "PHONE",
        "is_default": 1,
        "exp_month": "12",
        "exp_year": "2025",
        "is_verified": 1,
        "fingerprint": "my905PmvmPNmNP0M",
        "brand": "V",
        "last4digit": "5439",
        "first6digit": 401200,
        "avs_status": "0",
        "cvc_status": "M",
        "customer_id": "4DPNMVjxNPnMVnjA",
        "created_at": 1725451100,
        "updated_at": 1725451161
      }
    }
  },
  "meta": {
    "include": [
      "review"
    ]
  }
}