Skip to main content

Instamojo

Yellow.ai Integration with Instamojo Payment Gateway allows you to generate payment links, view payment status, and create refunds with the yellow.ai platform.

1. Use cases

Following are the use cases that are currently accommodated in the Integration:

Using the action nodes, you can generate payment links according to your use cases. Get the final amount from your cart total and call the Generate Payment link action node of integration.

alt_text

Node Input Params

Field NameDescriptionSample Input
AmountThe amount for the request. The minimum amount is 9. The maximum is 200000200
Customer NameName of payerJohn
Customer EmailEmail of payer[email protected]
Customer Mobile NumberMobile no. of payer9999999999
PurposePurpose of the payment requestIphone
Send EmailFlag to send request link via email. If send_email is true, a request email will be sent to the email supplied. If send_email is true but no email is supplied, request creation will throw an errorFalse
Send SMSFlag to send request link via SMS. If send_sms is true, a request SMS will be sent to the phone number supplied. If send_sms is true but no phone number is supplied, request creation will throw an errorFalse

StatusCallbackUrl : Copy Webhook URL from the Instamojo card at the integration page.

Example: https://alpha6.yellowmessenger.com/integrations/genericIntegration/instamojo/x1645073590274?id=l%2B%2FD1yhpi5HjWFglhONPHbDYda7KtXeCEVUofPRsNBY%3D


Sample Success Response

{
"id": "05f317448ad84649aa1a9c7328edb015",
"user": "https://api.instamojo.com/v2/users/90f01dfdacbe4fe7892fc27dbdc30906/",
"phone": "+919999999999",
"email": "[email protected]",
"buyer_name": "John Doe",
"amount": "2500",
"purpose": "FIFA 16",
"status": "Pending",
"payments": [],
"send_sms": true,
"send_email": true,
"sms_status": "Pending",
"email_status": "Pending",
"shorturl": null,
"longurl": "https://www.instamojo.com/@foo/05f317448ad84649aa1a9c7328edb015",
"redirect_url": "http://www.example.com/redirect/",
"webhook": "http://www.example.com/webhook/",
"created_at": "2016-05-09T16:10:13.786Z",
"modified_at": "2016-05-09T16:10:13.786Z",
"resource_uri": "https://api.instamojo.com/v2/payment_requests/05f317448ad84649aa1a9c7328edb015/",
"allow_repeated_payments": false,
"mark_fulfilled": true
}

Event for receiving payment confirmation on the bot

Following are the events that are currently accommodated in the Integration:

EventDescription
Instamojo Payment StatusIn the case of payments the status can be checked with these details.

Please Activate the Instamojo Payment Status after configuring Instamojo credentials on the integration page.

alt_text

1.2 Create a Refund

This will refund a payment made on Instamojo.

Node Input Params

Field NameDescriptionSample Input
Refund AmountThis field can be used to specify the refund amount. For instance, you may want to issue a refund for an amount lesser than what was paid.200
Unique Transaction IDMandatory parameter in the body from the second case creation onwards for the payment to prevent duplicate case creations due to replay of APIsC5c0751269
Issue TypeA three-letter short code identifying the reason for this case. Please refer to the below table for this field's valueQFL
DescriptionAdditional text explaining the refundProduct is not good
Payment IdPayment Id received in create payment link node. store in database for further useMOJO5c04000J30502939

Valid values for different type

TypeDescription
RFD
TNRProduct/service no longer available.
QFLCustomer not satisfied.
QNRProduct lost/damaged.
EWNDigital download issue.
TANEvent was canceled/changed.
PTHProblem not described above.
{
"refund": {
"id": "C5c0751269",
"payment_id": "MOJO5c04000J30502939",
"status": "Refunded",
"type": "QFL",
"body": "Customer isn't satisfied with the quality",
"refund_amount": "100",
"total_amount": "100.00",
"created_at": "2015-12-07T11:01:37.640Z"
},
"success": true
}

2. Configuration

Configuring the integration with Instamojo is straightforward. Follow the steps defined below to start integrating:

  1. Sign up on Instamojo.

    • Test Mode: This mode is for testing and for developers who are just getting started in Instamojo Integration. Test Mode is completely Free of Charge. No real charges will be made, even if we give our valid card details in the Instamojo use (https://test.instamojo.com/) to sign Up
    • Live Mode: As the name suggests, In the Live Mode, we would be charged for real. To work on Live Mode, we have to give our bank account and KYC Details. Use (https://www.instamojo.com/) to Signup.
  2. After signing up, log in to Dashboard > Go to API & Plugins > Generate Credentials > Select Direct Rest API Integration.

alt_text

  1. Copy the Client ID and Client Secret.

  2. Go to the integration page of cloud.yellow.ai and search for Instamojo then Paste the client Id and Client Secret in the form.

  3. For sandbox environment use https://test.instamojo.com as baseUrl and for production env use https://api.instamojo.com as baseUrl


Reference

For more information about the action nodes you use here, refer to Create Payment, webhooks.