Create a transaction
POST/auth/company/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
- application/json
Body
required
- TransactionInput
- MOD2
Array [
]
oneOf
Payment gateway id
Transaction amount (in the smallest currency unit, so 1000 is 10.00€)
Donation amount (in the smallest currency unit, so 1000 is 10.00€)
Donation percentage if available (in integer format, so 3% is 3)
Total (transaction+donation) amount (in the smallest currency unit, so 1000 is 10.00€)
Transaction currency
Donation currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Cents id of consumer user (if we have data of it)
Consumer user name (if we have data of it)
Consumer user email (if we have data of it)
Consumer user phone number (if we have data of it)
Consumer user email anonymized flag (if email is anonymized or not)
billable_address
object
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.
Possible values: [draft, to_be_payed, paid, refunded, disputed, failed]
Transaction status
Refunded amount (in the smallest currency unit, so 1000 is 10.00€)
External ID (generated by the company) used to reconcilate transaction with the pre_transaction
Payment gateway id
Transaction amount (in the smallest currency unit, so 1000 is 10.00€)
Donation amount (in the smallest currency unit, so 1000 is 10.00€)
Donation percentage if available (in integer format, so 3% is 3)
Total (transaction+donation) amount (in the smallest currency unit, so 1000 is 10.00€)
Transaction currency
Donation currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Cents id of consumer user (if we have data of it)
Consumer user name (if we have data of it)
Consumer user email (if we have data of it)
Consumer user phone number (if we have data of it)
Consumer user email anonymized flag (if email is anonymized or not)
billable_address
object
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.
Possible values: [draft, to_be_payed, paid, refunded, disputed, failed]
Transaction status
Refunded amount (in the smallest currency unit, so 1000 is 10.00€)
External ID (generated by the company) used to reconcilate transaction with the pre_transaction
Responses
- 201
- 401
- 402
- 422
successful operation
- application/json
- Schema
- Example (from schema)
Schema
- Transaction
- MOD2
Array [
]
oneOf
cents id of the transaction
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)
Cents id of the company
Transaction amount
Transaction amount
Transaction currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Donation amount (in the smallest currency unit, so 1000 is 10.00€)
Donation percentage if available (in integer format, so 3% is 3)
Donation currency
Transaction created date
Transaction updated date
Cents id of consumer user (if we have data of it)
Consumer user 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
Payment method id used for this transactions.
Possible values: [pre_transaction, draft, to_be_payed, paid, refunded, disputed, failed]
Transaction status
Refunded amount
External ID (generated by the company) used to reconcilate transaction with the pre_transaction
cents id of the transaction
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)
Cents id of the company
Transaction amount
Transaction amount
Transaction currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Donation amount (in the smallest currency unit, so 1000 is 10.00€)
Donation percentage if available (in integer format, so 3% is 3)
Donation currency
Transaction created date
Transaction updated date
Cents id of consumer user (if we have data of it)
Consumer user 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
Payment method id used for this transactions.
Possible values: [pre_transaction, draft, to_be_payed, paid, refunded, disputed, failed]
Transaction status
Refunded amount
External ID (generated by the company) used to reconcilate transaction with the pre_transaction
{}
Unauthorized
Payment Required
Invalid input