Get a refund

get/refunds/{id}

The GET /refunds/{id} call allows your platform to look up a single refund. Refunds facilitate the return of money from the merchant to the payer.

SecurityappIdAuth and appTokenAuth
Request
path Parameters
id
required
string [ 1 .. 255 ] characters

ID of the refund, generated by WePay when the refund is created.

query Parameters
expand
string

Pass the payment_method value to expand the response to include the payment method's card_brand and last_four.

header Parameters
Api-Version
required
string
Example: 3.0
Unique-Key
string
Responses
200
Response Schema: application/json
required
object or null

The amount of the refund when not performing a full refund.

id
required
string

ID of the refund, generated by WePay when the refund is created.

resource
required
string

Helps organize information by identifying the resource type of the object data.

Value: Description
refunds
path
required
string

Path of resource and resource ID.

create_time
required
integer <int64> >= 0

The time (in UNIX) when the refund was created.

required
object or null

Details the owner resource and owner path.

status
required
string

Status of the refund. Possible values include: pending, completed, failed.

required
object or null

The resource ID and path for the Order that your app created and associated with the payment.

required
object

The payment linked to this refund or dispute.

required
object
refund_reason
required
string

The reason for this refund.

required
Array of objects or null or null

Explains why refund is pending and may contain an array of reasons.

required
object or null
required
object or null

If a refund has occurred, fetch this transaction record to account for the portion of the refund debited from the merchant.

required
object or null

If a refund has occurred, fetch this transaction record to account for the portion of the refund debited from your platform account balance.

required
object or null

Any custom data your platform chooses to attach to this resource. The custom data must be key-value pairs and not contain any personally identifiable information (PII) or payment card (PCI) data.

api_version
string
reference_id
string or null [ 1 .. 255 ] characters

A custom reference ID for your platform to track the object. It can be any string.

400

INVALID_PARAMS

403

NOT_AUTHORIZED

500

UNEXPECTED_ERROR

Request samples
Response samples
application/json
{
  • "amounts": {
    • "total_amount": 100,
    • "currency": "USD",
    • "fee_refund_amount": 0
    },
  • "create_time": 1509140695,
  • "custom_data": null,
  • "failure_reason": null,
  • "id": "9b53d5fd-17b1-400c-b197-3204f4d6171c",
  • "order": null,
  • "owner": {
    • "id": "40200612-e849-4172-8308-657cf3a0de27",
    • "path": "/accounts/40200612-e849-4172-8308-657cf3a0de2",
    • "resource": "accounts"
    },
  • "path": "/refunds/9b53d5fd-17b1-400c-b197-3204f4d6171c",
  • "payment": {
    • "id": "a8ca756e-5a62-4c2a-80fd-9b82563d47cb",
    • "path": "/payments/a8ca756e-5a62-4c2a-80fd-9b82563d47cb",
    • "resource": "payments"
    },
  • "payment_method": {
    • "id": "00000000-6363-0000-0000-0000c27db2f3",
    • "path": "/payment_methods/00000000-6363-0000-0000-0000c27db2f3",
    • "resource": "payment_methods"
    },
  • "pending_reasons": null,
  • "refund_reason": "example refund reason",
  • "resource": "refunds",
  • "status": "completed",
  • "txnr_app_fee_refund": null,
  • "txnr_merchant_refund": {
    • "id": "7c59ebf4-d6ae-4125-85f8-515b95725501",
    • "path": "/transaction_records/7c59ebf4-d6ae-4125-85f8-515b95725501",
    • "resource": "transaction_records"
    },
  • "api_version": "3.0",
  • "reference_id": "reference_id_0"
}