Process payments, handle refunds, and manage payment methods with enterprise-grade security.
curl -X POST https://api.etaildepot.com/v2/payments \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "USD",
"payment_method": {
"type": "card",
"card": {
"number": "4242424242424242",
"exp_month": 12,
"exp_year": 2025,
"cvc": "123"
}
}
}'
/payments
Create a new payment
amount
- Payment amount in centscurrency
- Three-letter currency code (USD, EUR, etc.)payment_method
- Payment method object/payments/{id}
Retrieve a payment by ID
Include your API key in the Authorization header:
Authorization: Bearer your_api_key_here
Keep your API keys secure and never expose them in client-side code.
{
"id": "pay_1234567890",
"object": "payment",
"amount": 10000,
"currency": "USD",
"status": "succeeded",
"payment_method": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242"
}
},
"created": 1640995200
}
{
"error": {
"type": "card_error",
"code": "card_declined",
"message": "Your card was declined.",
"param": "payment_method"
}
}