This endpoint processes payments through various payment methods and gateways. It supports credit cards, ACH, wire transfers, and digital wallets.
Authentication
This endpoint requires a valid API key with payments:write
permissions.
Authorization: Bearer YOUR_API_KEY
Request Body
Payment amount in cents (e.g., 1000 for $10.00)
ISO 4217 currency code (e.g., “USD”, “EUR”)
Payment method detailsShow Payment method properties
Payment type: “card”, “ach”, “wire”, “paypal”, “crypto”
Credit/debit card details (for type: “card”)
Card number (will be tokenized)
Expiration year (4 digits)
Pre-tokenized card token (alternative to raw card data)
ACH bank transfer details (for type: “ach”)
Account type: “checking” or “savings”
Customer ID making the payment
Text to appear on customer’s statement (max 22 chars)
Whether to immediately capture the payment (default: true)
Billing address for verification
ISO 3166-1 alpha-2 country code
Response
Returns the created payment with processing status.
curl --location --request POST 'https://api.stateset.com/v1/payments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"amount": 15000,
"currency": "USD",
"payment_method": {
"type": "card",
"card": {
"token": "tok_1234567890abcdef"
}
},
"order_id": "order_123456",
"customer_id": "cust_abc123",
"description": "Payment for Order #123456",
"capture": true
}'
{
"id": "pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "payment",
"amount": 15000,
"currency": "USD",
"status": "succeeded",
"captured": true,
"created_at": "2024-01-19T15:30:00Z",
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "Xt5EWLLDS7FJjR1c"
}
},
"order_id": "order_123456",
"customer_id": "cust_abc123",
"description": "Payment for Order #123456",
"receipt_url": "https://receipts.stateset.com/pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"processor_response": {
"approved": true,
"authorization_code": "123456",
"avs_result": "Y",
"cvv_result": "M",
"network_transaction_id": "123456789"
}
}