Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 2.92 KB

README.md

File metadata and controls

57 lines (43 loc) · 2.92 KB

Orders

(Orders)

Available Operations

CreateOrder

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".

Example Usage

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
    }
}

Parameters

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.

Response

*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 /