syntax = "v1"

info (
	title: "支付模块"
	desc: "支付相关"
	author: ""
	email: ""
)

import "basic.api"

service pay {

	@handler OrderRefundHandler
	post /api/pay/refund(OrderRefundReq) returns (response);

	@handler StripeWebhookHandler
	post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);

}

// 退款
type (
	OrderRefundReq struct{}
	OrderRefundRes struct{}
)

// StripeWebhook支付通知
type (
	StripeWebhookReq {
		Payload         []byte `json:"base_byte_slice,optional"`
		StripeSignature string `json:"Stripe-Signature"`
		RemoteAddr      string `json:"remote_addr"`
	}
)