Skip to main content

Track subscription basic info publicly

POST 

/pub/company/:company_id/pre-subscriptions

The purpose of the pre-subscriptions API call is to address situations where the subscription cannot be directly created by the regular /auth/consumer-user/company/{company_id}/subscriptions call due to certain limitations. This limitation arises when it is not feasible to transmit the registered user information to the normal subscription call (can't authorize user). In such cases, a pre-subscription call is made. This call includes the subscription type, recurring donation amount (for monthly subscriptions), round-up source (for round-up subscriptions), recurring donation percentage (for saving account subscriptions), billing day (if available), payment method (if available), donation currency (if available), charity's id receiving the donation, donation cause (must match with charity available causes), consumer user information (if available: full name, email, phone), billable address, reconcillation id (used to reconcile with subscription, generated by the company). If no 'reconcilation_id' is passed a random one will be generated by cents.

Request

Path Parameters

    company_id stringrequired

    Unique ID of the company in scope.

Body

    subscription_type stringrequired

    Possible values: [monthly, round_up, saving_account]

    The type of the subscription to be created

    recurring_donation_amount integer

    Donation amount (in the smallest currency unit, so 1000 is 10.00€). This field is mandatory if the subscription_type = monthly

    round_up_source_id uuid

    Id of the round up source to be used to calculate round amount. This field is mandatory if the subscription_type = round_up

    recurring_donation_percentage integer

    Donation percentage if available (in integer format, so 3% is 3). This field is mandatory if the subscription_type = saving_account

    billing_day integer

    Default value: today

    Day of the month when perform the billing.

    payment_method_id uuid

    Id of the payment method to be used to pay the donation.

    donation_currency string

    Default value: EUR

    Donation currency

    charity_id uuidrequired

    Cents id of the charity

    donation_cause stringrequired

    Cause unique name (in the namespace of the charity)

    consumer_user_full_name string

    Consumer user name (if we have data of it)

    consumer_user_email email

    Consumer user email (if we have data of it)

    consumer_user_email_anonymized boolean

    Consumer user email anonymized flag (if email is anonymized or not)

    consumer_user_phone string

    Consumer user phone number (if we have data of it)

    billable_address

    object

    street_address stringrequired
    city stringrequired
    region_state stringrequired
    zip_code stringrequired
    country stringrequired
    reconciliation_id string

    External ID (generated by the company) used to reconcilate subscription with the pre-subscription

Responses

successful operation

Schema

    id uuidrequired

    Cents id of the transaction

    company_id uuidrequired

    Cents id of the company

    subscription_type stringrequired

    Possible values: [monthly, round_up, saving_account]

    The type of the subscription

    recurring_donation_amount integerrequired

    Donation amount (in the smallest currency unit, so 1000 is 10.00€).

    round_up_source_id uuidrequired

    Id of the round up source to be used to calculate round amount.

    recurring_donation_percentage integerrequired

    Donation percentage if available (in integer format, so 3% is 3).

    billing_day integerrequired

    Default value: today

    Day of the month when perform the billing.

    next_billing_date date

    Date of the next billing.

    payment_method_id uuidrequired

    Id of the payment method to be used to pay the donation.

    donation_currency stringrequired

    Donation currency

    charity_id uuidrequired

    Cents id of the charity

    donation_cause stringrequired

    Cause unique name (in the namespace of the charity)

    created_date daterequired

    Subscription created date

    updated_date daterequired

    Subscription updated date

    consumer_user_id stringrequired

    Cents id of consumer user (if we have data of it)

    consumer_user_full_name stringrequired

    Consumer user full name (if we have data of it)

    consumer_user_email emailrequired

    Consumer user email (if we have data of it)

    consumer_user_email_anonymized boolean

    Consumer user email anonymized flag (if email is anonymized or not)

    consumer_user_phone stringrequired

    Consumer user phone number (if we have data of it)

    billable_address

    object

    required

    street_address stringrequired
    city stringrequired
    region_state stringrequired
    zip_code stringrequired
    country stringrequired
    subscription_status stringrequired

    Possible values: [pre_subscription, draft, active, inactive, failed]

    Subscription status

    reconciliation_id stringrequired

    External ID (generated by the company) used to reconcilate transaction with the pre_transaction

Loading...