Stripe Payments
If you’re using Stripe, you can simply install the RevGems App into your Stripe Account as described in the Setup Guide. Once you’ve done so, charges processed by Stripe will appear in your Message Log with typepayment.
Other Payment Processors
You can track payments from all other platforms (PayPal, Chargebee, etc) by sending apayment message to the Tracking API. To do this you’ll need your Push Key Secret from your RevGems dashboard. When you make payment requests to the Tracking API, the payments will appear in your Message Log with type payment.
- API Endpoint:
https://t.revgems.com/messages - Method:
POST
Request Headers
Requests made to this endpoint must have the following request headers.Your Push Key Secret provided as a Bearer token.
See Authentication for details.
Must be
application/jsonRequired Parameters
Requests made to this endpoint must have the following parameters in the JSON request body.An arbitrary string identifier that functions as an idempotency key.
Used to prevent the same message from being inadvertantly processed multiple times. We recommend using the payments unique ID in your own database or external payment process for this value.Example: Imagine a scenario where your payments are sent to RevGems on a background job. If the API request succeeds but the job fails for another reason, the job may be automatically retried in your system — possibly many times. As long as the same
message_id is sent, RevGems will only track the payment once, regardless of how many times the request is sent.The Account ID in your system that the payment is associated with. This must be the same ID you pass when tracking accounts.
Must be the literal value
“payment”.Amount collected by this payment. Must be a positive integer representing the amount in the smallest currency unit (e.g., 100 cents to charge $1.00 USD).
For example, if the payment amount is $245.99, pass
24599.The ISO 4217 currency code in which
amount_cents is denominated (USD, EUR, etc).Optional Parameters
The following parameters may optionally be in the JSON request body.The ID of the payment in your own database or external payment processor.
A short description of the payment.
Example Request
Here’s an example of a complete request using cURL:Example Responses
201 Created
401 Unauthorized
422 Unprocessable Content