(Orders)
- CreateOrder - Create Order
Use this API to create orders with Cashfree from your backend and get the payment link. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information email us at "care@cashfree.com".
package main
import(
"github.com/speakeasy-sdks/suhastest"
"context"
"github.com/speakeasy-sdks/suhastest/pkg/models/operations"
"log"
)
func main() {
s := suhastest.New()
ctx := context.Background()
res, err := s.Orders.CreateOrder(ctx, operations.CreateOrderRequest{
XClientID: "<value>",
XClientSecret: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.OrdersEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateOrderRequest | ✔️ | The request object to use for the request. |
*operations.CreateOrderResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.AuthenticationError | 401 | application/json |
sdkerrors.RateLimitError | 429 | application/json |
sdkerrors.APIError | 500 | application/json |
sdkerrors.SDKError | 4xx-5xx | / |