Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Issues a full or partial refund for a specific Stripe charge.

URL Parameters

community_id
integer
required
The ID of the community
id
integer
required
The ID of the community membership

Request Body

charge_id
string
required
Stripe charge ID to refund (e.g., “ch_1234567890”)
amount_cents
integer
Amount to refund in cents (optional, defaults to full charge amount)
reason
string
Refund reason: duplicate, fraudulent, or requested_by_customer (default)

Returns

Returns a success message.
curl -X POST https://api.onlydrams.app/odis/v1/communities/1/members/50/refund_charge \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "charge_id": "ch_1234567890",
       "amount_cents": 500,
       "reason": "requested_by_customer"
     }'
{
  "message": "Refund issued successfully"
}

Error Responses

{
  "message": "Charge ID is required"
}
{
  "message": "Charge does not belong to this member"
}
{
  "message": "Charge has already been fully refunded"
}
{
  "message": "Charge has not been paid"
}

Notes

  • Authorization: Community owner or admin only
  • Charge Validation: System verifies charge belongs to this member
  • Partial Refunds: Can refund less than the full charge amount
  • Multiple Partial Refunds: Can issue multiple partial refunds up to charge total
  • Metadata: Refund details are stored in member metadata
  • Stripe: Refund is processed through Stripe