POST
/
v0
/
business
/
{business_id}
/
refund-payment
Apply an existing transaction as payment of a refund
curl --request POST \
  --url https://api.sandbox.getasset.com/v0/business/{business_id}/refund-payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "refund_id": "rfu_Lq5AyApd4pdL1VvakpY5aJ",
  "transaction_id": "txn_oiL7THC5RDi2PVUbVyyoJ",
  "payment_amount": 1
}'
{
  "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.