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"
}
}
Process a payment for an order or invoice
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"
}
}
payments:write permissions.
Authorization: Bearer YOUR_API_KEY
Show Payment method properties
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"
}
}