Skip to main content

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 type payment.

Other Payment Processors

You can track payments from all other platforms (PayPal, Chargebee, etc) by sending a payment 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.

Request Headers

Requests made to this endpoint must have the following request headers.
required
Your Push Key Secret provided as a Bearer token. See Authentication for details.
required
Must be application/json

Required Parameters

Requests made to this endpoint must have the following parameters in the JSON request body.
string
required
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.
string
required
The Account ID in your system that the payment is associated with. This must be the same ID you pass when tracking accounts.
string
required
Must be the literal value “payment”.
integer
required
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.
string
required
The ISO 4217 currency code in which amount_cents is denominated (USD, EUR, etc).
Here’s an example request body using only the required parameters:

Optional Parameters

The following parameters may optionally be in the JSON request body.
string
The ID of the payment in your own database or external payment processor.
string
A short description of the payment.
Here’s an example request body using the optional parameters:

Example Request

Here’s an example of a complete request using cURL:

Example Responses

201 Created
401 Unauthorized
422 Unprocessable Content