v1

latestOpenAPI 3.1.02026-07-24233206489.1 KB
Payment Links

Create Refund

Creates a refund for a payment associated with a payment link.

post/v1/payment_links/{id}/refunds

Path parameters

idstring required
Example:link_12345

Payment link ID.

Headers

Authorizationstring required
Example:Basic base64(sk_live:)

The API key for authentication. Use Basic base64(sk_live:).

Request body

amountnumber float required

Amount to refund in major currency units (e.g. 100.00 = PHP 100.00).

payment_idstring required

The ID of the payment to refund.

reasonstring required

Reason for the refund.

metadataobject

Additional metadata (string values).

Example request

{
  "amount": 100,
  "payment_id": "pay_12345",
  "reason": "requested_by_customer",
  "metadata": {}
}

Response

Refund created successfully.

Example response

{
  "data": {
    "id": "refund_123",
    "type": "refund",
    "attributes": {
      "amount": 10000,
      "balance_transaction_id": "bal_txn_123",
      "currency": "PHP",
      "livemode": true,
      "metadata": {},
      "notes": "customer request",
      "payment_id": "pay_123",
      "payout_id": "po_123",
      "reason": "requested_by_customer",
      "status": "succeeded",
      "available_at": 1711540800,
      "created_at": 1711540800,
      "refunded_at": 1711540860,
      "updated_at": 1711540860
    }
  }
}