Skip to main content

Track company transaction basic info publicly

POST 

/pub/company/:company_id/pre-transactions

The purpose of the pre-transactions API call is to address situations where the cause selection cannot be directly passed to the regular /auth/transactions call due to certain limitations in the front-end. This limitation arises when it is not feasible to transmit the cause selection information to the normal transaction call, which typically occurs after the payment for a donation has been processed. In such cases, when a cause is selected in the front end and the transmission of selection information is hindered, a pre-transaction call is made. This call includes the cause selection, consumer user information (if available), and the reconciliation ID, which is generated by the company. The pre-transaction call serves as a means to handle the cause selection and associated information when passing them to the subsequent steps becomes impractical due to front-end constraints. If no 'reconcilation_id' is passed a random one will be generated by cents.

Request

Path Parameters

    company_id uuidrequired

    Unique ID of the company in scope.

Body

    order_amount integer

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

    donation_amount integer

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

    donation_percentage integer

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

    total_amount integer

    Total (transaction+donation) amount (in the smallest currency unit, so 1000 is 10.00€)

    currency string

    Transaction currency

    donation_currency string

    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
    payment_method uuid

    Payment method id to be used for this transactions. This field is needed only in the scenarios where there are multiple payment options available and the payment method to be used has to be stored in cents.

    reconciliation_id string

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

Responses

successful operation

Schema

    id uuidrequired

    cents id of the transaction

    external_id stringrequired

    Payment gateway id, the payment gateway unique name identifier is put at the begining of the string (this is inserted by cents according to the logged user)

    company_id uuidrequired

    Cents id of the company

    order_amount floatrequired

    Transaction amount

    total_amount floatrequired

    Transaction amount

    currency stringrequired

    Transaction currency

    charity_id uuidrequired

    Cents id of the charity

    donation_cause stringrequired

    Cause unique name (in the namespace of the charity)

    donation_amount integerrequired

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

    donation_percentage integer

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

    donation_currency stringrequired

    Donation currency

    created_date daterequired

    Transaction created date

    updated_date daterequired

    Transaction updated date

    consumer_user_id stringrequired

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

    consumer_user_full_name stringrequired

    Consumer user 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
    payment_method uuid

    Payment method id used for this transactions.

    transaction_status stringrequired

    Possible values: [pre_transaction, draft, to_be_payed, paid, refunded, disputed, failed]

    Transaction status

    refunded_amount floatrequired

    Refunded amount

    reconciliation_id stringrequired

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

Loading...