POST
/
v0
/
business
/
{business_id}
/
refund
Refund an invoice
curl --request POST \
  --url https://api.sandbox.getasset.com/v0/business/{business_id}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 1,
  "refund_external_id": "<string>",
  "refunded_at": "2023-11-07T05:31:56Z",
  "memo": "<string>",
  "processor": "<string>",
  "method": "cash",
  "is_return": false,
  "refund_credit": false,
  "invoices_to_refund": [
    {
      "invoice_id": "<string>",
      "invoice_external_id": "<string>",
      "invoice_line_id": "<string>",
      "amount": 1,
      "memo": "<string>"
    }
  ]
}'
{
  "data": {
    "business_id": "biz_Pk2fNFDd8wj7EFeLWJywc7",
    "external_id": "<string>",
    "amount": 123,
    "amount_paid": 0,
    "memo": "<string>",
    "processor": "<string>",
    "method": "cash",
    "is_return": false,
    "refund_credit": false,
    "refunded_at": "2023-11-07T05:31:56Z",
    "status": "pending",
    "id": "rfu_WQMDNUHpBThYSNh4AprDBo",
    "payments": [
      {
        "amount": 123,
        "id": "rfp_WQMDNUHpBThYSNh4AprDBo",
        "transaction_id": "txn_WQMDNUHpBThYSNh4AprDBo"
      }
    ],
    "refund_invoices": [
      {
        "external_id": "<string>",
        "amount": 123,
        "memo": "<string>",
        "id": "rfi_WQMDNUHpBThYSNh4AprDBo",
        "invoice_id": "inv_WQMDNUHpBThYSNh4AprDBo",
        "invoice_line_id": "inl_WQMDNUHpBThYSNh4AprDBo"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-user-id
string | null

Optional external entity identifier that performed the action

Path Parameters

business_id
string<biz_string>
required

Body

application/json

Response

201
application/json

Successful Response

The response is of type object.