TransfadoDashboard →

API Reference

Charge cards, manage subscriptions, and create payment links over a simple REST API. All amounts are integer cents. Authenticate with your secret key as a Bearer token.

Authentication

Send your secret key (find it under Developers) in the Authorization header.

Authorization: Bearer sk_sandbox_xxx

Publishable keys (pk_…) may only make GET requests. Secret keys can move money — keep them private.

Charges

POST/v1/charges
amountInteger, cents. Minimum 50.
currencyDefaults to usd.
descriptionOptional text.
customer_emailOptional receipt email.
cardObject: number, exp_month, exp_year, cvc.
curl http://localhost:4242/v1/charges \
  -H "Authorization: Bearer sk_sandbox_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 2500,
    "description": "Order #1234",
    "customer_email": "buyer@example.com",
    "card": { "number": "4242424242424242", "exp_month": 12, "exp_year": 2030, "cvc": "123" }
  }'
GET/v1/charges  ·  GET/v1/charges/:id

List charges or retrieve one. Each charge includes a fees breakdown (merchant fee, processor cost, platform margin, net).

Refunds

POST/v1/refunds
chargeThe charge id to refund.
amountOptional partial amount in cents. Omit for a full refund.

Subscriptions

POST/v1/subscriptions
amountPer-cycle amount in cents.
intervalweek, month, or year.
product_nameName shown to the customer.
cardCard object (first cycle is charged immediately).
curl http://localhost:4242/v1/subscriptions \
  -H "Authorization: Bearer sk_sandbox_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 2900, "interval": "month", "product_name": "Gold Plan",
        "card": { "number":"4242424242424242","exp_month":12,"exp_year":2030,"cvc":"123" } }'
POST/v1/subscriptions/:id/cancel

Payment Links

POST/v1/payment_links
nameLink title.
modepayment (one-time) or subscription.
amountCents (omit with allow_custom_amount).
intervalFor subscription mode.

Returns a url you can share. Customers pay on a hosted checkout page.

Balance & Account

GET/v1/balance  ·  GET/v1/account

Test cards

4242 4242 4242 4242Visa — approves
5555 5555 5555 4444Mastercard — approves
3782 822463 10005Amex — approves
4000 0000 0000 0002Declined (generic)
4000 0000 0000 9995Declined (insufficient funds)

Use any future expiry and any 3-digit CVC (4 for Amex).