Skip to content

Mock update a refund

Request

Mark an in_progress refund as successful

Security
JWT
Path
idstringrequired

The ID of the refund

Example:refund_E602dMzgjpDC
Bodyapplication/jsonrequired
statusstring

The new status of the refund. You can only mark a refund as success

Example:"success"
PATCH
/refunds/{id}/mock_update_status
curl -i -X PATCH \
  https://api.glomopay.com/api/v1/refunds/refund_E602dMzgjpDC/mock_update_status \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "success"
  }'

Responses

Refund updated successfully

Bodyapplication/json
idstring, (string)read-only

The unique identifier for the refund.

Example:"refund_6776d57dnbTWj"
customer_idstring

The unique identifier of customer linked to refund.

Example:"cust_E602dMzgjpDC"
payment_idstring

The unique identifier of payment linked to refund.

Example:"payt_E602dMzgjpDC"
reasonstring

The reason for the refund.

Example:"Requested by Customer"
feesobject

The fees charged for the refund.

balance_usedobject

The balance deducted to process the refund.

documentsArray of any
statusstringread-only

The status of the refund.

Enum:"success""failed""action_required""pending""under_review"
Example:"success"
currencystring, (iso-4217)

The currency code in ISO 4217 format. For example, USD.

Example:"USD"
amountnumber, >= 1

The amount you want to receive in cents. For example, 1000 cents is $10.00. The currency is determined by the currency field. Cents is a general term for the smallest unit of currency in any currency. It does not necessarily mean USD cents.

Example:1000
utrstringread-only

The Unique Transaction Reference (UTR) number associated with the refund.

Example:"UTR123456789"
partial_refundbooleanread-only

Indicates whether the refund is a partial refund.

Example:false
created_atstring, (timestamp)read-only

Timestamp representing when the refund was created

Example:"2021-06-01T12:00:00Z"
updated_atstring, (timestamp)read-only

Timestamp representing when the refund was last updated

Example:"2021-06-01T12:00:00Z"
request_idstringread-only

Optional idempotency key.

Example:false
Response
{ "id": "refund_6776d57dnbTWj", "customer_id": "cust_E602dMzgjpDC", "payment_id": "payt_E602dMzgjpDC", "reason": "Requested by Customer", "fees": { "fx_fees": {}, "txn_fees": {} }, "balance_used": { "currency": "USD", "amount": 1000 }, "documents": [ {} ], "status": "success", "currency": "USD", "amount": 1000, "utr": "UTR123456789", "partial_refund": false, "created_at": "2021-06-01T12:00:00Z", "updated_at": "2021-06-01T12:00:00Z", "request_id": false }