- Store API
- Admin API
- Auth
- Batch Jobs
- Currencies
- Customers
- Customer Groups
- Discounts
- Draft Orders
- Gift Cards
- Inventory Items
- Invites
- Notes
- Notifications
- Orders
- Create a Reservation
- Cancel Claim's Fulfillment
- Ship a Claim's Fulfillment
- Cancel Swap's Fulfilmment
- Get Order Reservations
- Add a Shipping Method
- Create a Refund
- Get an Order
- Update an Order
- Create a Fulfillment
- Cancel a Swap
- List Orders
- Create a Swap
- Complete an Order
- Create a Swap Fulfillment
- Cancel a Claim
- Process a Swap Payment
- Ship a Fulfillment
- Capture an Order's Payments
- Archive Order
- Update a Claim
- Request a Return
- Create a Claim Fulfillment
- Ship a Swap's Fulfillment
- Cancel a Fulfilmment
- Create a Claim
- Cancel an Order
- Order Edits
- Payments
- Payment Collections
- Product Collections
- Product Tags
- Product Types
- Product Variants
- Price Lists
- Products
- Product Categories
- Publishable Api Keys
- Reservations
- Regions
- Return Reasons
- Returns
- Sales Channels
- Shipping Options
- Shipping Profiles
- Stock Locations
- Store
- Swaps
- Uploads
- Tax Rates
- Users
- 【Demo】Products
Refund Payment
POST
/admin/payments/{id}/refund
Admin API/PaymentsPayments
Request
Path Params
id
string
required
Body Params application/json
amount
integer
required
reason
string
required
note
string
optional
Example
{
"amount": 0,
"reason": "string",
"note": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/payments//refund' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
refund
object (Refund)
required
id
string
required
Example:
ref_01G1G5V27GYX4QXNARRQCW1N8T
order_id
string | null
required
Example:
order_01G8TJSYT9M6AVS5N4EMNFS1EK
order
object | null
optional
payment_id
string | null
required
Example:
pay_01G8ZCC5W42ZNY842124G7P5R9
payment
object | null
optional
amount
integer
required
Example:
1000
note
string | null
required
Example:
I didn't like it
created_at
string <date-time>
required
updated_at
string <date-time>
required
reason
enum<string>
required
Allowed values:
discountreturnswapclaimother
Example:
return
idempotency_key
string | null
required
metadata
object | null
required
Example:
{"car":"white"}
Example
{
"refund": {
"id": "ref_01G1G5V27GYX4QXNARRQCW1N8T",
"order_id": "order_01G8TJSYT9M6AVS5N4EMNFS1EK",
"order": {},
"payment_id": "pay_01G8ZCC5W42ZNY842124G7P5R9",
"payment": {},
"amount": 1000,
"note": "I didn't like it",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"reason": "discount",
"idempotency_key": "string",
"metadata": {
"car": "white"
}
}
}
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2024-05-23 07:10:14