fusenapi/server_api/pay.api
2023-07-28 11:15:42 +08:00

41 lines
931 B
Plaintext

syntax = "v1"
info (
title: 支付模块
desc: 支付相关
author: ""
email: ""
)
import "basic.api"
service pay {
@handler OrderPaymentIntentHandler
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
@handler StripeWebhookHandler
post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
}
// 生成预付款
type (
OrderPaymentIntentReq {
Sn string `form:"sn"` //订单编号
DeliveryMethod int64 `form:"delivery_method"` //发货方式
AddressId int64 `form:"address_id"` //地址id
PayMethod int64 `form:"pay_method"` //支付方式
}
OrderPaymentIntentRes {
RedirectUrl string `json:"redirect_url"`
ClientSecret string `json:"clientSecret"`
}
)
// StripeWebhook支付通知
type (
StripeWebhookReq {
Payload []byte `json:"base_byte_slice,optional"`
StripeSignature string `json:"Stripe-Signature"`
}
)