package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]interface{}{
"firstName": "Tunde",
"lastName": "Bakare",
"email": "tunde@example.com",
"fiatAmount": 75000,
"fiatCurrency": "NGN",
"accountNumber": "0123456789",
"bankCode": "058",
"reference": "880e8400-e29b-41d4-a716-446655440003",
})
req, _ := http.NewRequest("POST", "https://ramp-api.ivorypay.io/api/v1/sell", bytes.NewBuffer(body))
req.Header.Set("x-api-key", "your_api_key")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}