---
page_source: https://juspay.io/in/docs/payment-method-integrations/express-checkout-api/loyltyrewardz/transaction-flows
page_title: Transaction Flows
---


# Transaction Flows




### Pre-Requisites



> **Note**
> Merchant needs to created order([API Reference](https://docs.juspay.in/ec-api/docs/base-integration/create-order-api#Create-Order-API)) with Juspay before initiating transaction.




## Transaction




### Step 1.1. Transaction API Sequence


* Check for Eligibility of customer and merchant before initiating `LOYLTYREWARDZ` transaction
* Eligibility
  
  * To initiate `LOYLTYREWARDZ` transaction merchant and customer both needs to be eligible.
  * Customer Eligibility
    
    * To verify Customer Eligibility Merchant needs to call cardBin API or ListCard API.
    * If a user has made a Successful Card Transaction earlier on the merchant app, and if they have opted to “Securely save the card for future Payments”(saved card) then merchant can call List Card API.
    * If user has no saved card with merchant then merchant should call CardBin API.
    * List Card API (API Reference)
      
      * If response of List card contain `reward_supported (cards[].reward_supported)` as `True` and `reward_supported_gateway(cards[].reward_supported_gateway)` has `LOYLTYREWARDZ` present then customer is eligible for  `LOYLTYREWARDZ` transaction with that card.
    * CardBin API (API Reference)
      
      * If response of List card contain `reward_supported` as `True` and `reward_supported_gateway` has `LOYLTYREWARDZ` present then customer is eligible for  `LOYLTYREWARDZ` transaction with that card.
  * Merchant Eligibility
    
    * To verify Merchant Eligibility Merchant needs to call MPM API or SPM API.
    * SPM API (API Reference)
      
      * Merchant is eligible If the response of SPM API call contain `paymentMethod(merchantPaymentMethods[].paymentMethod)` as `LOYLTYREWARDZ`.
    * MPM API (API Reference)
      
      * Merchant is eligible If the response of MPM API call contain `payment_method(payment_methods[].payment_method)` as LOYLTYREWARDZ.
* After Eligibility check merchant needs to fetch reward balance for customer. On the basis of reward balance transaction flow will be decided.
* Reward Balance
  
  * To fetch reward balance merchant should call CardsBalance API
  * Card Balance API (API Reference)
    
    * If the response should contain `is_eligible` as `True` and `reward_details` and `balance`.
* If the `balance >= invoice_amount` then merchant should initiate **Reward** Transaction Flow.
* If `balance < invoice_amount` then merchant should initiate **Card+Reward** Transaction Flow.
* Transaction
  
  * Merchant need to create order. Post that merchant will be able to initiate transaction.
  * To initiate Transaction merchant needs to call `/txns` API. Request and response will be based on transaction flow.
  * Reward Transaction (API Reference)
    
    * Merchant should call /txns API with `reward_details` (from Reward Balance in stringify format), `mobile_number` (linked mobile number with card).
    * `LOYLTYREWARDZ` will generate OTP and send it to customer’s mobile_number provided in /txns request.
    * To submit the OTP, merchant can opt for JUSPAY’s OTP page or merchant’s OTP page.
    * If merchant opts for JUSPAY’s OTP page then merchant needs to redirect user to given `url (payment.authentication.url`) from response and it will open submit OTP page and after submission user will be redirected to the merchant’s provided return_url in order create request.
    * If merchant opts for own submit OTP page than merchant needs to call `/authenticate` API with OTP, `challenge_id (payment.authentication.params.challenge_id)` and `txn_uuid`. These values will be present in `/txns` response. After successful response from `/authenticate` API merchant needs to redirect user to respective return  url.
  * Card + Reward Transaction (API Reference)
    
    * Merchant should call /txns API with primary payment instrument(parent transaction) as `Card` and secondary payment instrument(child transaction) as `LOYLTYREWARDZ`.
    * Parent card transaction can be New/Token/Saved Card Transaction below API reference is for new card transaction.
    * Use `additional_payment_details` to pass details of child transaction.
      
      * `additional_payment_details.reward_details` should contain `reward_details` (from Reward Balance in stringify format).
      * `additional_payment_details.split_amount` should contain `balance` (from Reward Balance).
      * `additional_payment_details.mobile_number` should contain link mobile number.
    * Response will contain URL on which merchant needs to redirect User. This URL will process parent transaction and after successful parent transaction it will initiate `LOYLTYREWARDZ` transaction.
    * `LOYLTYREWARDZ` transaction will be direct debit, because customer has been authenticated with successful parent transaction.
    * After `LOYLTYREWARDZ` transaction customer will be redirected to the merchant’s provided return_url in order create request.
* Order Status
  
  * After completion of Transaction, Merchant should call Order status API  to fetch status of transaction.



> **Note**
> * All the API call will needs Authorization Header
> * **Authorization Header** 
>   
>   * Base64 Encoded Username:Password
>   * Consists of two parts.
>     
>     * Username: API Key obtained from Juspay dashboard
>     * Password: Empty string




### List Card API




#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/cards?options.check_rewards_support=true&customer_id=<customer_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxx'
```

#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://sandbox.juspay.in/cards?options.check_rewards_support=true&customer_id=<customer_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxx'

```



#### Response Code Snippet:

```response
{
  "merchantId": "xxxxx",
  "customer_id": "xxxxxxxx",
  "cards": [
      {
          "card_sub_type_category": "RETAIL",
          "expired": false,
          "card_issuer_country": "xxxxx",
          "name_on_card": "name",
          "card_reference": "xxxxxxxxxxxxxxxxxxxxxx",
          "card_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "card_issuer": "",
          "card_brand": "xxxx",
          "card_number": "xxxx-XXXXXXXX-xxxx",
          "card_fingerprint": "xxxxxxxxxxxxxxxxxxxxxx",
          "extended_card_type": "CREDIT",
          "card_type": "CREDIT",
          "token": {
              "last_four_digits": null,
              "card_reference": null,
              "card_fingerprint": null,
              "par": null,
              "card_isin": null,
              "tokenization_status": "INITIATED",
              "expiry_year": null,
              "expiry_month": null
          },
          "reward_support_gateways": ["LOYLTYREWARDZ"],
          "provider_category": "CONTAINER",
          "card_isin": "xxxxxx",
          "vault_provider": "JUSPAY",
          "juspay_bank_code": null,
          "metadata": {
              "origin_customer_id": "xxxxxxxx",
              "origin_merchant_id": "xxxxxxxx"
          },
          "tokenize_support": false,
          "nickname": "",
          "card_sub_type": "TEST_VARIANT",
          "reward_supported": true,
          "card_exp_year": "xxxx",
          "provider": "JUSPAY",
          "card_exp_month": "xx"
      }
  ]
}
```



### CardBin API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/cardbins/<card_bin>?options.check_rewards_support=true&merchant_id=<merchant_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxx'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/cardbins/<card_bin>?options.check_rewards_support=true&merchant_id=<merchant_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxx'

```



#### Response Code Snippet:

```response
{
  "card_sub_type_category": "RETAIL",
  "country": "INDIA",
  "extended_card_type": "DEBIT",
  "reward_support_gateways": [
      "LOYLTYREWARDZ"
  ],
  "brand": "XXX",
  "juspay_bank_code": "JP_XXX",
  "object": "cardbin",
  "id": "xxxxx",
  "card_sub_type": "XXX SIGNATURE",
  "type": "DEBIT",
  "bank": "XXXX Bank",
  "reward_supported": true
}

```



### 
SPM API 




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/sdk/v1/savedPaymentMethods?client_auth_token=<client_auth_token>&customer_id=<customer_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/sdk/v1/savedPaymentMethods?client_auth_token=<client_auth_token>&customer_id=<customer_id>' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
```



#### Response Code Snippet:

```response
{
  "vpas": [],
  "wallets": [],
  "tpvPaymentMethods": [],
  "merchantPaymentMethods": [
      {
          "juspayBankCode": "JP_LOYLTY",
          "paymentMethodType": "REWARD",
          "walletDirectDebitSupport": false,
          "paymentMethod": "LOYLTYREWARDZ",
          "description": "Loylty Rewards",
          "paymentMethodSubType": "REWARD"
      }
  ],
  "aadhaarMethods": [],
  "upiInapp": [],
  "appsUsed": [],
  "emandatePaymentMethods": [],
  "merchantConfigs": {
      "mustUseGivenOrderIdForTxn": false
  },
  "virtualAccounts": [],
  "restrictedMode": false,
  "tpvEmandatePaymentMethods": [],
  "cards": [
      {
          "cardFingerprint": "xxxxxxxxxxxxxxxxxxxxxx",
          "cardBrand": "VISA",
          "expired": false,
          "cardIssuerCountry": "xxxx",
          "cardGlobalFingerprint": "xxxxxxxxxxxxxxxxxxxxxx",
          "cardToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "cardReference": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "tokenizeSupport": false,
          "nameOnCard": "name",
          "vaultProvider": "JUSPAY",
          "count": 10,
          "cardExpYear": "xxxx",
          "cardExpMonth": "xx",
          "tokenDetails": {
              "tokenizationStatus": "INITIATED"
          },
          "cardIsin": "xxxxxx",
          "cardType": "CREDIT",
          "cardIssuer": "",
          "cardNumber": "xxxx-XXXXXXXX-xxxx",
          "metadata": {
              "origin_merchant_id": "xxxx"
          },
          "lastUsed": "2023-01-30T07:13:19Z",
          "nickname": "",
          "cardSubType": "TEST_VARIANT",
          "extendedCardType": "CREDIT",
          "rewardSupportGateways": ["LOYLTYREWARDZ"],
          "providerCategory": "CONTAINER",
          "provider": "JUSPAY",
          "rewardSupported": true
      }
  ],
  "customerInfo": {
      "juspay_customer_id": "xxxxxxxxxxxxxxxxxxxxxx"
  },
  "nbMethods": [],
  "lastUsedPaymentMethod": {},
  "offers": [],
  "timestamp": "2024-04-03T07:11:43.427015853Z",
  "verifyVpaEnabledGateways": [],
  "outages": []
}
```



### MPM API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/merchants/<merchant_id>/paymentmethods?options.add_supported_feature=true' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

```

#### UAt - Request Code Snippet:

```uat - request
curl --location 'https://api.juspay.in/merchants/<merchant_id>/paymentmethods?options.add_supported_feature=true' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

```



#### Response Code Snippet:

```response
{
    "merchant_configs": {
        "must_use_given_order_id_for_txn": false
    },
    "outage": [],
    "timestamp": "2024-04-03T07:27:26.46395637Z",
    "restricted_mode": false,
    "payment_methods": [
      {
        "payment_method": "LOYLTYREWARDZ",
        "payment_method_type": "REWARD",
        "payment_method_sub_type": "REWARD",
        "juspay_bank_code": "JP_LOYLTY",
        "description": "Loylty Rewards"
      }
    ],
    "verify_vpa_enabled_gateways": []
}
```



### Card Balance API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/cards/balance' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'card_type=LOYLTYREWARDZ' \
--data-urlencode 'card_number=xxxx xxxx xxxx xxxx' \
--data-urlencode 'mobile_number=xxxxxxxxxx' \
--data-urlencode 'invoice_amount=xxx'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/cards/balance' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'card_type=LOYLTYREWARDZ' \
--data-urlencode 'card_number=xxxx xxxx xxxx xxxx' \
--data-urlencode 'mobile_number=xxxxxxxxxx' \
--data-urlencode 'invoice_amount=xxx'
```



#### Response Code Snippet:

```response
{
  "reward_details": {
      "card_last_four": "4343",
      "program_code": "OBC"
  },
  "is_eligible": true,
  "balance": 12
}
```



### Reward API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'order_id=<order_id>' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'payment_method_type=REWARD' \
--data-urlencode 'payment_method=LOYLTYREWARDZ' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'reward_details=<stringify reward details(from card/balance API response)>' \
--data-urlencode 'mobile_number=xxxxxxxxxx'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'order_id=<order_id>' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'payment_method_type=REWARD' \
--data-urlencode 'payment_method=LOYLTYREWARDZ' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'reward_details=<stringify reward details(from card/balance API response)>' \
--data-urlencode 'mobile_number=xxxxxxxxxx'
```



#### Response Code Snippet:

```response
{
  "order_id": "xxxxxxxxxxxxx",
  "status": "PENDING_VBV",
  "payment": {
      "authentication": {
          "url": "https://sandbox.juspay.in/v2/pay/start/<merchant_id>/<txn_uuid>?cardIssuerBankName%3DLOYLTYREWARDZ%26cardType%3DREWARD%26paymentMethod%3DLOYLTYREWARDZ%26paymentMethodType%3DREWARD&otpWaitPage=true",
          "params": {
              "submit_otp_allowed": true,
              "auth_type": "",
              "resend_otp_allowed": true,
              "card_isin": "",
              "challenge_id": "100001571534",
              "card_issuer_bank_name": "LOYLTYREWARDZ",
              "id": "xxxxxxxxxxxxx",
              "fallback_url": "https://sandbox.juspay.in/v2/pay/start/<merchant_id>/<tan_uuid>?cardIssuerBankName%3DLOYLTYREWARDZ%26cardType%3DREWARD%26paymentMethod%3DLOYLTYREWARDZ%26paymentMethodType%3DREWARD?fallback=otp"
          },
          "method": "GET"
      }
  },
  "txn_uuid": "xxxxxxxxxxxxx",
  "offer_details": {
      "offers": []
  },
  "txn_id": "<merchant_id>-<order_id>-x"
}
```



### Submit OTP API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'http://api.juspay.in/v2/txns/<txn_uuid>/authenticate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'answer.otp=071978' \
--data-urlencode 'challenge_id=1000012422'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'http://sandbox.juspay.in/v2/txns/<txn_uuid>/authenticate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'answer.otp=071978' \
--data-urlencode 'challenge_id=1000012422'

```



#### Response Code Snippet:

```response
{
    "order_id": "ord_1712738213",
    "status": "CHARGED",
    "payment": {
        "authentication": {
            "url": "http://api.juspay.in/v2/pay/start/udit_juspay/mozj64HTYYuEYN3EwnR?otpWaitPage=true",
            "params": {
                "submit_otp_allowed": true,
                "auth_type": "",
                "resend_otp_allowed": true,
                "card_isin": "",
                "challenge_id": "1000012447",
                "card_issuer_bank_name": "LOYLTYREWARDZ",
                "id": "mozj64HTYYuEYN3EwnR",
                "fallback_url": "http://api.juspay.in/v2/pay/start/udit_juspay/mozj64HTYYuEYN3EwnR?fallback=otp"
            },
            "method": "GET"
        }
    },
    "gateway": "LOYLTYREWARDZ",
    "created": "2024-04-10T08:36:59Z",
    "payment_gateway_response": {
        "auth_id_code": null,
        "created": "2024-04-10T08:37:06Z",
        "rrn": null,
        "epg_txn_id": "a72f3900-c81a-411b-acad-6bcfd45abecd",
        "txn_id": "udit_juspay-ord_1712738213-1",
        "resp_message": "",
        "resp_code": "200"
    },
    "id": "mozj64HTYYuEYN3EwnR",
    "txn_id": "udit_juspay-ord_1712738213-1",
    "resp_message": "",
    "payment_info": {
        "payment_method": "LOYLTYREWARDZ",
        "payment_method_type": "REWARD"
    },
    "resp_code": ""
}

```



### Card+ Reward API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'order_id=<order_id>' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'additional_payment_details=[
    {
        "payment_method_type": "REWARD",
        "payment_method": "LOYLTYREWARDZ",
        "split_amount": "x",
        "mobile_number":"xxxxxxxxxx",
        "reward_details": "{\"card_last_four\": \"xxxx\",\"program_code\": \"xxxxx\"}"
    }
]' \
--data-urlencode 'card_number=xxxx xxxx xxxx xxxx' \
--data-urlencode 'card_exp_month=xx' \
--data-urlencode 'card_exp_year=xxxx' \
--data-urlencode 'name_on_card=<name>' \
--data-urlencode 'card_security_code=xxx' \
--data-urlencode 'Split_amount=x'

```

#### UAT - Request Code Snippet:

```uat - request
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'order_id=<order_id>' \
--data-urlencode 'merchant_id=<merchant_id>' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'additional_payment_details=[
    {
        "payment_method_type": "REWARD",
        "payment_method": "LOYLTYREWARDZ",
        "split_amount": "x",
        "mobile_number":"xxxxxxxxxx",
        "reward_details": "{\"card_last_four\": \"xxxx\",\"program_code\": \"xxxxx\"}"
    }
]' \
--data-urlencode 'card_number=xxxx xxxx xxxx xxxx' \
--data-urlencode 'card_exp_month=xx' \
--data-urlencode 'card_exp_year=xxxx' \
--data-urlencode 'name_on_card=<name>' \
--data-urlencode 'card_security_code=xxx' \
--data-urlencode 'Split_amount=x'
```



#### Response Code Snippet:

```response
{
  "order_id": "<order_id>",
  "status": "PENDING_VBV",
  "payment": {
      "authentication": {
          "url": "https://sandbox.juspay.in/v2/pay/start/<merchant_id>/<txn_uuid>?cardIssuerBankName%3DPunjab%20National%20Bank%26cardType%3DDEBIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD",
          "method": "GET"
      }
  },
  "txn_uuid": "xxxxxxxxxxxxxxxxxx",
  "offer_details": {
      "offers": []
  },
  "txn_id": "<merchant_id>-<order_id>-x-x"
}
```



### Order Status API




#### Prod - Request Code Snippet:

```prod - request
curl --location 'https://api.juspay.in/ecr/orders/<orderId> \
--header 'Authorization: Basic Auth'
--header 'Version: 2024-01-01'
```



#### Reward Transaction Response Code Snippet:

```reward transaction response
{
    "customer_email": "amritin@gmail.com",
    "customer_phone": "7892369201",
    "customer_id": "cth_7BSdG1PTnKZLBJ9c",
    "status_id": 21,
    "status": "CHARGED",
    "id": "ordeh_4ce8c4ae74fe4d75868422d2001ac1dd",
    "merchant_id": "udit_juspay",
    "amount": 10,
    "currency": "INR",
    "order_id": "ord_1712290550",
    "date_created": "2024-04-05T04:15:50Z",
    "return_url": "https://juspay.in",
    "product_id": "",
    "payment_links": {
        "iframe": "http://localhost:8080/merchant/ipay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd",
        "web": "http://localhost:8080/merchant/pay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd",
        "mobile": "http://localhost:8080/merchant/pay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd?mobile=true"
    },
    "udf1": "",
    "udf2": "",
    "udf3": "",
    "udf4": "",
    "udf5": "",
    "udf6": "",
    "udf7": "",
    "udf8": "",
    "udf9": "",
    "udf10": "",
    "txn_id": "udit_juspay-ord_1712290550-1",
    "payment_method_type": "REWARD",
    "auth_type": "",
    "payment_method": "LOYLTYREWARDZ",
    "refunded": false,
    "amount_refunded": 20,
    "effective_amount": 10,
    "refunds": [
        {
            "id": null,
            "amount": 10,
            "unique_request_id": "udit_juspay_ord_1712290550_1",
            "ref": "4598b588-8107-4bac-9ee9-d7530779c8fc",
            "created": "2024-04-05T05:14:49Z",
            "status": "SUCCESS",
            "error_message": "",
            "sent_to_gateway": true,
            "initiated_by": "API",
            "refund_source": "LOYLTYREWARDZ",
            "refund_type": "STANDARD",
            "metadata": {
                "epay_ref_no": "4598b588-8107-4bac-9ee9-d7530779c8fc",
                "points_expired_amt": 0,
                "points_refunded_amt": 10
            },
            "pg_processed_at": "2024-04-05T05:15:01Z",
            "error_code": null
        }
    ],
    "resp_code": null,
    "resp_message": null,
    "bank_error_code": "",
    "bank_error_message": "",
    "txn_uuid": "mozkKMk9CbTSuJv9foG",
    "txn_detail": {
        "txn_id": "udit_juspay-ord_1712290550-1",
        "order_id": "ord_1712290550",
        "status": "CHARGED",
        "error_code": null,
        "net_amount": 10,
        "surcharge_amount": 0,
        "tax_amount": 0,
        "txn_amount": 10,
        "offer_deduction_amount": null,
        "gateway_id": 273,
        "currency": "INR",
        "express_checkout": false,
        "redirect": true,
        "txn_uuid": "mozkKMk9CbTSuJv9foG",
        "gateway": "LOYLTYREWARDZ",
        "error_message": "",
        "created": "2024-04-05T04:15:54Z",
        "txn_flow_type": "REDIRECT_DEBIT"
    },
    "payment_gateway_response": {
        "resp_code": "200",
        "rrn": null,
        "created": "2024-04-05T04:16:08Z",
        "epg_txn_id": "854d236f-c9e7-4291-9e01-d1960e79d65f",
        "resp_message": "",
        "auth_id_code": null,
        "txn_id": "udit_juspay-ord_1712290550-1",
        "gateway_response": {
            "Code": 200,
            "Data": {
                "epay_txn_status": "CONFIRMED",
                "Refund": [],
                "epay_id": "854d236f-c9e7-4291-9e01-d1960e79d65f",
                "epay_txn_id": "37c1c42e-a2ac-48a8-9582-7089c82eed8a",
                "order_no": "udit_juspay-ord_1712290550-1",
                "paid_by_points": 10,
                "invoice_amt": 10
            },
            "FailureReasons": [],
            "Message": "",
            "Success": true
        },
        "network_error_message": null,
        "network_error_code": null
    },
    "gateway_id": 273,
    "metadata": {
        "LOYLTYREWARDZ:gateway_reference_id": "test_ref_2",
        "payment_links": {
            "iframe": "http://localhost:8080/merchant/ipay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd",
            "web": "http://localhost:8080/merchant/pay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd",
            "mobile": "http://localhost:8080/merchant/pay/ordeh_4ce8c4ae74fe4d75868422d2001ac1dd?mobile=true"
        }
    },
    "gateway_reference_id": "test_ref_2",
    "offers": [],
    "maximum_eligible_refund_amount": 0,
    "additional_info": {},
    "resp_category": null
}

```

#### Card + Reward Transaction Response Code Snippet:

```card + reward transaction response
{
    "customer_email": "amritin@gmail.com",
    "customer_phone": "7892369201",
    "customer_id": "cth_7BSdG1PTnKZLBJ9c",
    "status_id": 21,
    "status": "CHARGED",
    "id": "ordeh_3928cebc762a41baba4c03d1b87e095d",
    "merchant_id": "udit_juspay",
    "amount": 10300,
    "currency": "INR",
    "order_id": "ord_1712586805",
    "date_created": "2024-04-08T14:33:25Z",
    "return_url": "https://juspay.in",
    "product_id": "",
    "payment_links": {
        "iframe": "http://localhost:8080/merchant/ipay/ordeh_3928cebc762a41baba4c03d1b87e095d",
        "web": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d",
        "mobile": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d?mobile=true"
    },
    "udf1": "",
    "udf2": "",
    "udf3": "",
    "udf4": "",
    "udf5": "",
    "udf6": "",
    "udf7": "",
    "udf8": "",
    "udf9": "",
    "udf10": "",
    "refunded": false,
    "amount_refunded": 0,
    "effective_amount": 20600,
    "txn_list": [
        {
            "txn_id": "udit_juspay-ord_1712586805-1-1",
            "payment_method_type": "CARD",
            "auth_type": "THREE_DS",
            "card": {
                "expiry_year": "2029",
                "card_reference": "",
                "saved_to_locker": false,
                "expiry_month": "02",
                "name_on_card": "Test",
                "card_issuer": "HDFC BANK",
                "last_four_digits": "4343",
                "using_saved_card": false,
                "card_fingerprint": "",
                "card_isin": "435708",
                "card_type": "DEBIT",
                "card_brand": "VISA",
                "using_token": false,
                "tokens": [],
                "token_type": "CARD",
                "card_issuer_country": "INDIA",
                "juspay_bank_code": "",
                "extended_card_type": "DEBIT",
                "payment_account_reference": ""
            },
            "payment_method": "VISA",
            "refunded": false,
            "amount_refunded": 0,
            "effective_amount": 56,
            "refunds": [
                {
                    "id": "udit_juspay_ord_1712586805",
                    "amount": 56,
                    "unique_request_id": "udit_juspay_ord_1712586805",
                    "ref": null,
                    "created": "2024-04-09T12:08:20Z",
                    "status": "PENDING",
                    "error_message": "",
                    "sent_to_gateway": true,
                    "initiated_by": "API",
                    "refund_source": "RAZORPAY",
                    "refund_type": "STANDARD",
                    "error_code": null
                }
            ],
            "resp_code": null,
            "resp_message": null,
            "bank_error_code": "",
            "bank_error_message": "",
            "txn_uuid": "mozotSK5bjgHjs1qgSm",
            "txn_detail": {
                "txn_id": "udit_juspay-ord_1712586805-1-1",
                "order_id": "ord_1712586805",
                "status": "CHARGED",
                "error_code": null,
                "net_amount": 10300,
                "surcharge_amount": 0,
                "tax_amount": 0,
                "txn_amount": 56,
                "offer_deduction_amount": null,
                "gateway_id": 23,
                "currency": "INR",
                "express_checkout": false,
                "redirect": true,
                "txn_uuid": "mozotSK5bjgHjs1qgSm",
                "gateway": "RAZORPAY",
                "error_message": "",
                "created": "2024-04-08T14:35:22Z",
                "txn_flow_type": "CARD_TRANSACTION"
            },
            "payment_gateway_response": {
                "resp_code": "SUCCESS",
                "rrn": "776297",
                "created": "2024-04-08T14:35:55Z",
                "epg_txn_id": "pay_NwAAnDCmz1smDB",
                "resp_message": "SUCCESS",
                "auth_id_code": "776297",
                "txn_id": "udit_juspay-ord_1712586805-1-1",
                "gateway_response": {
                    "acquirer_data": "<auth_code>776297</auth_code>",
                    "amount": "5600",
                    "amount_refunded": "0",
                    "auth_code": "776297",
                    "captured": "true",
                    "card_id": "card_NwAAnJwe6B8Wx9",
                    "contact": "+917892369201",
                    "created_at": "1712586946",
                    "currency": "INR",
                    "description": "",
                    "email": "amritin@gmail.com",
                    "entity": "payment",
                    "fee": "118",
                    "id": "pay_NwAAnDCmz1smDB",
                    "international": "false",
                    "method": "card",
                    "notes": "<txn_uuid>mozotSK5bjgHjs1qgSm</txn_uuid><transaction_id>udit_juspay-ord_1712586805-1-1</transaction_id>",
                    "order_id": "order_NwAAmMjuOX59jn",
                    "status": "captured",
                    "tax": "0"
                },
                "debit_amount": "56.0",
                "network_error_message": null,
                "network_error_code": null
            },
            "gateway_id": 23,
            "gateway_reference_id": "rzp_card",
            "metadata": {
                "LOYLTYREWARDZ:gateway_reference_id": "test_ref_2",
                "payment_links": {
                    "iframe": "http://localhost:8080/merchant/ipay/ordeh_3928cebc762a41baba4c03d1b87e095d",
                    "web": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d",
                    "mobile": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d?mobile=true"
                },
                "RAZORPAY:gateway_reference_id": "rzp_card"
            },
            "offers": [],
            "status": "CHARGED",
            "resp_category": null
        },
        {
            "txn_id": "udit_juspay-ord_1712586805-1-2",
            "payment_method_type": "REWARD",
            "auth_type": "",
            "payment_method": "LOYLTYREWARDZ",
            "refunded": false,
            "amount_refunded": 0,
            "effective_amount": 10244,
            "refunds": [
                {
                    "id": null,
                    "amount": 10244,
                    "unique_request_id": "udit_juspay_ord_1712586805-1",
                    "ref": null,
                    "created": "2024-04-09T12:08:20Z",
                    "status": "PENDING",
                    "error_message": "",
                    "sent_to_gateway": true,
                    "initiated_by": "API",
                    "refund_source": "LOYLTYREWARDZ",
                    "refund_type": "STANDARD",
                    "error_code": "ECONNABORTED"
                }
            ],
            "resp_code": null,
            "resp_message": null,
            "bank_error_code": "",
            "bank_error_message": "",
            "txn_uuid": "mozkrFWfD7Fqw1xK3Yr",
            "txn_detail": {
                "txn_id": "udit_juspay-ord_1712586805-1-2",
                "order_id": "ord_1712586805",
                "status": "CHARGED",
                "error_code": null,
                "net_amount": 10300,
                "surcharge_amount": 0,
                "tax_amount": 0,
                "txn_amount": 10244,
                "offer_deduction_amount": null,
                "gateway_id": 273,
                "currency": "INR",
                "express_checkout": false,
                "redirect": false,
                "txn_uuid": "mozkrFWfD7Fqw1xK3Yr",
                "gateway": "LOYLTYREWARDZ",
                "error_message": "",
                "created": "2024-04-08T14:35:21Z",
                "txn_flow_type": "DIRECT_DEBIT"
            },
            "payment_gateway_response": {
                "resp_code": "",
                "rrn": null,
                "created": "2024-04-08T14:36:12Z",
                "epg_txn_id": "c4f8f3b6-d076-449a-bbc4-968c5ff13ea3",
                "resp_message": "",
                "auth_id_code": null,
                "txn_id": "udit_juspay-ord_1712586805-1-2",
                "gateway_response": {
                    "Code": 200,
                    "Data": {
                        "epay_id": "c4f8f3b6-d076-449a-bbc4-968c5ff13ea3",
                        "epay_txn_id": "dc9ca99f-039e-4e54-9820-63bbae9fbecd",
                        "paid_by_points": 10244
                    },
                    "FailureReasons": [],
                    "Message": "",
                    "Success": true
                },
                "network_error_message": null,
                "network_error_code": null
            },
            "gateway_id": 273,
            "gateway_reference_id": "test_ref_2",
            "metadata": {
                "LOYLTYREWARDZ:gateway_reference_id": "test_ref_2",
                "payment_links": {
                    "iframe": "http://localhost:8080/merchant/ipay/ordeh_3928cebc762a41baba4c03d1b87e095d",
                    "web": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d",
                    "mobile": "http://localhost:8080/merchant/pay/ordeh_3928cebc762a41baba4c03d1b87e095d?mobile=true"
                },
                "RAZORPAY:gateway_reference_id": "rzp_card"
            },
            "offers": [],
            "status": "CHARGED",
            "resp_category": null
        }
    ]
}

```



#### Refund API

