POST
/
refund
Refund
curl --request POST \
  --url https://test.paysight.io/customerapi/refund \
  --header 'Authorization: <api-key>' \
  --header 'ClientId: <clientid>' \
  --header 'Content-Type: application/json' \
  --header 'UserEmail: <useremail>' \
  --data '{
  "parentCompanyId": 1,
  "userEmail": "care@yourdomain.com",
  "messageId": "fd6562a1-e0e7-4b8b-b0d4-f20359482dd1",
  "amount": 12.99,
  "refundItems": [],
  "sendUserCommunication": false
}'
{
  "success": true,
  "message": "",
  "refundId": "da6562a1-e0e7-4b8b-c0d4-g20359482dd1"
}

Authorizations

Authorization
string
header
required

Your Paysight API key. You can find it in your Paysight account at https://app.paysight.io/settings/account

Headers

ClientId
string
required

Your Paysight Tenant/Client Id. This is the id of the parent company listed in https://app.paysight.io/management/companies. Alternatively, this will be provided by Paysight

UserEmail
string
required

The email address of the party or group making the request

Body

application/json

Payload

parentCompanyId
integer
required

Your Paysight tenant id. This will be provided by Paysight.

Example:

1

userEmail
string<email>
required

An email associated with the party/agent making the request

Example:

"care@yourdomain.com"

messageId
string<uuid>
required

The unique Paysight transaction id

Example:

"fd6562a1-e0e7-4b8b-b0d4-f20359482dd1"

sendUserCommunication
boolean
required

If true, then Paysight will send a confirmation to the user's email address (if mail settings are set up)

Example:

false

amount
number

The amount to refund in the original transaction currency. 0 will result in a full refund. Any amount greater than the transaction amount will be rejected. Any partial refund amount for an eCom order must be accompanied by a complete list of refundItems.

Example:

12.99

refundItems
integer[]

To be defined (applicable only to ecom transactions)

Example:
[]

Response

200 - application/json

Valid Request. More detailed info will be in the JSON body

success
boolean
required

Indicates if refund transaction was successful

Example:

true

message
string

Debug information

Example:

""

refundId
string<uuid>

The unique Paysight transaction id for the refund

Example:

"da6562a1-e0e7-4b8b-c0d4-g20359482dd1"