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
- application/json
Body
Payment gateway id
url of the company
id of the company
Payment gateway internal id of the company (even if we do not have data of it)
sector of the company
Payment Gateway Order Transaction ID, the Identifier for the Initial (order) Transaction in the Process Flow.
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)
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)
billable_address
object
Possible values: [draft, paid, refunded, disputed, failed]
Transaction status
Refunded amount (in the smallest currency unit, so 1000 is 10.00€)
External ID (generated by the payment gateway) used to reconcilate transaction with the pre_transaction
Responses
- 201
- 401
- 422
successful operation
- application/json
- Schema
- Example (from schema)
Schema
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 (if we have data of it)
Payment gateway internal id of the company (even if we do not have data of it)
sector of the company
Cents id of the payment gateway
Payment Gateway Order Transaction ID, the Identifier for the Initial (order) Transaction in the Process Flow.
Transaction amount
Transaction amount
Transaction currency
Cents id of the charity
Cause unique name (in the namespace of the charity)
Donation amount
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 phone number (if we have data of it)
billable_address
object
required
Possible values: [pre_transaction, draft, paid, refunded, disputed, failed]
Transaction status
hash of transaction
Refunded amount
External ID (generated by the payment gateway) used to reconcilate transaction with the pre_transaction
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"external_id": "NEXI_59782679127678169827",
"company_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"payment_gateway_company_id": "NEXI_681698198741984985",
"company_sector": "Public Sector",
"payment_gateway_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"payment_gateway_order_transaction_id": "NEXI_584846746928468582",
"order_amount": 153.86,
"total_amount": 155.66,
"currency": "EUR",
"charity_id": "123e4567-e89b-12d3-a456-426614174000",
"donation_cause": "cause1",
"donation_amount": 1.8,
"donation_currency": "EUR",
"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_phone": 393334445555,
"billable_address": {
"street_address": "via Roma 5",
"city": "Milan",
"region_state": "Lombardia",
"zip_code": "20100",
"country": "Italy"
},
"transaction_status": "paid",
"hmac": "F2n1XL7yngGdKc9md8nj3qvLrOadGQRIfuJ8d+qYs5M=",
"refunded_amount": 0,
"reconciliation_id": "NEXI_458732297419738721976"
}
Unauthorized
Invalid input