-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayments.go
34 lines (30 loc) · 1.23 KB
/
payments.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package flutterwave
// GetPaymentLinkRequest is data needed to create a payment link
type GetPaymentLinkRequest struct {
TransactionReference string `json:"tx_ref"`
Amount string `json:"amount"`
Currency string `json:"currency"`
Meta map[string]interface{} `json:"meta"`
RedirectURL string `json:"redirect_url"`
Customer GetPaymentLinkCustomer `json:"customer"`
Customizations GetPaymentLinkCustomizations `json:"customizations"`
}
// GetPaymentLinkCustomer contains the customer details.
type GetPaymentLinkCustomer struct {
Email string `json:"email"`
Name string `json:"name"`
PhoneNumber string `json:"phonenumber"`
}
// GetPaymentLinkCustomizations contains options to customize the look of the payment modal.
type GetPaymentLinkCustomizations struct {
Title string `json:"title"`
Logo string `json:"logo"`
}
// GetPaymentLinkResponse is the data returned after creating a payment link
type GetPaymentLinkResponse struct {
Status string `json:"status"`
Message string `json:"message"`
Data struct {
Link string `json:"link"`
} `json:"data"`
}