Overview
The Charges API allows clients to proactively send billing-related data associated with specific deals in the CRM system. This enables the accurate association of charges to the correct partners and deals, ensuring efficient billing processes.
Endpoint
URL
Method
POST
Request Format
To submit a charge, provide a JSON payload with the following fields:
{
"amount": 100,
"currency": "usd",
"chargeDate": "Sep 17, 2024, 7:29:38 PM",
"dealId": "abc123",
"transactionId": "1234324"
}
Fields
Field | Type | Required | Description |
| Number | Yes | The amount of the charge, expressed in currency smallest unit. For example, enter 100 for a charge of $1.00. |
| Number | No | This field is currency minor unit. If you are using multi-currency in EULER and want to provide your own currency conversion rate for the charge, you may pass the amount in the company currency. For example, for a charge of 100 EUR with an FX rate of 1.2, you would pass a value of 12000 |
| Date | No | If you set the amount in your company currency, you can include the date your FX rate took effect on the field fxDate |
| Number | No | The commission to be paid, expressed in currency smallest unit; for example, enter 100 for a $1.00 commission. |
| String | Yes | The currency code for the charge, using three-letter ISO codes (e.g., |
| Date | Yes | The date and time of the charge. Acceptable formats include ISO 8601 (e.g., |
| String | Yes | The unique identifier for the CRM deal. This ensures the charge is associated with the correct deal and partner. |
| String | Yes | A unique identifier for the transaction. This field is required to track the transaction effectively. |
Example Success Response
{
"status": "success",
"response": {
"id": "1729193599031x633853775301859200"
}
}
Example Error Response
{
"status": "success",
"response": {
"error": "The deal id abc12 was not found. Please review and use a valid deal id. If you continue encountering an error, please reach out to support for help: [email protected]"
}
}
Validation Notes
The
amountfield must be passed in cents. For instance, for $1.00, you would pass100. This method ensures precision in monetary transactions.The
currencyfield is validated against the list of ISO 4217 currency codes. Acceptable values include standard codes likeusd(United States Dollar),eur(Euro), andgbp(British Pound). Any unsupported currency codes will result in a validation error.The
chargeDatefield accepts multiple formats for flexibility, including ISO 8601, UTC Date-Time, and simple date format. It must comply with one of these accepted formats.
By following these guidelines, you ensure that charge data is processed accurately and linked to the appropriate CRM deal.
