Skip to content

Create a charge.

POST
/v1/charges
curl --request POST \
--url https://api.ridleypay.com/v1/charges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "token": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "recurring_reference": "SUB-001", "payment_reference": "ORDER-001", "amount": 45, "currency": "JMD", "reference": "RIDE-0047", "description": "Trip from Kingston to Montego Bay", "metadata": { "driver_id": 12, "trip_id": "T-0047" }, "apply_tax": true, "customer_email": "jane@example.com", "customer_name": "Jane Doe" }'

Charges a saved payment method immediately without customer redirect. Identify the card on file with recurring_reference (the schedule’s current card) or payment_reference (a payment made with save_payment_method: true). Ridley looks up the saved card, so your system never handles card tokens. The legacy token parameter is still accepted.

Media typeapplication/json
object
token

Legacy: a provider transaction token from a prior payment.

string
nullable
Example
f47ac10b-58cc-4372-a567-0e02b2c3d479
recurring_reference

Charge the card on file of this recurring schedule. The payment is linked to the schedule.

string
nullable
Example
SUB-001
payment_reference

Charge the card saved by this payment.

string
nullable
Example
ORDER-001
amount
required

The charge amount.

number
Example
45
currency

The ISO 4217 currency code. Defaults to the source’s default currency.

string
nullable
Example
JMD
reference
required

A unique reference for this charge.

string
Example
RIDE-0047
description

An optional description.

string
nullable
Example
Trip from Kingston to Montego Bay
metadata

Optional metadata to attach to the payment.

object
Example
{
"driver_id": 12,
"trip_id": "T-0047"
}
apply_tax

Calculate tax from your team tax settings. Exclusive tax is added to amount; inclusive tax is extracted from it.

boolean
nullable
Example
true
customer_email

Customer email for the payment record.

string
nullable
Example
jane@example.com
customer_name

Customer name for the payment record.

string
nullable
Example
Jane Doe

Charge succeeded

Media typeapplication/json
object
data
object
id
integer
type
string
attributes
object
reference
string
amount
string
currency
string
status
string
provider_transaction_id
string
card_brand
string
nullable
card_last
string
nullable
metadata
object
driver_id
integer
created_at
string
Example
{
"data": {
"id": 1,
"type": "charges",
"attributes": {
"reference": "RIDE-0047",
"amount": "45.00",
"currency": "JMD",
"status": "PAID",
"provider_transaction_id": "txn_new_123",
"card_brand": null,
"card_last": null,
"metadata": {
"driver_id": 12
},
"created_at": "2026-06-18T21:00:00+00:00"
}
}
}
Media typeapplication/json
One of:

Validation error

object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "422",
"title": "Unprocessable Entity",
"detail": "The token field is required."
}
]
}