Skip to main content
POST
/
customers
/
charge
/
{customerId}
curl --request POST \
  --url https://testapi.fractalpay.com/api/v1/customers/charge/{customerId} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1,
  "merchant_key": "{{merchant_key}}",
  "order_id": "556465"
}
'
{
  "message": "Payment captured successfully.",
  "result": true,
  "transaction_id": "0e99eb7c-5a45-11ef-af4e-0ef0812e6179"
}

Documentation Index

Fetch the complete documentation index at: https://docs.fractalpay.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your Fractal API credentials.

Username = Client ID Password = Secret Key

Sandbox credentials can be generated from the Test Portal.

Headers

string
Example:

"9ee4a08a-2e34-11ef-af4e-0ef0812e6179"

Path Parameters

customerId
string
required

The customer's unique ID. Returned in the customer_id field of the Create Customer (POST /customers/add) response. To retrieve a list of all customers and their IDs, use the Get Customers (GET /customers) endpoint.

Query Parameters

string
Example:

""

Body

amount
number
required
Example:

1

merchant_key
string
required

The merchant's unique key. Returned in the merchant_key field of the get merchants by client call.

Example:

"{{merchant_key}}"

order_id
string
required
Example:

"5465446"

preAuth
boolean
required
Example:

true

Response

200 - application/json

Charge Customer / Charge Customer PreAuth

data
object
message
string
Example:

"Payment captured successfully."

result
boolean
Example:

true

transaction_id
string
Example:

"0e99eb7c-5a45-11ef-af4e-0ef0812e6179"