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 totally or partially.

    Please check with your manager if partial refunds are enabled for you.

  • Within the chargeback procedure — this procedure cannot be initiated by the merchant, a notification about it is sent by Smart Glocal. In this case, the amount is withdrawn from the compensation.

How to perform a refund

Step 1. Send a refund request

To perform a refund, send a session/refund request. In the session_id field, pass the identifier of the successful 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.

Request example

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

Step 2. Wait to be notified of the results

After the refund is completed, Smart Glocal will send you a payment_refunded webhook with the results.

Webhook example

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