Buy credit
Purchase credit for a planter account.
Credit is denominated in EUR and used to fund future tree plantings.
The API user must have can_refill_credit = true.
Authentication
AuthorizationBearer
Bearer token required for all User API endpoints.
Routes are additionally guarded by an active middleware (account must be active).
Request
This endpoint expects an object.
planter_id
ID of the user whose credit balance is topped up.
amount
Credit amount to add (in EUR). If credit_unpaid_limit is set on the API user, cumulative unpaid credit plus this amount must not exceed that limit.
Response
Credit result. Check status field — HTTP 200 is returned even for business-logic errors.
status
payment_id
ID of the created payment record (present on success).
errorCode
errorMessage
Errors
401
Unauthorized Error
403
Forbidden Error