- API Introduction
- Error Code
- Payment Intents
- Charges
- Payment Methods
- Refunds
- Webhooks
- Events
- Files
- Disputes
- Payouts
- Balance
- Products
- Prices
- Payment Links
- Checkout
- Customers
- Setup Intents
- Invoices
- Invoice Items
- Invoice Line Item
- Subscriptions
- Subscription Items
- Issuing
- Authorizations
- Cardholders
- Cards
- Transactions
- Coupons
- Promotion Code
- Accounts
Create a refund
POST
/v1/refunds
Request
Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string {{Username}}:{{Password}}Example:
Authorization: Basic YWRtaW46MTIzNDU2
Header Params
Accept
string
required
Default:
application/json
Content-Type
string
required
Default:
application/json
Body Params application/json
amount
string
optional
metadata
object
optional
payment_intent
string
optional
reason
enum<string>
optional
Allowed values:
duplicatefraudulentrequested_by_customerresolved_dispute
Example
{
"reason": "requested_by_customer",
"payment_intent": "pi_1787730829493927936"
}
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 'https://apitest.wooshpay.com/v1/refunds?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"reason":"requested_by_customer",
"payment_intent":"pi_1787730829493927936"
}'
Responses
🟢200OK
application/json
Body
id
string
optional
object
string
optional
amount
integer
optional
created
integer
optional
currency
string
optional
metadata
object
optional
payment_intent
string
optional
reason
enum<string>
optional
Allowed values:
duplicatefraudulentrequested_by_customerexpired_uncaptured_chargeresolved_dispute
status
string
optional
description
string
optional
failure_reason
enum<string>
optional
Allowed values:
lost_or_stolen_cardexpired_or_canceled_cardunknown
Example
{
"id": "string",
"object": "string",
"amount": 0,
"created": 0,
"currency": "string",
"metadata": {},
"payment_intent": "string",
"reason": "duplicate",
"status": "string",
"description": "string",
"failure_reason": "lost_or_stolen_card"
}
Modified at 2024-05-07 06:32:00