1
0
Files
PayPal-PHP-Server-SDK/doc/models/refund-request.md
Patrick Powers 504c367386 Release 0.7.0
Beta Release 0.7.0 including:

- Bug fixes
- Updated model/function names
- Updated models to reflect changes in APIs
2025-03-20 13:18:55 -05:00

2.7 KiB

Refund Request

Refunds a captured payment, by ID. For a full refund, include an empty request body. For a partial refund, include an amount object in the request body.

Structure

RefundRequest

Fields

Name Type Tags Description Getter Setter
amount ?Money Optional The currency and amount for a financial transaction, such as a balance or payment due. getAmount(): ?Money setAmount(?Money amount): void
customId ?string Optional The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. The pattern is defined by an external party and supports Unicode.
Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^.*$
getCustomId(): ?string setCustomId(?string customId): void
invoiceId ?string Optional The API caller-provided external invoice ID for this order. The pattern is defined by an external party and supports Unicode.
Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^.*$
getInvoiceId(): ?string setInvoiceId(?string invoiceId): void
noteToPayer ?string Optional The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. The pattern is defined by an external party and supports Unicode.
Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^.*$
getNoteToPayer(): ?string setNoteToPayer(?string noteToPayer): void
paymentInstruction ?RefundPaymentInstruction Optional Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability. getPaymentInstruction(): ?RefundPaymentInstruction setPaymentInstruction(?RefundPaymentInstruction paymentInstruction): void

Example (as JSON)

{
  "amount": {
    "currency_code": "currency_code6",
    "value": "value0"
  },
  "custom_id": "custom_id6",
  "invoice_id": "invoice_id8",
  "note_to_payer": "note_to_payer0",
  "payment_instruction": {
    "platform_fees": [
      {
        "amount": {
          "currency_code": "currency_code6",
          "value": "value0"
        }
      },
      {
        "amount": {
          "currency_code": "currency_code6",
          "value": "value0"
        }
      },
      {
        "amount": {
          "currency_code": "currency_code6",
          "value": "value0"
        }
      }
    ]
  }
}