Get all consumer user subscriptions, or create one
GET/auth/company/consumer-users/:consumer_user_id/subscriptions
Request
Path Parameters
Unique ID of the consumer user in scope.
Query Parameters
Start key in base64 encoded json, key of the first item of the page. Put here the key received in last_key.
Possible values: <= 100
Default value: 20
Number of items per page
Responses
- 200
- 401
successful operation
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object[]
Cents id of the transaction
Cents id of the company
Possible values: [monthly, round_up, saving_account]
The type of the subscription
Donation amount (in the smallest currency unit, so 1000 is 10.00€).
Id of the round up source to be used to calculate round amount.
Donation percentage if available (in integer format, so 3% is 3).
Default value: today
Day of the month when perform the billing.
Date of the next billing.
Id of the payment method to be used to pay the donation.
Donation currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Subscription created date
Subscription updated date
Cents id of consumer user (if we have data of it)
Consumer user full name (if we have data of it)
Consumer user email (if we have data of it)
Consumer user email anonymized flag (if email is anonymized or not)
Consumer user phone number (if we have data of it)
billable_address
object
required
Possible values: [pre_subscription, draft, active, inactive, failed]
Subscription status
External ID (generated by the company) used to reconcilate transaction with the pre_transaction
the key is used to fetch the subsequent page (to be passed to start_key parameter). If it's empty, no further data is available
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"subscription_type": "monthly",
"recurring_donation_amount": 250,
"round_up_source_id": "1f88b345-e78a-460d-a268-37291a799f71",
"recurring_donation_percentage": 3,
"billing_day": 3,
"next_billing_date": "2023-05-13",
"payment_method_id": "220cd606-55ff-4d66-8531-4d6ac15e8240",
"donation_currency": "EUR",
"charity_id": "123e4567-e89b-12d3-a456-426614174000",
"donation_cause": "cause1",
"created_date": "2023-05-13",
"updated_date": "2023-05-17",
"consumer_user_id": "3f33b5e7-a94b-4f86-92e5-b1f7c1a7c68b",
"consumer_user_full_name": "John Doe",
"consumer_user_email": "john@email.com",
"consumer_user_email_anonymized": false,
"consumer_user_phone": 393334445555,
"billable_address": {
"street_address": "via Roma 5",
"city": "Milan",
"region_state": "Lombardia",
"zip_code": "20100",
"country": "Italy"
},
"subscription_status": "active",
"reconciliation_id": "COMPANY_458732297419738721976"
}
],
"last_key": "string"
}
Unauthorized