Skip to main content

Create a transaction

POST 

/auth/payment-gateway/transactions

This API call is a standard authenticated transaction request that should be made after the payment for donations has been processed. It is essential to include the donation amount in this call to enable Cents to monitor and provide analytics for the donations and each company platform. If certain fields were previously provided in a pre-transaction call, you can omit those fields in this context. However, when excluding those fields, it is crucial to include the 'reconciliation_id' with the same value as it was in the pre-transaction call. If the 'reconciliation_id' is not provided, all the data that was not sent during the pre-transaction call must be included here. The primary purpose of the 'reconciliation_id' is to merge the pre-transaction data with the transaction data, ensuring a seamless integration and accurate record-keeping.

Request

Body

    external_id string

    Payment gateway id

    company_website url

    url of the company

    company_id uuid

    id of the company

    payment_gateway_company_id uuid

    Payment gateway internal id of the company (even if we do not have data of it)

    company_sector string

    sector of the company

    payment_gateway_order_transaction_id string

    Payment Gateway Order Transaction ID, the Identifier for the Initial (order) Transaction in the Process Flow.

    order_amount integer

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

    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)

    total_amount integer

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

    currency string

    Transaction currency

    donation_currency stringrequired

    Donation currency

    charity_id uuid

    Cents id of the charity

    donation_cause string

    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_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
    transaction_status string

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

    Transaction status

    refunded_amount integer

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

    reconciliation_id string

    External ID (generated by the payment gateway) 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 (if we have data of it)

    payment_gateway_company_id uuid

    Payment gateway internal id of the company (even if we do not have data of it)

    company_sector string

    sector of the company

    payment_gateway_id uuidrequired

    Cents id of the payment gateway

    payment_gateway_order_transaction_id string

    Payment Gateway Order Transaction ID, the Identifier for the Initial (order) Transaction in the Process Flow.

    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 floatrequired

    Donation amount

    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_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
    transaction_status stringrequired

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

    Transaction status

    hmac string

    hash of transaction

    refunded_amount floatrequired

    Refunded amount

    reconciliation_id stringrequired

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

Loading...