Skip to main content

Create a new payment session/transaction


POST

 /api/v1/payment_session/{gid}

Fynd Platform will call this API to initiate/create payment session/transaction. Extension will need to validate checksum_auth in headers before proceeding with the request.
Request Parameters
gid
string
Global identifier for the transaction. This is generated by Fynd payments platform and is unique for each transaction
Request body
amount
integer
Transaction value in the smallest unit of the currency (paise/cents)
app_id
string
Application id of sales channel
billing_address
object (AddressDetail)
Optional
AddressDetail
cancel_url
string
A URL provided by the Fynd platform for redirection in case of payment failure
cod_eligibility
boolean
Indicates whether Cash on Delivery is available for the transaction - To be used only by Payment Gateways which support Cash on Delivery
company_id
string
Unique identifier for the company
currency
string
Currency of the payment
customer_contact
string
Customer's mobile number
customer_email
string
Customer's email
customer_name
string
Customer's name
fynd_platform_id
string
Unique Order Id for which payment was made
g_user_id
string
A unique global user Id, created by the Fynd platform
gid
string
Global identifier of the transaction against which payment_session was initiated. This is generated by Fynd payments platform and is unique for each transaction
initiated_at
integer
Timestamp marking when the payment was initiated, in epoch time
journey_type
string
Enum
kind
string
Optional
Kind of transaction: either a one-time payment (sale) or a subscription, with the default set to sale
Default Value : sale
Enum
locale
string
Optional
User's language locale
Default Value : en
merchant_locale
string
Optional
Merchant's language locale
Default Value : en
meta
object
Optional
Additional metadata associated with the payment session
mode
string
Enum
payment_methods
array of object (PaymentMethod)
method of payment
Array of PaymentMethod
shipping_address
object (AddressDetail)
Optional
AddressDetail
success_url
string
URL provided by the Fynd platform for redirection upon successful payment completion
Example request
{
"customer_name": "Customer Name",
"customer_email": "[email protected]",
"app_id": "000000000000000000000001",
"company_id": "1",
"customer_contact": "8888888888",
"gid": "TR662637B30D570001",
"fynd_platform_id": "FY662A607D0EC6524BEA",
"g_user_id": "65fc3a26b7e85bd44752641a",
"amount": 100000,
"currency": "INR",
"merchant_locale": "en",
"locale": "en",
"mode": "live",
"journey_type": "forward",
"payment_methods": [
{
"code": "TABBY",
"name": "TABBY",
"sub_payment_mode": []
}
],
"success_url": "https://fynd.com/cart/order-status?success=true&status=complete&order_id=FY662A607D0EC6524BEA&aggregator_name=Tabby&cart_id=662a5d614d4cd74ae13afe36",
"cancel_url": "https://fynd.com/cart/order-status?success=false&status=failed&order_id=FY662A607D0EC6524BEA&aggregator_name=JioOnePay&cart_id=662a5d614d4cd74ae13afe36",
"billing_address": {
"area": "Bengalur",
"city": "Bangalore",
"name": "Customer name",
"email": "[email protected]",
"phone": "8888888888",
"state": "Karnataka",
"address": "Bengalur",
"country": "India",
"pincode": "560077",
"landmark": "Bengalur",
"area_code": "560077",
"pos_state": "Karnataka",
"address_id": 3535,
"address_type": "home",
"area_code_slug": "560077",
"country_iso_code": "IN",
"country_phone_code": "+91",
"g_address_id": "None"
},
"shipping_address": {
"area": "Bengalur",
"city": "Bangalore",
"name": "Customer name",
"email": "[email protected]",
"phone": "8888888888",
"state": "Karnataka",
"address": "Bengalur",
"country": "India",
"pincode": "560077",
"landmark": "Bengalur",
"area_code": "560077",
"pos_state": "Karnataka",
"address_id": 3535,
"address_type": "home",
"area_code_slug": "560077",
"country_iso_code": "IN",
"country_phone_code": "+91",
"g_address_id": "None"
},
"kind": "sale",
"initiated_at": 1714053246,
"cod_eligibility": true,
"meta": {}
}
Response schema
200
400
Success
PaymentSessionResponse
gid
string
Global identifier for the transaction. This is generated by Fynd payments platform and is unique for each transaction
redirect_url
string
URL for redirection once the order has been successfully created with the payment gateway
success
boolean
API response status
Example Response
{
"gid": "TR64D4E4250DB0CBEF1D",
"redirect_url": "https://pg-url.com/payments/payment_id_001",
"success": false
}

Was this section helpful?