Skip to content

Pay Endpoint

POST
/api/v1/envelopes/{envelope_id}/pay
curl --request POST \
--url https://example.com/api/v1/envelopes/1/pay \
--header 'Content-Type: application/json' \
--data '{ "amount": 1 }'

Pay the envelope. An optional Idempotency-Key header makes a repeated call with the same key (double click, retry after a lost response) a no-op that returns the envelope.

envelope_id
required
Envelope Id
integer
idempotency-key
Any of:
string
>= 1 characters <= 64 characters
Media typeapplication/json
Any of:
EnvelopePay
object
amount
Any of:
number
> 0

Example generated

{
"amount": 1
}

Successful Response

Media typeapplication/json
EnvelopeOut
object
id
required
Id
integer
user_id
required
User Id
integer
name
required
Name
string
target_amount
required
Target Amount
string
due_date
required
Due Date
string format: date
interval_months
required
Any of:
integer
color
required
Any of:
string
archived
required
Archived
boolean
funding_schedule_id
Any of:
integer
effective_schedule
Any of:
EffectiveScheduleOut

The pay schedule an envelope or goal actually uses: its pick, else the user’s default.

object
id
required
Id
integer
name
required
Name
string
is_default
required
Is Default
boolean
funded_amount
Funded Amount
string
default: 0
remaining_amount
Remaining Amount
string
default: 0
suggested_monthly
Suggested Monthly
string
default: 0
paydays_remaining
Any of:
integer
suggested_per_payday
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Example

{
"funded_amount": "0",
"remaining_amount": "0",
"suggested_monthly": "0"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}