Skip to content

After the payment

Refunds

Refund all or part of a paid card or wallet payment to the original payment method, from the dashboard or from your server. Refunds cannot be undone.

From the dashboard

Open a paid transaction and select Refund next to its amount. Enter an amount (by default the whole remaining balance) and confirm. The transaction then shows the refunded total and the remaining balance. Another refund becomes available once the previous one has succeeded and the new balance is verified.

From your server

  1. Read the refund state. remainingCents is the verified refundable balance; request is the latest refund, or null.
  2. Create the refund with expectedAmountCents equal to the remainingCents you just read. Add amountCents for a partial refund, or omit it to refund everything that remains.
  3. Read the refund state again to follow the request. For the financial outcome, read the payment or wait for the payment.partially_refunded or payment.refunded webhook.
GET/v1/payments/{id}/refund
API reference →

Path parameters

  • idrequiredstring <uuid>

Responses

Merchant-safe refund request state; provider identifiers and credentials are never returned.

  • dataobject
    • eligibleboolean
    • remainingCentsinteger≥ 0
    • refundedCentsinteger≥ 0
    • requestobjectcan be null
      • idstring <uuid>
      • amountCentsinteger≥ 1
      • statusstring

        One ofsubmittingunknownpendingsucceededfailedcanceledrequires_action

      • createdAtstring <date-time>
Request
curl "https://api.wegopay.tech/v1/payments/7d5c2f1e-4b8a-4c3e-9f21-6a0b8e4d1c55/refund" \
  -H "Authorization: Bearer $WEGOPAY_API_KEY"
Response
{
  "data": {
    "eligible": true,
    "remainingCents": 1500,
    "refundedCents": 0,
    "request": null
  }
}
POST/v1/payments/{id}/refund
API reference →

Path parameters

  • idrequiredstring <uuid>

Request body application/json

  • expectedAmountCentsrequiredinteger1–100000000

    Verified remaining balance shown at confirmation; used as a duplicate and stale-state guard.

  • amountCentsinteger1–100000000

    Amount to refund, at most expectedAmountCents. Omit to refund the full remaining balance.

Responses

Merchant-safe refund request state; provider identifiers and credentials are never returned.

  • dataobject
    • eligibleboolean
    • remainingCentsinteger≥ 0
    • refundedCentsinteger≥ 0
    • requestobjectcan be null
      • idstring <uuid>
      • amountCentsinteger≥ 1
      • statusstring

        One ofsubmittingunknownpendingsucceededfailedcanceledrequires_action

      • createdAtstring <date-time>
Request
curl -X POST "https://api.wegopay.tech/v1/payments/7d5c2f1e-4b8a-4c3e-9f21-6a0b8e4d1c55/refund" \
  -H "Authorization: Bearer $WEGOPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expectedAmountCents": 1500,
    "amountCents": 500
  }'
Response
{
  "data": {
    "eligible": true,
    "remainingCents": 1500,
    "refundedCents": 0,
    "request": {
      "id": "40000000-0000-4000-8000-000000000001",
      "amountCents": 500,
      "status": "pending",
      "createdAt": "2026-10-11T13:00:00Z"
    }
  }
}

Refund request statuses

StatusWhat to do
submittingIn progress. Wait and read again; further refunds are blocked.
pendingAccepted and waiting for confirmation; further refunds are blocked.
succeededSucceeded. The payment totals update once verified.
failed, canceledDid not complete. Contact Wegopay support before trying again.
unknown, requires_actionDo not retry. Contact Wegopay support.

Retries and duplicates

The expected balance guards against duplicates. Sending the same balance and amount again returns the same request. A different amount, or an outdated balance, returns 409.

Never refresh the balance and resubmit automatically

After a timeout, read the refund state first. If you must resend, send the exact original body. A lower balance means a refund already happened; it is not a reason to retry.

A 200 response acknowledges the request; it does not prove the money was returned. Keep the returned request ID with your order. The read endpoint returns only the latest request, not the full history. See errors for status codes.