POST /admin/billing/payment-gateways
Configure a new payment channel (Alipay, WeChat Pay, Stripe, etc.), including gateway name, code and JSON configuration.
Billing Service `bearerAuth` application/json
Request Body
Schema: dto.CreatePaymentGatewayRequest
| Field | Type | Required | Example | Constraints | Description |
code |
string |
Yes |
alipay |
|
|
config |
string |
Yes |
{"app_id":"123456"} |
|
|
name |
string |
Yes |
Alipay |
|
|
Responses
| Status | Description | Schema |
| 201 | Payment gateway created successfully | dto.PaymentGatewayDetailResponse |
| 400 | Invalid request parameters | object |
| 401 | Unauthorized | object |
| 403 | No permission | object |
| 500 | Internal server error | object |
Referenced Schemas
dto.PaymentGatewayDetailResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.PaymentGatewayResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.PaymentGatewayResponse
| Field | Type | Required | Example | Constraints | Description |
code |
string |
No |
alipay |
|
|
config |
string |
No |
|
|
|
created_at |
string |
No |
2026-01-01T00:00:00Z |
|
|
id |
string |
No |
pg_001 |
|
|
name |
string |
No |
Alipay |
|
|
status |
string |
No |
active |
|
|
updated_at |
string |
No |
2026-04-10T14:20:00Z |
|
|