Reverse a store credit ledger row
POST
/api/subscriptions/credits/transactions/{id}/reverse
const url = 'https://api.usegro.co/api/subscriptions/credits/transactions/example/reverse';const options = { method: 'POST', headers: { Authorization: 'Bearer <token>', 'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json' }, body: '{"note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.usegro.co/api/subscriptions/credits/transactions/example/reverse \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "note": "example" }'Adds a reversal row that moves the same amount back. Nothing is deleted. A row can only be reversed once, and credit spent on an order or a reversal cannot be reversed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
note
required
Why it is being reversed
string
Example generated
{ "note": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
data
object
data
required
object
id
required
string
created_at
string
type
required
string
currency_code
required
string
profile_id
required
string
profile
object
id
string
email
string
full_name
string
is_reversed
required
boolean
amount
required
number
balance_after
required
number
source
required
string
note
string
subscription_id
string
referral_id
string
earning_rule_id
string
shopify_order_id
string
reverses_transaction_id
string
actor_type
required
string
actor_name
string
subscription
object
number
string
id
string
order
object
number
number
id
string
Example
{ "data": { "data": { "type": "earned", "source": "referral", "reason": "goodwill", "actor_type": "user" } }}Already reversed, or not reversible
Media typeapplication/json