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
POST https://tryeuler.bubbleapps.io/api/1.1/wf/charges
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 cents. For example, pass |
| 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
amount
field must be passed in cents. For instance, for $1.00, you would pass100
. This method ensures precision in monetary transactions.The
currency
field 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
chargeDate
field 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.