Skip to main content

Payment refunds

You can return a successful payment to the sender as follows:

  • Within the refund operation – this is the most commonly encountered situation, the payment can be returned completely or partially.
  • Within the chargeback procedure – this procedure cannot be initiated by the client, a notification about it is sent by Pike. In this case, the amount is withdrawn from the compensation.

In both cases, a record will appear in the report.

How to perform a refund

Step 1. Send a refund request

Please note that you can only send a request for a refund, not a chargeback.

To perform a refund, send a session/refund request. In the session_id field, pass the identifier of the payment session for the payment you need to refund. In amount_details.amount, specify the amount of the refund. If you leave this blank, the money will be refunded in full (i.e. for the full amount of the payment in question).

Example
curl -X POST \
https://proxy-demo.pikepayments.com/api/v1/session/refund \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"session_id":"ps_3230"
}'

Step 2. Wait to be notified of the results of the refund

After the refund has been issued, Pike will send you a payment_refunded webhook with the results.

Example
curl - X POST \
https: //partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_refunded",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"acquiring_payments": [{
"id": "pm_2705",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payment_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"metadata": "good",
"refunds": [{
"id": "rf_203",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"amount_details": {
"amount": 1000,
"currency": "rub"
}
}],
"transaction_info": {
"fp_message_id": "A50581324524670W0000040011450701"
}
}]
}
}'