Skip to Content
AccountingAccounts ReceivableRefunds

Apply Transaction to a Refund

POST
/v0/business/{business_id}/refund-payment

Manually apply an existing transaction as payment of a refund.

Scopes: invoice:create

Authorization

OAuth2ClientCredentialsBearer invoice:create
headerAuthorizationBearer <token>

Scope: invoice:create

Path Parameters

business_id*Business Id

The id of the business

Formatbiz_string

Header Parameters

x-user-id?|

Optional external entity identifier that performed the action

Request Body

application/json
  1. body
refund_id*Refund Id

The ID of the refund to apply payment to

Formatrfu_string
transaction_id*Transaction Id

The ID of the transaction to apply as payment

Formattxn_string
payment_amount?||

The amount to apply as payment. Defaults to the transaction amount.

Response Body

Successful Response

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/refund-payment' \  -H 'Content-Type: application/json' \  -d '{  "refund_id": "rfu_Lq5AyApd4pdL1VvakpY5aJ",  "transaction_id": "txn_oiL7THC5RDi2PVUbVyyoJ"}'
Example Response
{  "data": {    "business_id": "biz_Pk2fNFDd8wj7EFeLWJywc7",    "external_id": "string",    "amount": 0,    "amount_paid": 0,    "currency": "USD",    "memo": "string",    "processor": "string",    "method": "cash",    "is_return": false,    "refunded_at": "2019-08-24T14:15:22Z",    "status": "pending",    "id": "rfu_WQMDNUHpBThYSNh4AprDBo",    "payments": [      {        "amount": 0,        "id": "rfp_WQMDNUHpBThYSNh4AprDBo",        "transaction_id": "txn_WQMDNUHpBThYSNh4AprDBo"      }    ],    "refund_invoices": [      {        "external_id": "string",        "amount": 0,        "memo": "string",        "id": "rfi_WQMDNUHpBThYSNh4AprDBo",        "invoice_id": "inv_WQMDNUHpBThYSNh4AprDBo",        "invoice_line_id": "inl_WQMDNUHpBThYSNh4AprDBo"      }    ],    "tags": {      "Job": [        {          "amount": "60.00",          "value": "Maple Street Remodel"        },        {          "amount": "40.00",          "value": "Downtown Office Rewire"        }      ]    }  }}