Skip to content

Refund

This resource represents a refund transaction from your Glomo account to your customer. You can retrieve it to see the details of the refund transaction.

Create refund for a payment

Request

Creates refund for a payment entity if the payment is in success state and no other refund exists.

Security
JWT
Bodyapplication/jsonrequired
reasonstringrequired

The reason for the refund.

Enum:"Requested By Customer""Duplicate""Fradulent""Others"
payment_idstringrequired

The unique identifier of payment linked to refund.

Example:"payt_E602dMzgjpDC"
document_idstring

The id of document that is uploaded for refund.

Example:"doc_E602dMd2adDC"
document_urlstring

The url of document that is uploaded for refund.

Example:"https://www.example.com/documents/invoice.pdf"
file_namestring

The name of document that is uploaded for refund.

Example:"invoice"
amountinteger

The amount to refund in cents. Required for partial refunds. If not provided, the full payment amount will be refunded. For example, 1000 cents is $10.00. The currency is determined by the payment's currency.

Example:1000
request_idstring

Optional idempotency key.

Example:"unique_refund_request_id_123"
POST
/refunds
curl -i -X POST \
  https://api.glomopay.com/api/v1/refunds \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "Requested By Customer",
    "payment_id": "payt_E602dMzgjpDC",
    "document_id": "doc_E602dMd2adDC",
    "document_url": "https://www.example.com/documents/invoice.pdf",
    "file_name": "invoice",
    "amount": 1000,
    "request_id": "unique_refund_request_id_123"
  }'

Responses

Refund created 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 }