---
page_source: https://juspay.io/in/docs/payment-method-integrations/express-checkout-api/consumer-finance/snapmint
page_title: Snapmint 
---


# Snapmint Integration




## Gateway Configuration




### Step 1.1. Substep


**Gateway Configuration Steps in PGCC** 



_Step 1:_  Login to your Juspay Dashboard.

_Step 2:_  Navigate to **EC Operations**  » **PG Control Center**  and select **Gateways.** 

_Step 3:_  Click on **Create Gateway**  and select **Snapmint**  from the available options.

![Image](https://dth95m2xtyv8v.cloudfront.net/tesseract/assets/payment-method-integrations/Screenshot%202023-12-03%20at%207.49.48%20PM-QxeHI.png)
*Snapmint Gateway Step 1*



_Step 4:_  Enter Gateway Credentials either in test of live mode as per your requirement. All the fields mentioned here are mandatory apart from Gateway Reference ID.

_Step 5:_  Configure Payment method Type as Consumer Finance & payment method as Snapmint.

![Image](https://dth95m2xtyv8v.cloudfront.net/tesseract/assets/payment-method-integrations/Screenshot%202023-12-03%20at%207.50.12%20PM.png)
*Payment Method Selection*




## Order Create Payload Changes




### Step 1.1. Substep


As Snapmint requires some additional parameters such as the Shipping, billing address and basket details. Attaching the sample payload to make necessary changes.

> **Note**
> It is **mandatory**  to include **Shipping, Billing address and basket details**  when processing a transaction. Failure to do so will result in a status of JUSPAY_DECLINED during the transaction attempt. 




The number passed in Order Create API will be taken for eligibility. For testing flows, Kindly scroll to the bottom of page and send those number in Order Create  API.

If you encounter challenges in Sending the shipping and billing addresses, please reach out to your Point of Contact (POC) at Snapmint for assistance.


#### Shell Code Snippet:

```shell
curl --location --request POST 'https://sandbox.juspay.in/orders' \
--header 'version: 2023-11-01' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-merchantid: JPTEST' \
--header 'Authorization: Basic RE****************************Og==' \
--data-urlencode 'amount=5000' \
--data-urlencode 'currency=INR' \
--data-urlencode 'customer_id=guest_user_101' \
--data-urlencode 'customer_email=customer@gmail.com' \
--data-urlencode 'customer_phone=7777788888' \
--data-urlencode 'product_id=prod-141833' \
--data-urlencode 'return_url=http://shop.merchant.com/payments/handleResponse' \
--data-urlencode 'description=Sample description' \
--data-urlencode 'billing_address_first_name=Juspay' \
--data-urlencode 'billing_address_last_name=Technologies' \
--data-urlencode 'billing_address_line1=Girija Building' \
--data-urlencode 'billing_address_line2=Ganapathi Temple Road' \
--data-urlencode 'billing_address_line3=8th Block, Koramangala' \
--data-urlencode 'billing_address_city=Bengaluru' \
--data-urlencode 'billing_address_state=Karnataka' \
--data-urlencode 'billing_address_country=India' \
--data-urlencode 'billing_address_postal_code=560095' \
--data-urlencode 'billing_address_phone=7777788888' \
--data-urlencode 'billing_address_country_code_iso=IND' \
--data-urlencode 'shipping_address_first_name=Juspay' \
--data-urlencode 'shipping_address_last_name=Technologies' \
--data-urlencode 'shipping_address_line1=Girija Building' \
--data-urlencode 'shipping_address_line2=Ganapathi Temple Road' \
--data-urlencode 'shipping_address_line3=8th Block, Koramangala' \
--data-urlencode 'shipping_address_city=Bengaluru' \
--data-urlencode 'shipping_address_state=Karnataka' \
--data-urlencode 'shipping_address_postal_code=560095' \
--data-urlencode 'shipping_address_country_code_iso=IND' \
--data-urlencode 'shipping_address_country=India' \
--data-urlencode 'options.get_client_auth_token=true' \
--data-urlencode 'basket=[{"id":"MK-RMB-32613-YVVT-GUD-B1C1","quantity":2,"unitPrice":7500,"description":"iphone","productURL":"https://www.google.com","category":"Electronics","sku":"123456","sellerType":"VENDOR","customParams":{"name1":"value1","name2":"value2"}}]' \
--data-urlencode 'order_id=JP_3743743305' \
--data-urlencode 'metadata.SNAPMINT:snapmintTotalOrders=5' \
--data-urlencode 'metadata.SNAPMINT:snapmintTotalOrderValue="10000",' \
--data-urlencode 'metadata.SNAPMINT:snapmintMaxOrderValue=6000' \
--data-urlencode 'metadata.SNAPMINT:snapmintLast3Addresses=110040 | 110042 | 110043' \
--data-urlencode 'metadata.SNAPMINT:snapmintLastOrderDate=20230828'

```




Explanation of Metadata fields Snapmint details.


| Fields | Explanation of Fields |
|---|---|
| metadata.SNAPMINT:snapmintMaxOrderValue | Maximum order value processed by a merchant with Snapmint. |
| metadata.SNAPMINT:snapmintTotalOrderValue | Total order value processed by a merchant with Snapmint. |
| metadata.SNAPMINT:snapmintMaxOrderValue | Max of value of all orders placed with merchant |
| metadata.SNAPMINT:snapmintLast3Addresses | String with max length 1000.Last 3 unique pincodes where orders were placed from the merchant |
| metadata.SNAPMINT:snapmintLastOrderDate | Date(YYYYMMDD). Last order date for the user |



## Transaction Payload  




### Step 1.1. Substep


Please find below the /txns payload changes for Snapmint. 


#### Shell Code Snippet:

```shell
curl --location --request POST 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic RE*********************************Og==' \
--header 'x-merchantid: JPTEST' \
--data-urlencode 'order_id=JP_172424231' \
--data-urlencode 'merchant_id=JPTEST' \
--data-urlencode 'payment_method_type=CONSUMER_FINANCE' \
--data-urlencode 'payment_method=SNAPMINT' \
--data-urlencode 'format=json' \
--data-urlencode 'redirect_after_payment=true'

```





## Order Status




### Step 1.1. Substep


Sample Order status payload


#### Shell Code Snippet:

```shell
{
    "customer_email": "customer@gmail.com",
    "customer_phone": "7777788888",
    "customer_id": "test1",
    "status_id": 21,
    "status": "CHARGED",
    "id": "ordeh_156edb4b421445978d4b194e2252970a",
    "merchant_id": "jptest",
    "amount": 5000,
    "currency": "INR",
    "order_id": "JP_1701429443",
    "date_created": "2023-12-01T11:17:23Z",
    "return_url": "http://shop.merchant.com/payments/handleResponse",
    "product_id": "prod-141833",
    "payment_links": {
        "iframe": "https://sandbox.juspay.in/orders/ordeh_156edfdffdsdfgd4b194e2252970a/payment-page",
        "web": "https://sandbox.juspay.in/orders/ordeh_156edb4b42fdgfdgdfgfd194e2252970a/payment-page",
        "mobile": "https://sandbox.juspay.in/orders/ordeh_156edb4b4dfgfdgfdgdfffd194e2252970a/payment-page"
    },
    "udf1": "",
    "udf2": "",
    "udf3": "",
    "udf4": "",
    "udf5": "",
    "udf6": "",
    "udf7": "",
    "udf8": "",
    "udf9": "",
    "udf10": "",
    "txn_id": "jptest-JP_1701429443-1",
    "payment_method_type": "CONSUMER_FINANCE",
    "auth_type": "",
    "payment_method": "SNAPMINT",
    "refunded": false,
    "amount_refunded": 0,
    "effective_amount": 5000,
    "resp_code": null,
    "resp_message": null,
    "bank_error_code": "",
    "bank_error_message": "",
    "txn_uuid": "moz44g2owchZSRjoWTu",
    "txn_detail": {
        "txn_id": "jptest-JP_1701429443-1",
        "order_id": "JP_1701429443",
        "status": "CHARGED",
        "error_code": null,
        "net_amount": 5000,
        "surcharge_amount": null,
        "tax_amount": null,
        "txn_amount": 5000,
        "offer_deduction_amount": null,
        "gateway_id": 263,
        "currency": "INR",
        "metadata": {
            "payment_channel": "\"WEB\""
        },
        "express_checkout": false,
        "redirect": true,
        "txn_uuid": "moz44g2owchZSRjoWTu",
        "gateway": "SNAPMINT",
        "error_message": "",
        "created": "2023-12-01T11:17:32Z",
        "txn_flow_type": "REDIRECT_DEBIT"
    },
    "payment_gateway_response": {
        "resp_code": "Success",
        "rrn": "",
        "created": "2023-12-01T11:19:30Z",
        "epg_txn_id": "46905",
        "resp_message": "CAPTURED",
        "auth_id_code": "NA",
        "txn_id": "jptest-JP_1701429443-1",
        "debit_amount": "1667"
    },
    "gateway_id": 263,
    "metadata": {
        "payment_page_sdk_payload": "{\"shippingAddressPostalCode\":\"560095\",\"amount\":\"5000.00\",\"basket\":\"[{\\\"id\\\":\\\"MK-RMB-32613-YVVT-GUD-B1C1\\\",\\\"quantity\\\":2,\\\"unitPrice\\\":7500,\\\"description\\\":\\\"iphone\\\",\\\"productURL\\\":\\\"https://www.google.com\\\",\\\"category\\\":\\\"Electronics\\\",\\\"sku\\\":\\\"123456\\\",\\\"sellerType\\\":\\\"VENDOR\\\",\\\"customParams\\\":{\\\"name1\\\":\\\"value1\\\",\\\"name2\\\":\\\"value2\\\"}}]\",\"shippingAddressState\":\"Karnataka\",\"shippingAddressLastName\":\"Technologies\",\"currency\":\"INR\",\"customerPhone\":\"7777788888\",\"customerEmail\":\"customer@gmail.com\",\"shippingAddressLine1\":\"Girija Building\",\"description\":\"Sample description\",\"shippingAddressFirstName\":\"Juspay\"}",
        "SNAPMINT:snapmintLastOrderDate": "20230828",
        "SNAPMINT:snapmintTotalOrders": "5",
        "merchant_payload": "{\"customerPhone\":\"7777788888\",\"customerEmail\":\"customer@gmail.com\"}",
        "SNAPMINT:snapmintMaxOrderValue": "6000",
        "payment_links": {
            "iframe": "https://sandbox.juspay.in/orders/ordehjklsdfjdskfdsf94e2252970a/payment-page",
            "web": "https://sandbox.juspay.in/orders/ordeh_156sdfdsfdsfdsfdb1sd94e2252970a/payment-page",
            "mobile": "https://sandbox.juspay.in/orders/ordeh_156dfsdfdsfdasfdasfadsf978d4b194e2252970a/payment-page"
        },
        "payment_page_client_id": "toothsi",
        "SNAPMINT:snapmintTotalOrderValue": "10000",
        "SNAPMINT:snapmintLast3Addresses": "110040 | 110042 | 110043"
    },
    "gateway_reference_id": null,
    "offers": [],
    "maximum_eligible_refund_amount": 5000,
    "basket": [
        {
            "productName": null,
            "productUrl": null,
            "category": "Electronics",
            "quantity": 2,
            "customParams": {
                "name2": "value2",
                "name1": "value1"
            },
            "passenger": null,
            "id": "MK-RMB-32613-YVVT-GUD-B1C1",
            "sku": "123456",
            "productRisk": null,
            "unitPrice": 7500,
            "shippingDestinationType": null,
            "description": "iphone",
            "productCode": null,
            "sellerType": "VENDOR"
        }
    ]
}
```





## Testing Scenarios (User Flows)




| Phone Number | Flows | OTP, PAN and UPI ID |
|---|---|---|
| 7777788888 | OTP Only required | OTP-1010, Payment gateway select UPI - 7777777777@paytm |
| 7878787878 | OTP and Pan Required | OTP-1010, Pan - APFPJ2575J Payment gateway select UPI - 7777777777@paytm |
| 7878787879 | OTP, Pan and KYC Required | OTP-1010, Pan - APFPJ2575J Payment gateway select UPI - 7777777777@paytm |
| 8888888887 | Credit Reject |  |
