POST
/
api
/
v0
/
test-payment
Process a test payment
curl --request POST \
  --url https://api.devdraft.ai/api/v0/test-payment \
  --header 'Content-Type: application/json' \
  --header 'idempotency-key: <idempotency-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "amount": 100.5,
  "currency": "USD",
  "description": "Test payment for API",
  "customerId": "cus_12345"
}'
{
  "id": "pay_12345abcdef",
  "amount": 100.5,
  "currency": "USD",
  "status": "succeeded",
  "timestamp": "2023-07-01T12:00:00.000Z"
}

Authorizations

x-client-secret
string
header
required

Your secret API key. Keep this secure and never expose it in client-side code.

Headers

idempotency-key
string<uuid>
required

Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.

Example:

"payment_123456_unique_key"

Body

application/json

Response

201
application/json

Payment processed successfully

The response is of type object.